abraunegg / onedrive

OneDrive Client for Linux
https://abraunegg.github.io
GNU General Public License v3.0
10.16k stars 864 forks source link

Bug: Bad Timestamp error when initial authentication #2852

Closed nathannli closed 1 month ago

nathannli commented 1 month ago

Describe the bug

When trying to start the initial sync, it will prompt you to authenticate by clicking the onedrive URL, signing in, and then pasting the resulting URL into the terminal. The resulting URL causes the error "Bad Timestamp"

01:34:09 ❯❯ onedrive --sync
D-Bus message bus daemon is available; GUI notifications are now enabled
Using IPv4 and IPv6 (if configured) for all network operations
Attempting to contact Microsoft OneDrive Login Service
Successfully reached Microsoft OneDrive Login Service
Configuring Global Azure AD Endpoints
Authorise this application by visiting:

https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=<my_client_id>&scope=Files.ReadWrite%20Files.ReadWrite.All%20Sites.ReadWrite.All%20offline_access&response_type=code&prompt=login&redirect_uri=https://login.microsoftonline.com/common/oauth2/nativeclient

Enter the response uri from your browser: https://login.microsoftonline.com/common/oauth2/nativeclient?code=<the response code>
BAD TIMESTAMP (REGEX FAIL): 2023-05-17T17:19:46.683Z
WARNING: Invalid timestamp provided by the Microsoft OneDrive API: 2023-05-17T17:19:46.683Z
Fetching items from the OneDrive API for Drive ID: d9170f55dc8ec9ee ..BAD TIMESTAMP (REGEX FAIL): 2024-09-27T05:34:34.3862724Z
Attempting to perform a database vacuum to optimise database
Database vacuum is complete
core.exception.AssertError@src/itemdb.d(725): The DB record mtime entry is not a valid ISO timestamp entry. Please attempt a --resync to fix the local database.
----------------
??:? _d_assert_msg [0x5581fd58b5b0]
??:? itemdb.Item itemdb.ItemDatabase.buildItem(sqlite.Statement.Result) [0x5581fd551d02]
??:? bool itemdb.ItemDatabase.selectById(const(char)[], const(char)[], out itemdb.Item) [0x5581fd54fade]
??:? void syncEngine.SyncEngine.processRootAndDeletedJSONItems(std.json.JSONValue, immutable(char)[], bool, bool, bool) [0x5581fd518b41]
??:? void syncEngine.SyncEngine.processDeltaJSONItem(std.json.JSONValue, ulong, int, ulong, bool) [0x5581fd5181b1]
??:? void syncEngine.SyncEngine.fetchOneDriveDeltaAPIResponse(immutable(char)[], immutable(char)[], immutable(char)[]) [0x5581fd51628b]
??:? void syncEngine.SyncEngine.syncOneDriveAccountToLocalDisk() [0x5581fd513f8c]
??:? void main.performStandardSyncProcess(immutable(char)[], monitor.Monitor) [0x5581fd3cf187]
??:? _Dmain [0x5581fd3cc3a0]
01:36:22 ❯❯ onedrive --version
onedrive v2.5.1
01:36:40 ❯❯ curl
curl: try 'curl --help' or 'curl --manual' for more information
01:39:26 ❯❯ curl --version
curl 8.10.1 (x86_64-pc-linux-gnu) libcurl/8.10.1 OpenSSL/3.3.2 zlib/1.3.1 brotli/1.1.0 zstd/1.5.6 libidn2/2.3.7 libssh2/1.11.0 nghttp2/1.63.0 librtmp/2.3 OpenLDAP/2.6.8
Release-Date: 2024-09-18
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd
01:41:10 ❯❯ onedrive --resync
D-Bus message bus daemon is available; GUI notifications are now enabled

The usage of --resync will delete your local 'onedrive' client state, thus no record of your current 'sync status' will exist.
This has the potential to overwrite local versions of files with perhaps older versions of documents downloaded from OneDrive, resulting in local data loss.
If in doubt, backup your local data before using --resync

