abraunegg / onedrive

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

Following upgrade to 2.4 unable to start dbus unavailable (was working) #892

Closed IanBlakeley closed 4 years ago

IanBlakeley commented 4 years ago

Upgraded to 2.4 a couple of days ago, after the upgrade was working and files were syncing, noticed yesterday evening on another device that files had not synced to my onedrive account on checking this morning saw the service did not start.

Apr 26 07:58:40 bilbo2 systemd[1]: Started OneDrive Free Client for ian.
Apr 26 07:58:40 bilbo2 onedrive[18619]: Notification (dbus) server not available, disabling
Apr 26 07:58:42 bilbo2 onedrive[18619]: ERROR: OneDrive returned an error with the following message:
Apr 26 07:58:42 bilbo2 onedrive[18619]:   Error Message: HTTP request returned status code 400 (Bad Request)
Apr 26 07:58:42 bilbo2 onedrive[18619]:   Error Reason:  AADSTS70000: The provided value for the input parameter 'refresh_token' or 'assertion' is not valid. The token was issued f
Apr 26 07:58:42 bilbo2 onedrive[18619]: Trace ID: afdfa155-7b57-4577-82ae-aec87dae1900
Apr 26 07:58:42 bilbo2 onedrive[18619]: Correlation ID: de450d3d-bc5c-4cf8-a7f2-97295f55ce37
Apr 26 07:58:42 bilbo2 onedrive[18619]: Timestamp: 2020-04-25 23:58:42Z
Apr 26 07:58:43 bilbo2 systemd[1]: Stopping OneDrive Free Client for ian...
Apr 26 07:58:43 bilbo2 systemd[1]: Stopped OneDrive Free Client for ian.

Saw the note here about reauthorising the client so did that but still seems same, could not authorise uri

Apr 26 08:06:51 bilbo2 systemd[1]: Started OneDrive Free Client for ian.
Apr 26 08:06:51 bilbo2 onedrive[20280]: Notification (dbus) server not available, disabling
Apr 26 08:06:52 bilbo2 onedrive[20280]: Authorize this app visiting:
Apr 26 08:06:52 bilbo2 onedrive[20280]: https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=d50ca740-c83f-4d1b-b616-12c519384f0c&scope=Files.ReadWrite%20Files.
Apr 26 08:06:52 bilbo2 onedrive[20280]: Enter the response uri: Invalid uri
Apr 26 08:06:52 bilbo2 onedrive[20280]: Could not initialize the OneDrive API
Apr 26 08:06:52 bilbo2 systemd[1]: onedrive@ian.service: Main process exited, code=exited, status=3/NOTIMPLEMENTED
Apr 26 08:06:52 bilbo2 systemd[1]: onedrive@ian.service: Failed with result 'exit-code'.

Then I recompiled and reinstalled , now a different error is seen

Apr 26 08:28:33 bilbo2 onedrive[24156]: Could not initialize the OneDrive API
Apr 26 08:28:33 bilbo2 systemd[3404]: onedrive.service: Main process exited, code=exited, status=3/NOTIMPLEMENTED
Apr 26 08:28:33 bilbo2 systemd[3404]: onedrive.service: Failed with result 'exit-code'.
Apr 26 08:58:14 bilbo2 systemd[3404]: Started OneDrive Free Client.
Apr 26 08:58:16 bilbo2 onedrive[28045]: Authorize this app visiting:
Apr 26 08:58:16 bilbo2 onedrive[28045]: https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=d50ca740-c83f-4d1b-b616-12c519384f0c&scope=Files.ReadWrite%20Files.ReadWrite.all%20Sites.Read.All%20Sites.ReadWrite.All%20offline_access&response_type=code&redirect_uri=https://login.microsoftonline.com/common/oauth2/nativeclient
Apr 26 08:58:16 bilbo2 onedrive[28045]: Enter the response uri: Invalid uri
Apr 26 08:58:16 bilbo2 onedrive[28045]: Could not initialize the OneDrive API
Apr 26 08:58:16 bilbo2 systemd[3404]: onedrive.service: Main process exited, code=exited, status=3/NOTIMPLEMENTED
Apr 26 08:58:16 bilbo2 systemd[3404]: onedrive.service: Failed with result 'exit-code'.

