The wheel-install step installs every *.whl in dist/. A wheel left over
from a previous build (with an older version baked into options.py) was
installed on top of the freshly built one, so the AppImage could carry a
mix of the new version in its filename and old code inside.
pip resolves dependencies against the build container, not the AppDir
root, so the wheel install reinstalled PySide6_Essentials after the
pruning steps and grew the AppImage from ~58 MB to ~87 MB. Dependencies
are already installed from requirements.txt earlier in the recipe.
Feature list, known limitations and notes brought in line with the
current state: browser-based login, failed-transfers toggle, window
geometry, monitor-status.json based state on client v2.5.12+, graceful
client shutdown and takeover, invalid-name and Recycle Bin failure
reporting, and the new client options. Limitations updated for the
AppImage login situation and the Wayland window position caveat.
Additional notes now cover the one-time --resync after the removed
client options are dropped from the config, and the log note no longer
has an empty path - it names the configured file and both rotation
mechanisms.
The minimum supported OneDrive client stays v2.5.11 (needed for the
client-based browser login flow); the README now also states what the
GUI gains with client v2.5.12+ - monitor-status.json based state, the
new client options, Recycle Bin failure reporting and system clock
drift warnings - and that v2.5.11 keeps working without them.
With the default DEBUG level every line of client output is logged,
and a busy initial sync can grow the log by gigabytes per day. The
logs rotated by time only (default: every 24 hours, 3 backups), so a
single day of DEBUG logging could fill /tmp (or wherever the log file
points) before any rotation happened.
The log file now also rotates when it reaches the new "Max log file
size (MB)" setting (default 20 MB), so the total space used by the
current file and its backups is bounded to roughly
(backup count + 1) x max size.
Size-triggered rollovers rotate numbered backups (.1, .2, ...): the
time-based rollover refuses to run twice within one rotation interval
(the backup name already exists), which would leave the file growing
unbounded for the rest of the interval.
The Connect timeout and Data timeout spin boxes had no maximum set, so
they were capped at the QSpinBox default of 99 seconds. The default
Data timeout is 240 seconds, so opening the settings silently clamped
any existing value to 99, and a higher custom value could not be set at
all. Both spin boxes now accept up to 3600 seconds, like the Operation
timeout.
Three client options that were configurable only by editing the config
file are now available in profile settings, with tooltips from the
client documentation:
- "Skip files larger than (MB)" (Excluded files): skip_size. Changing
it requires a resync, which the tooltip points out.
- "Use device authentication" (Sync Options > Advanced options):
use_device_auth. Signs in with a device code instead of the browser
flow - ideal for headless systems, but only supported for Work/School
(Entra ID) accounts.
- "Permanent delete" (Sync Options > Advanced options):
permanent_delete. Permanently removes items online instead of moving
them to the OneDrive Recycle Bin, with the data-loss warning in the
tooltip.
Defaults are added to the bundled default config, so nothing is written
to the client config until the user changes a value.
Qt requires libgthread-2.0.so.0, which is provided by libglib2.0-0.
Some distributions (reported on openSUSE Leap 16) do not have it
installed system-wide, so the AppImage failed to start with
"libgthread-2.0.so.0: cannot open shared object file". An AppImage is
expected to carry all of its dependencies, so the package is now
included in the image.
Not verified with a full AppImage build; the package list change is
the same mechanism as the other bundled libraries.
Fixes#283
The login dialog now offers "Sign in with web browser" as the preferred
method: it restarts the profile's client with --reauth, which opens the
default browser and receives the OAuth response on a local loopback
listener (client v2.5.11+). Nothing has to be copied manually, and the
flow no longer depends on the nativeclient redirect that Microsoft
answers with the "This page is no longer available" (wrongplace) page.
The manual paste workflow stays as a fallback, with instructions
updated to explain how to recover the response URI from the browser
history or the network log when the wrongplace page appears.
The button is hidden on clients older than v2.5.11, which do not have
the loopback login flow.
Fixes#274
New setting "Remember window size and position" (enabled by default).
The main window geometry is saved when the window is hidden to the
tray, closed or when the application quits, and restored on the next
start instead of always opening at the default position.
The tooltip notes that on Wayland the compositor controls the position
and it may not be restored exactly.
Fixes#280
The advanced sync options had either no tooltip at all (Force Session
Upload, Bypass data preservation, Delay inotify processing) or a wrong
one: Disable upload validation was described as disabling *download*
validation, and No remote delete had a confusing wording about "local
file 'deletes'".
All five tooltips now describe what the option does, based on the
current client documentation, including the cautions that belong to
them: Bypass data preservation can lead to data loss without a
recoverable safeBackup copy, and Delay inotify processing requires
Force Session Upload to be enabled as well.
Fixes#284
The client refuses to start a second instance for the same
configuration directory, so when OneDriveGUI starts and a client for a
profile is already running (typically orphaned by a previous GUI
session that exited without stopping it, or started manually), the GUI
could not monitor the profile - the client failed with "The 'onedrive'
application is already running" or the GUI showed no status at all.
Before starting a monitor, OneDriveGUI now scans the process list for a
client using the profile's configuration directory. If one is found,
the user can stop it gracefully (SIGINT, killed after 10 s at the
latest) and start monitoring in the GUI, or keep the external client
and not start the monitor.
Together with the stop-on-exit option this closes the reconnect gap
after logouts and crashes.
Fixes#267
New setting "Stop OneDrive clients when OneDriveGUI exits" (enabled by
default). When it is on, every running client is asked to shut down
gracefully not only via the Quit dialog, but also when the application
exits for any other reason - in particular when the session ends: the
desktop environment's SIGTERM/SIGHUP to the GUI now triggers the same
graceful client shutdown instead of leaving orphaned clients behind.
When the setting is disabled, the clients keep running in the
background after OneDriveGUI exits; the next OneDriveGUI start offers
to reconnect to them.
Refs #267
stop_worker() killed the client process in a busy loop until it died.
A SIGKILL can interrupt an in-flight transfer, skips the database
checkpoint/vacuum and leaves monitor-status.json behind (the client
only removes it on an orderly shutdown).
The client is now asked to shut down with SIGINT, which lets it finish
in-flight operations, checkpoint its delta state, vacuum the database
and remove its status file. Only a client that does not exit within the
grace period (10 s) is killed.
Refs #267
The client never uploads items whose names are not valid on OneDrive
("Skipping item - invalid name (Microsoft Naming Convention): ./a:b",
also for invalid whitespace, HTML ASCII codes, invalid UTF-16 and
control codes), and it does not count them as failed, so the sync
result is "success" while the item is silently missing online.
Such items are now listed as failed entries in the file operation list
(behind the "N failed" toggle) with a tooltip naming the reason and
asking to rename the item.
Client versions were turned into numbers in three different ways:
concatenated digits in options/utils ("2.5.12" -> 2512, so a future
"2.6.0" -> 260 would be considered older), digit concatenation with a
x10 fixup in the setup wizard, and zero-padded components in the main
window version check.
A single version_number() helper now zero-pads each component
(2.5.12 -> 20512) and is used by all of them, together with a shared
MIN_CLIENT_VERSION (2.5.11):
- The v2.5.12 options in profile settings are enabled based on a
correct comparison.
- The setup wizard enforces the same minimum version as the main
window (it accepted anything from v2.5.0).
- The "OneDrive client is out of date!" warning is only shown when the
installed client is older than the latest release, not when it is
newer (e.g. a v2.5.12 pre-release built from 'master').
With start_minimized enabled the main window is hidden, so a dialog
such as the resync prompt can be the only top-level window. Closing it
triggered Qt's default quit-on-last-window-closed, the application was
torn down while the worker QThread was still running, and Qt aborted
the process ("QThread: Destroyed while thread is still running"). The
onedrive client was left behind orphaned.
OneDriveGUI is a tray application, so it no longer quits when its last
window closes; quitting is explicit via the tray menu or the Quit
button. All workers are stopped from QApplication.aboutToQuit, so no
worker thread outlives the application, and the Quit action now ends
the event loop with QApplication.quit() instead of raising SystemExit
from a slot.
Fixes#297
For a local file system error the client prints a summary line without
any information of its own ("The local file system returned an error
with the following details:"), followed by the path and the actual
error. The status showed mostly the summary, e.g. "Error: The local
file system returned an error with the following details: Path:
./.steampath ...".
The status now shows the actual error ("Error: Local file system error:
./.steampath: No such file or directory"). When the item does not
exist, which is how a broken symbolic link is reported, the warning
tooltip suggests removing the link or enabling 'Skip symlinks'.
The tray icon ignores these errors as intended, matching the client's
current wording again ("...following details" instead of the old
"...following message").
Fixes#278
"Initializing the OneDrive API" does not exist in client v2.5.11 or
v2.5.12, so the branch matching it never ran, including the per-cycle
reset of the per-file error messages it contained. That reset now
happens when a sync cycle starts, so error messages of files that
failed in earlier cycles no longer accumulate for the lifetime of the
client process.
The tray notification de-duplication is intentionally not reset per
cycle, so persistent failures are not re-notified on every cycle.
Refs #305
Client v2.5.12 reports when WebSocket notifications for online changes
cannot be configured ("WARNING: Unable to configure WebSocket support
... The client will retry while monitor mode remains active"), when it
retries, and when WebSocket support is enabled again.
These are now written to the GUI log at warning/info level so they can
be found when diagnosing delayed online changes, but deliberately do
not change the status or warning icon: the client keeps picking up
online changes on the regular monitor interval and recovers by itself.
Refs #305
Client v2.5.12 validates the local system clock against Microsoft
service time. On unsafe drift it suspends timestamp-sensitive
synchronisation ("ERROR: OneDrive synchronisation suspended because
unsafe local system clock drift has been confirmed"), and on smaller
drift it warns ("WARNING: Local system clock drift detected").
- Suspension: the status reads "Sync suspended: the system clock is out
of sync" and the warning icon explains that sync resumes automatically
once the time is corrected, including the observed clock difference.
- Drift warning: the warning icon tooltip explains the problem without
replacing the current status.
- Recovery ("NOTICE: System clock validation has recovered", "...drift
has returned to the acceptable range", "...below the blocking
threshold") clears the warning and says that sync will resume.
Previously the suspension line was treated as a generic error that
waited for a continuation line, and the warnings were ignored.
Refs #305
Client v2.5.12 reports online deletions that could not be moved to the
configured local Recycle Bin, both as an error line ("ERROR: Move of
local file to the configured Recycle Bin failed for <path>: <reason>")
and in the end-of-cycle summary ("Failed local items to move to the
configured Recycle Bin: N" followed by one line per path).
These failures are now included in the failed-files count, status
tooltip and tray notification, and each affected path gets a
"Move to Recycle Bin failed" row in the file operation list with the
reason in its tooltip. Failed rows for deletions and Recycle Bin moves
are no longer rendered as completed "Deleted"/"Trashed" entries.
Refs #305
The client summarises failed uploads and failed downloads on separate
lines ("Failed items to upload to/from Microsoft OneDrive: N" and
"Failed items to download to/from ..."). Only the upload summary was
matched, and a second summary would have replaced the count instead of
adding to it, so the reported number of failed files was wrong when
downloads failed.
The tray notification is now raised once at the end of the sync cycle,
after all summaries are collected. Previously each summary could raise
its own notification, giving two notifications for one cycle.
Refs #305
The client reports a local deletion that is propagated online as
"Deleting online file from Microsoft OneDrive: ./path" (or "... online
folder ..."). This wording, used since v2.5.11, was not matched, so these
deletions never appeared in the file operation list; only the older
"Deleting item from Microsoft OneDrive" form was handled.
Also show folders deleted locally because they were removed online
("Deleting local directory") and folders moved to the local Recycle Bin
("Moving this local directory to the configured 'Recycle Bin'").
The follow-up "Successfully deleted item" line and the pathless
"Deleting online folder due to --local-first & --mirror-local-state"
line are not matched, so each deletion is listed once.
Refs #305
Client v2.5.12 publishes a machine-readable runtime status document,
monitor-status.json, in the configuration directory while running in
--monitor mode. OneDriveGUI now polls it every 2 seconds for each
running profile and uses it as the authoritative high-level state,
while the client output stays the source for per-file activity and
progress.
- The document is only used when its schema_version is 1 and its pid is
the client process started by the worker, so a stale file left behind
by a crashed or killed client is ignored.
- The status label is rewritten only when the high-level state changes
(idle with the local time of the last successful sync, partial
failure with the failure count, service unreachable, system clock
drift blocking sync, interrupted), so detailed messages from the
client output are not overwritten on every poll.
- The status label tooltip summarises the document: client state and
loop, last successful sync, cycle count and result, failure counts,
OneDrive reachability and system time state.
- The tray icon uses the document's state (syncing, idle, degraded)
instead of guessing from the status text.
UTC timestamps are converted to local time by hand, as the client emits
7 fractional digits which datetime.fromisoformat() rejects before
Python 3.11 (the AppImage ships Python 3.10).
Clients older than v2.5.12, or profiles with monitor_status disabled,
keep using the status derived from the client output.
Refs #305
Client v2.5.12 exits with code 78 (previously 126) when a --resync is
required. The worker now checks the exit code after the client stops and
asks for resync authorization if the output matcher did not already
fire, so a future change in the message wording does not leave the
profile silently stopped.
The resync dialog is also requested only once per run: v2.5.12 can
print two matching lines for one event (e.g. the cache-state message
followed by "A --resync is required to rebuild the local item
database."), which would otherwise open the dialog twice.
Refs #305
New options introduced in OneDrive client v2.5.12:
- disable_time_check (Sync Options > Advanced options): skip validating
the system clock against Microsoft service time. The tooltip carries
the upstream caution that this bypasses a correctness safeguard.
- monitor_status (Sync Options > Advanced options): publish the
machine-readable monitor-status.json runtime status file.
- notify_monitor_start (Logging > Notifications): desktop notification
when monitor mode becomes active; disabled while notifications are
disabled.
Defaults are added to the bundled default config, so the options are
only written to the client config when changed. Older clients refuse to
start with unknown keys, so the checkboxes are disabled when the
installed client is older than v2.5.12.
Refs #305
The client no longer supports 'sync_business_shared_folders',
'min_notify_changes' and 'force_http_2'. The latter two are ignored
with a warning on every start, but 'sync_business_shared_folders' is a
configuration error that stops the client from starting at all.
These options are now dropped when profiles are loaded, so the config
saved on startup no longer contains them. 'min_notify_changes' is
removed from the bundled default config, which made it look like a
supported option.
The status message shown when the client reports the option no longer
claims that Business Shared Folders were deprecated (the wiki it linked
says otherwise). It now says that the config option is unsupported and
how to remove it. None of these options affect the client's
resync-required checks.
Fixes#287
Refs #305
The client prints the same file both with and without a leading './'
depending on the message (e.g. the transfer line vs. the failed-items
summary). The two spellings were treated as different files, which
created duplicate rows and left a stale hidden "failed" row (and a
wrong failed count) behind after the file synced successfully.
Paths are now normalised before they are used as row keys in the file
operation list and as keys for the per-file error messages in the
worker.
Failed file transfers are pinned at the top of the file operation list
but hidden by default; a "N failed" button in the account header shows
or hides them, so a large number of persistent failures no longer
floods the list and pushes synced files out of view.
Rows that are still open (in progress or failed, no completion
timestamp) are tracked in a per-profile map keyed by full path, so a
file that keeps failing across sync cycles updates its row in place
instead of adding a duplicate on every cycle, regardless of how far
down the list the row has moved. Stalled transfers are moved to the top
as one batch.
The tray tooltip now lists free space per profile, including the last
known value restored from config while sync is stopped, so the GUI
window does not need to be opened to check it.
Tray tooltips are rendered by the desktop environment at a fixed narrow
width that the application cannot widen, and profile names (often email
addresses) use most of it. The tooltip was restructured so each value
gets its own short line indented under the profile name, with profiles
separated by blank lines - lines no longer wrap mid-value and
multi-profile listings stay readable.
Also removed leftover src/ui/ from the pre-packaging layout (empty file
from a mistargeted uic run and stale __pycache__).
Closes#309
- client and GUI version lookups retry every 60 seconds, up to 10 attempts, before reporting failure
- raise the GitHub request timeout from 1 to 3 seconds
- Fix autostart Exec fallback: the package now uses relative imports, so
a desktop entry pointing at the script path fails at login. Use
"-m onedrive_gui" with PYTHONPATH instead, and recognise the pip
console script "onedrive-gui" when it is on PATH.
- AppImageBuilder.yml: revert accidental python3.10 -> python3.12 change,
drop the now-redundant "cp src AppDir/usr" (the wheel install covers
it), quote the *.whl glob.
- pyproject.toml: read version dynamically from options.py so it is not
duplicated in a third place; declare runtime dependencies; remove the
pyproject sed step from build_appimage.sh.
- MANIFEST.in: ship the resources/ directory only; stop packaging .ui
sources and remove the stray mainwindow.ui.autosave.
- Ignore build/, dist/ and *.egg-info; update README wheel filename.
- rebuild the wizard's profile dropdown from live config on every page entry instead of a one-time snapshot at app startup
- persist account type to the profiles file when the client reports it; previously it only lived in memory and was lost on restart
- resolve installed executable to its absolute path instead of writing a bare command name
- fall back to the current interpreter plus the main script path when running from source, where no executable exists on PATH
- return the binary path for frozen builds
- quote Exec paths so install locations with spaces work
- left click on tray icon now focuses and raises the main window when it is visible but unfocused, instead of hiding it
- hiding still happens when the window is focused, showing when hidden