Are you sure you wish to proceed with --resync? [Y/N] y

Deleting the saved application sync status ...
Using IPv4 and IPv6 (if configured) for all network operations
Attempting to contact Microsoft OneDrive Login Service
Successfully reached Microsoft OneDrive Login Service
Configuring Global Azure AD Endpoints
BAD TIMESTAMP (REGEX FAIL): 2023-05-17T17:19:46.683Z
WARNING: Invalid timestamp provided by the Microsoft OneDrive API: 2023-05-17T17:19:46.683Z

Your command line input is missing either the '--sync' or '--monitor' switches. Please include one (but not both) of these switches in your command line, or refer to 'onedrive --help' for additional guidance.

It is important to note that you must include one of these two arguments in your command line for the application to perform a synchronisation with Microsoft OneDrive

Operating System Details

01:47:29 ❯❯ uname -a
Linux ubuntu9950x 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

01:48:01 ❯❯ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 24.04.1 LTS
Release:    24.04
Codename:   noble

### Client Installation Method

From Source

### OneDrive Account Type

Personal

### What is your OneDrive Application Version

2.5.1

### What is your OneDrive Application Configuration

```shell
D-Bus message bus daemon is available; GUI notifications are now enabled
Application version                          = onedrive v2.5.1
Compiled with                                = DMD 2109
User Application Config path                 = /home/username/.config/onedrive
System Application Config path               = /etc/onedrive
Applicable Application 'config' location     = /home/username/.config/onedrive/config
Configuration file found in config location  = false - using application defaults
Applicable 'sync_list' location              = /home/username/.config/onedrive/sync_list
Applicable 'items.sqlite3' location          = /home/username/.config/onedrive/items.sqlite3
Config option 'drive_id'                     = 
Config option 'sync_dir'                     = ~/OneDrive
Config option 'enable_logging'               = false
Config option 'log_dir'                      = /var/log/onedrive
Config option 'disable_notifications'        = false
Config option 'skip_dir'                     = 
Config option 'skip_dir_strict_match'        = false
Config option 'skip_file'                    = ~*|.~*|*.tmp|*.swp|*.partial
Config option 'skip_dotfiles'                = false
Config option 'skip_symlinks'                = false
Config option 'monitor_interval'             = 300
Config option 'monitor_log_frequency'        = 12
Config option 'monitor_fullscan_frequency'   = 12
Config option 'read_only_auth_scope'         = false
Config option 'dry_run'                      = false
Config option 'upload_only'                  = false
Config option 'download_only'                = false
Config option 'local_first'                  = false
Config option 'check_nosync'                 = false
Config option 'check_nomount'                = false
Config option 'resync'                       = false
Config option 'resync_auth'                  = false
Config option 'cleanup_local_files'          = false
Config option 'classify_as_big_delete'       = 1000
Config option 'disable_upload_validation'    = false
Config option 'disable_download_validation'  = false
Config option 'bypass_data_preservation'     = false
Config option 'no_remote_delete'             = false
Config option 'remove_source_files'          = false
Config option 'sync_dir_permissions'         = 700
Config option 'sync_file_permissions'        = 600
Config option 'space_reservation'            = 52428800
Config option 'application_id'               = d50ca740-c83f-4d1b-b616-12c519384f0c
Config option 'azure_ad_endpoint'            = 
Config option 'azure_tenant_id'              = 
Config option 'user_agent'                   = ISV|abraunegg|OneDrive Client for Linux/v2.5.1
Config option 'force_http_11'                = false
Config option 'debug_https'                  = false
Config option 'rate_limit'                   = 0
Config option 'operation_timeout'            = 3600
Config option 'dns_timeout'                  = 60
Config option 'connect_timeout'              = 10
Config option 'data_timeout'                 = 60
Config option 'ip_protocol_version'          = 0
Config option 'threads'                      = 8
Environment var 'XDG_RUNTIME_DIR'            = true
Environment var 'DBUS_SESSION_BUS_ADDRESS'   = true
Config option 'notify_file_actions'          = false

Selective sync 'sync_list' configured        = false

Config option 'sync_business_shared_items'   = false

Config option 'webhook_enabled'              = false

What is your 'curl' version

curl 8.10.1 (x86_64-pc-linux-gnu) libcurl/8.10.1 OpenSSL/3.3.2 zlib/1.3.1 brotli/1.1.0 zstd/1.5.6 libidn2/2.3.7 libssh2/1.11.0 nghttp2/1.63.0 librtmp/2.3 OpenLDAP/2.6.8
Release-Date: 2024-09-18
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd

Where is your 'sync_dir' located

Local

What are all your system 'mount points'

sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=49211420k,nr_inodes=12302855,mode=755,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=9849404k,mode=755,inode64)
/dev/nvme1n1p2 on / type ext4 (rw,relatime,errors=remount-ro)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k,inode64)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=32,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=32597)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,nosuid,nodev,relatime,pagesize=2M)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/qemu type tmpfs (rw,nosuid,nodev,relatime,mode=755,inode64)
/var/lib/snapd/snaps/bare_5.snap on /snap/bare/5 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/code_168.snap on /snap/code/168 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/code_169.snap on /snap/code/169 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/core18_2823.snap on /snap/core18/2823 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/core18_2829.snap on /snap/core18/2829 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/core20_2379.snap on /snap/core20/2379 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/core20_2318.snap on /snap/core20/2318 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/core22_1612.snap on /snap/core22/1612 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/core22_1621.snap on /snap/core22/1621 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/core24_490.snap on /snap/core24/490 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/core24_423.snap on /snap/core24/423 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/dbeaver-ce_322.snap on /snap/dbeaver-ce/322 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/dbeaver-ce_324.snap on /snap/dbeaver-ce/324 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/discord_208.snap on /snap/discord/208 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/discord_209.snap on /snap/discord/209 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/firmware-updater_127.snap on /snap/firmware-updater/127 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/gnome-3-34-1804_93.snap on /snap/gnome-3-34-1804/93 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/gnome-3-38-2004_143.snap on /snap/gnome-3-38-2004/143 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/gnome-42-2204_141.snap on /snap/gnome-42-2204/141 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/gnome-42-2204_176.snap on /snap/gnome-42-2204/176 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/gnome-46-2404_42.snap on /snap/gnome-46-2404/42 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/gnome-46-2404_48.snap on /snap/gnome-46-2404/48 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/mesa-2404_143.snap on /snap/mesa-2404/143 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/gtk-common-themes_1535.snap on /snap/gtk-common-themes/1535 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/mesa-2404_44.snap on /snap/mesa-2404/44 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/snap-store_1173.snap on /snap/snap-store/1173 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/snap-store_1218.snap on /snap/snap-store/1218 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/snapd_21465.snap on /snap/snapd/21465 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/snapd_21759.snap on /snap/snapd/21759 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/snapd-desktop-integration_157.snap on /snap/snapd-desktop-integration/157 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/snapd-desktop-integration_178.snap on /snap/snapd-desktop-integration/178 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/sublime-text_156.snap on /snap/sublime-text/156 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/sublime-text_177.snap on /snap/sublime-text/177 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide)
/dev/nvme0n1p1 on /data type ext4 (rw,nosuid,nodev,relatime,x-gvfs-show)
/dev/nvme1n1p1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=9849400k,nr_inodes=2462350,mode=700,uid=1000,gid=1000,inode64)
portal on /run/user/1000/doc type fuse.portal (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
tmpfs on /run/snapd/ns type tmpfs (rw,nosuid,nodev,noexec,relatime,size=9849404k,mode=755,inode64)
nsfs on /run/snapd/ns/snapd-desktop-integration.mnt type nsfs (rw)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)

What are all your local file system partition types

NAME        FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
loop0                                     0   100% /snap/code/168
loop1                                     0   100% /snap/bare/5
loop2                                     0   100% /snap/code/169
loop3                                     0   100% /snap/core18/2823
loop4                                     0   100% /snap/core18/2829
loop5                                     0   100% /snap/core20/2379
loop6                                     0   100% /snap/core20/2318
loop7                                     0   100% /snap/core22/1612
loop8                                     0   100% /snap/core22/1621
loop9                                     0   100% /snap/core24/423
loop10                                    0   100% /snap/core24/490
loop11                                    0   100% /snap/dbeaver-ce/322
loop12                                    0   100% /snap/dbeaver-ce/324
loop13                                    0   100% /snap/discord/208
loop14                                    0   100% /snap/discord/209
loop15                                    0   100% /snap/firmware-updater/127
loop16                                    0   100% /snap/gnome-3-34-1804/93
loop17                                    0   100% /snap/gnome-3-38-2004/143
loop18                                    0   100% /snap/gnome-42-2204/141
loop19                                    0   100% /snap/gnome-42-2204/176
loop20                                    0   100% /snap/gnome-46-2404/42
loop21                                    0   100% /snap/gnome-46-2404/48
loop22                                    0   100% /snap/gtk-common-themes/1535
loop23                                    0   100% /snap/mesa-2404/143
loop24                                    0   100% /snap/mesa-2404/44
loop25                                    0   100% /snap/snap-store/1173
loop26                                    0   100% /snap/snap-store/1218
loop27                                    0   100% /snap/snapd/21465
loop28                                    0   100% /snap/snapd/21759
loop29                                    0   100% /snap/snapd-desktop-integration/157
loop30                                    0   100% /snap/snapd-desktop-integration/178
loop31                                    0   100% /snap/sublime-text/156
loop32                                    0   100% /snap/sublime-text/177
nvme0n1                                            
└─nvme0n1p1                          890.1G     0% /data
nvme1n1                                            
├─nvme1n1p1                          504.8M     1% /boot/efi
└─nvme1n1p2                            3.3T     2% /

How do you use 'onedrive'

personal use, basic sync open files here and there for write, upload. Nothing complicated.

This was just an upgrade where the previous verison has been purged (including .config files)

Steps to reproduce the behaviour

1) onedrive --sync 2) sign in on browser 3) paste code from browser into terminal

Complete Verbose Log Output

01:52:29 ❯❯ onedrive --sync --verbose
No user or system config file found, using application defaults
Using 'user' configuration path for application config and state data: /home/username/.config/onedrive
D-Bus message bus daemon is available; GUI notifications are now enabled
Using IPv4 and IPv6 (if configured) for all network operations
Attempting to contact Microsoft OneDrive Login Service
Successfully reached Microsoft OneDrive Login Service
Checking Application Version ...
Attempting to initialise the OneDrive API ...
Configuring Global Azure AD Endpoints
The OneDrive API was initialised successfully
Opening the item database ...
BAD TIMESTAMP (REGEX FAIL): 2023-05-17T17:19:46.683Z
WARNING: Invalid timestamp provided by the Microsoft OneDrive API: 2023-05-17T17:19:46.683Z
Application Version:  onedrive v2.5.1
Account Type:         personal
Default Drive ID:     d9170f55dc8ec9ee
Default Root ID:      D9170F55DC8EC9EE!195
Remaining Free Space: 4.80 GB (5153960755 bytes)
Sync Engine Initialised with new Onedrive API instance
All application operations will be performed in the configured local 'sync_dir' directory: /home/username/OneDrive
Fetching /delta response from the OneDrive API for Drive ID: d9170f55dc8ec9ee
Processing API Response Bundle: 1 - Quantity of 'changes|items' in this bundle to process: 91
BAD TIMESTAMP (REGEX FAIL): 2024-09-27T05:52:31.3990349Z
Attempting to perform a database vacuum to optimise database
Database vacuum is complete
core.exception.AssertError@src/itemdb.d(725): The DB record mtime entry is not a valid ISO timestamp entry. Please attempt a --resync to fix the local database.
----------------
??:? _d_assert_msg [0x56a8394ff5b0]
??:? itemdb.Item itemdb.ItemDatabase.buildItem(sqlite.Statement.Result) [0x56a8394c5d02]
??:? bool itemdb.ItemDatabase.selectById(const(char)[], const(char)[], out itemdb.Item) [0x56a8394c3ade]
??:? void syncEngine.SyncEngine.processRootAndDeletedJSONItems(std.json.JSONValue, immutable(char)[], bool, bool, bool) [0x56a83948cb41]
??:? void syncEngine.SyncEngine.processDeltaJSONItem(std.json.JSONValue, ulong, int, ulong, bool) [0x56a83948c1b1]
??:? void syncEngine.SyncEngine.fetchOneDriveDeltaAPIResponse(immutable(char)[], immutable(char)[], immutable(char)[]) [0x56a83948a28b]
??:? void syncEngine.SyncEngine.syncOneDriveAccountToLocalDisk() [0x56a839487f8c]
??:? void main.performStandardSyncProcess(immutable(char)[], monitor.Monitor) [0x56a839343187]
??:? _Dmain [0x56a8393403a0]

Screenshots

No response

Other Log Information or Details

No response

Additional context

No response

nathannli commented 1 month ago

sorry please put this bug on hold. I think it may have to do with passwordless login...

abraunegg commented 1 month ago

So this is a bad regression with v2.5.1 due to #2813 fix.

Please use v2.5.0 to auth then upgrade.

I am in position to fix this until Monday 30th AEST

nathannli commented 1 month ago

sorry please put this bug on hold. I think it may have to do with passwordless login...

nothing to do with the passwordless login, same issue persists. Likely is the one you linked.

I couldn't get it to work using my previous authorization on 2.5.1, so going to sit on 2.5.0 for now. thanks for fast response. feel free to close the issue if it makes sense.

TickDracy commented 1 month ago

@abraunegg version 2.5.1 was working fine for me, but today Pop_Os! updated it to version v2.5.1 and I'm also getting the same error as OP.

I've downgraded it for now.

aagxxi commented 1 month ago

Microsoft started sending the ISO date with the fractional part of the second, which is missing in the REGEX that checks the date format.

See: https://github.com/abraunegg/onedrive/pull/2857

yea55 commented 1 month ago

I'm having the same issue here. The program just immediately enters a crash loop whenever I boot up either of my computers (both running mint 22). Log output is largely the same as what nathannli was seeing.

abraunegg commented 1 month ago

To all

I will be fixing this issue tomorrow when I am in a location where I have access to do so.

Please hold fire on any more commentary and or raising questions regarding this issue.

sdt16 commented 1 month ago

Just removing the regex checking timestamps is sufficient to fix this locally. SysTime.fromISOExtString will validate the format for you anyway. Here's a patch if anyone wants to fix it themselves before the official fix is available. No warranties :)

diff --git a/src/util.d b/src/util.d
index 3bfa707..f5868e9 100644
--- a/src/util.d
+++ b/src/util.d
@@ -535,12 +535,6 @@ bool isValidUTCDateTime(string dateTimeString) {
                addLogEntry("BAD TIMESTAMP (UTF-8 FAIL): " ~ dateTimeString);
                return false;
        }
-
-       // First, check if the string matches the pattern
-       if (!match(dateTimeString, pattern)) {
-               addLogEntry("BAD TIMESTAMP (REGEX FAIL): " ~ dateTimeString);
-               return false;
-       }

        // Attempt to parse the string into a DateTime object
        try {
abraunegg commented 1 month ago

@sdt16 This will be fixed tomorrow AEST as per my comment above ...

abraunegg commented 1 month ago

Fixed ahead of time due importance of fix