Running Mint 19.3 desktop, onedrive personal account

Linux bilbo2 4.15.0-96-generic #97-Ubuntu SMP Wed Apr 1 03:25:46 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
DMD64 D Compiler v2.091.0
Copyright (C) 1999-2020 by The D Language Foundation, All Rights Reserved written by Walter Bright

config

onedrive version                       = v2.4.0
Config path                            = /home/ian/.config/onedrive
Config file found in config path       = true
Config option 'check_nosync'           = false
Config option 'sync_dir'               = /home/ian/OneDrive.Bilbo
Config option 'skip_dir'               = 
Config option 'skip_file'              = ~*|.~*|*.tmp
Config option 'skip_dotfiles'          = false
Config option 'skip_symlinks'          = false
Config option 'monitor_interval'       = 45
Config option 'min_notify_changes'     = 5
Config option 'log_dir'                = /var/log/onedrive/
Config option 'classify_as_big_delete' = 1000
Config option 'sync_root_files'        = false
Selective sync configured              = false

curl

Release-Date: 2018-01-24
abraunegg commented 4 years ago

@IanBlakeley When performing the re-auth, you need to ensure that all application processes / services are stopped before performing the re-auth. From the above, it appears that this may have not been done.

Please can you re-validate that you have performed the correct re-auth process.

onedrive --verbose --logout

Once you have confirmed that the re-auth is working as per:

onedrive --synchronize --verbose

then you can re-enable your service files that were previously running and check that correct operation is now occurring.

RE: seeing another error ... most likely the service files / application were still running when you performed the re-compile / re-install. Again, make sure no application is running / service file is running when you perform the upgrade

RE: Notification (dbus) server not available, disabling - make sure when you are compiling, to enable to use notifications and start the service in the correct sequence to allow the notifications to be sent to the desktop.

abraunegg commented 4 years ago

@IanBlakeley And to confirm that this is not an issue:

[alex@centos7full onedrive]$ ./onedrive --confdir '~/.config/onedrive-personal/' --verbose --verbose --logout
[DEBUG] homePath: HOME environment variable set
[DEBUG] homePath: /home/alex
[DEBUG] configDirName: CLI override to set configDirName to: ~/.config/onedrive-personal/
[DEBUG] configDirName: A '~' was found in configDirName, using the calculated 'homePath' to replace '~'
Using Config Dir: /home/alex/.config/onedrive-personal/
[DEBUG] sync_dir: Getting syncDir from config value sync_dir
[DEBUG] sync_dir: A '~' was found in configured sync_dir, automatically expanding as SHELL and USER environment variable is set
[DEBUG] syncDir: /home/alex/OneDrivePersonal
Deleting the saved status ...
[DEBUG] --logout requested
[DEBUG] Testing network to ensure network connectivity to Microsoft OneDrive Service
Initializing the OneDrive API ...
[DEBUG] Downgrading all HTTP operations to HTTP/1.1 by default
[DEBUG] clientId    = d50ca740-c83f-4d1b-b616-12c519384f0c
[DEBUG] companyName = abraunegg
[DEBUG] appTitle    = OneDrive Client for Linux
Authorize this app visiting:

https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=d50ca740-c83f-4d1b-b616-12c519384f0c&scope=Files.ReadWrite%20Files.ReadWrite.all%20Sites.Read.All%20Sites.ReadWrite.All%20offline_access&response_type=code&redirect_uri=https://login.microsoftonline.com/common/oauth2/nativeclient

Enter the response uri: <redacted>

Application has been successfully authorised, however no additional command switches were provided.

Please use --help for further assistance in regards to running this application.

[alex@centos7full onedrive]$
IanBlakeley commented 4 years ago

Thanks for the quick and detailed response.

I'd recompiled without notifications, last time for the upgrade was the first time I chose that option. I did think I had stopped everything but perhaps not. So repeated again after the 2nd time running okay now.

lock[bot] commented 4 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] commented 4 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] commented 4 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.