bpozdena / OneDriveGUI

A simple GUI for OneDrive Linux client with multi-account support.
GNU General Public License v3.0
706 stars 33 forks source link

Get Business Shared Folders only works after stopping the sync #86

Closed d-vogel closed 1 year ago

d-vogel commented 1 year ago

Hey, thanks for the great work ! I just spend quite a bit of time figuring out why querying shared folders did not work for me. The log file was outputting an error because onedrive is already running. After stopping the sync, querying the folders worked.

Maybe it's possible to make that automatic? Stopping the sync for the account asked for the shared folders and resuming once result query is received?

bpozdena commented 1 year ago

Isn't it possible that you have some old version of Onedrive client installed? Please try with client version 2.4.23 and let me know.

abraunegg commented 1 year ago

@d-vogel

The log file was outputting an error because onedrive is already running ... After stopping the sync, querying the folders worked.

It sounds like you might be hit with this issue: https://github.com/abraunegg/onedrive/issues/1274 where older Ubuntu | Debian packages would install a service that caused the application to automatically run in the background.

The fix for this is detailed here: https://github.com/abraunegg/onedrive/issues/1274#issuecomment-813846904

bpozdena commented 1 year ago

@abraunegg , I originally suspected it was caused by https://github.com/abraunegg/onedrive/issues/2106 . I actually opened it because I faced the same issues when I was implementing the Shared folders in the GUI :-) .

Either way, this seems like yet another issue caused by an outdated package.

Hopefully @d-vogel can confirm soon.

21347 commented 1 year ago

I'm sorry to "re-open" (though I cannot do that actually), but I found this issue because I just tried the exact same thing: get a list of shared (business, SharePoint) folders and enable sync for them.

$: onedrive --version
onedrive v2.4.25-1+np1

(installed following the instructions for Linux Mint 21.x)

OneDriveGUI: Version 1.0.2 (just downloaded from the release page).

Clicking "Get Shared Folder" shows nothing, the log mentions the following:

2023-08-04 13:05:16,068 [OneDriveGUI.py:1838][fn=__init__][DEBUG] - [GUI] Maintenance command: 'exec onedrive --confdir='/home/<account>/.config/onedrive/accounts/<account>' -v --list-shared-folders --resync --resync-auth'
2023-08-04 13:05:16,068 [OneDriveGUI.py:1841][fn=run][DEBUG] - [GUI] Starting Maintenance Worker
2023-08-04 13:05:16,074 [OneDriveGUI.py:1985][fn=read_shared_business_folders][INFO] - [MaintenanceWorker][<account>] Using 'user' Config Dir: /home/<account>/.config/onedrive/accounts/<account>
2023-08-04 13:05:16,075 [OneDriveGUI.py:1990][fn=read_shared_business_folders][ERROR] - @ERROR ERROR: onedrive application is already running - check system process list for active application instances

2023-08-04 13:05:16,075 [OneDriveGUI.py:1985][fn=read_shared_business_folders][INFO] - [MaintenanceWorker][<account>] Using config option for Global Azure AD Endpoints
2023-08-04 13:05:16,076 [OneDriveGUI.py:1985][fn=read_shared_business_folders][INFO] - [MaintenanceWorker][<account>] Configuration file successfully loaded
2023-08-04 13:05:16,076 [OneDriveGUI.py:1985][fn=read_shared_business_folders][INFO] - [MaintenanceWorker][<account>] Using dry-run database copy for OneDrive API query
2023-08-04 13:05:16,076 [OneDriveGUI.py:1985][fn=read_shared_business_folders][INFO] - [MaintenanceWorker][<account>] Using logfile dir: /var/log/onedrive/
2023-08-04 13:05:16,076 [OneDriveGUI.py:1985][fn=read_shared_business_folders][INFO] - [MaintenanceWorker][<account>] - Use 'sudo ps aufxw | grep onedrive' to potentially determine acive running process

Interestingly, if I execute onedrive --confdir='/home/<account>/.config/onedrive/accounts/<account>' -v --list-shared-folders just to see a list of folders (without --resync etc.), I get them listed to the terminal.

Also, the fix linked in https://github.com/bpozdena/OneDriveGUI/issues/86#issuecomment-1466848235 does not help, the file in question does not exist (and it should not, if I understand the version history correctly).

Not sure what I did wrong :-) Still, stopping Sync, listing, starting sync works flawlessly...

abraunegg commented 1 year ago

@21347 , @bpozdena

2023-08-04 13:05:16,068 [OneDriveGUI.py:1838][fn=__init__][DEBUG] - [GUI] Maintenance command: 'exec onedrive -->confdir='/home/<account>/.config/onedrive/accounts/<account>' -v --list-shared-folders --resync --resync-auth'

This command is wrong.

You should never be trying to perform a --resync --resync-auth when trying to --list-shared-folders

21347 commented 1 year ago

I just check - listing shared folders now works from within the GUI without stopping sync. Nice!

bpozdena commented 1 year ago

Fixed in AppImage v1.0.3