bpozdena / OneDriveGUI

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

OneDriveGUI doesn't recognize OneDrive client when it's installed via HomeBrew #167

Open SarreqTeryx opened 3 months ago

SarreqTeryx commented 3 months ago

Describe the bug I'm using KDE Neon, so the repository version of OneDrive Client is only 2.4.13, but when installing 2.4.25 from HomeBrew, OneDriveGUI doesn't recognize that it is installed at all.

To Reproduce Steps to reproduce the behavior:

  1. Install OneDrive Client from HomeBrew: brew install onedrive
  2. Install OneDriveGUI via AppImage
  3. ...
  4. No Profit!

Expected behavior functionality

Screenshots Screenshot_20240413_172951

Log If applicable, add relevant output from log file /tmp/onedrive-gui/onedrive-gui.log.

2024-04-13 17:29:38,372 [OneDriveGUI.py:3122][fn=config_client_bin_path][INFO] - Onedrive client location: 'onedrive'
2024-04-13 17:29:38,411 [OneDriveGUI.py:2880][fn=get_installed_client_version][ERROR] - [GUI] Onedrive client not found!
2024-04-13 17:29:38,412 [OneDriveGUI.py:2883][fn=get_installed_client_version][DEBUG] - [GUI] Installed client version is 0
2024-04-13 17:29:38,417 [OneDriveGUI.py:2918][fn=create_global_config][DEBUG] - [GUI] - loading default config {'onedrive': {'sync_dir': '"~/OneDrive"', 'monitor_interval': '"300"', 'log_dir': '"/var/log/onedrive/"', 'drive_id': '""', 'upload_only': '"false"', 'check_nomount': '"false"', 'check_nosync': '"false"', 'download_only': '"false"', 'disable_notifications': '"false"', 'disable_upload_validation': '"false"', 'enable_logging': '"false"', 'force_http_11': '"false"', 'local_first': '"false"', 'no_remote_delete': '"false"', 'skip_symlinks': '"false"', 'debug_https': '"false"', 'skip_dotfiles': '"false"', 'dry_run': '"false"', 'min_notify_changes': '"5"', 'monitor_log_frequency': '"12"', 'monitor_fullscan_frequency': '"12"', 'sync_root_files': '"false"', 'classify_as_big_delete': '"1000"', 'user_agent': '""', 'remove_source_files': '"false"', 'skip_dir_strict_match': '"false"', 'application_id': '""', 'resync': '"false"', 'bypass_data_preservation': '"false"', 'azure_ad_endpoint': '""', 'azure_tenant_id': '"common"', 'sync_business_shared_items': '"false"', 'sync_dir_permissions': '"700"', 'sync_file_permissions': '"600"', 'rate_limit': '"125000000"', 'operation_timeout': '"3600"', 'webhook_enabled': '"false"', 'webhook_public_url': '""', 'webhook_listening_host': '""', 'webhook_listening_port': '"8888"', 'webhook_expiration_interval': '"86400"', 'webhook_renewal_interval': '"43200"', 'disable_download_validation': '"false"', 'connect_timeout': '"30"', 'data_timeout': '"240"', 'display_running_config': '"false"', 'ip_protocol_version': '"1"', 'threads': '"8"', 'skip_file': '"~*|.~*|*.tmp|*.swp|*.partial"', 'skip_dir': '""'}}
2024-04-13 17:29:38,418 [OneDriveGUI.py:2948][fn=create_global_config][DEBUG] - [GUI]{}
2024-04-13 17:29:40,018 [OneDriveGUI.py:3040][fn=main_window_start_state][INFO] - [GUI] Starting OneDriveGUI minimized to system tray
2024-04-13 17:29:40,562 [connectionpool.py:1055][fn=_new_conn][DEBUG] - Starting new HTTPS connection (1): api.github.com:443
2024-04-13 17:29:40,817 [connectionpool.py:549][fn=_make_request][DEBUG] - https://api.github.com:443 "GET /repos/abraunegg/onedrive/releases/latest HTTP/1.1" 200 1198
2024-04-13 17:29:40,834 [OneDriveGUI.py:2436][fn=client_version_check][ERROR] - Client version check failed: [Errno 2] No such file or directory: 'onedrive'
2024-04-13 17:29:45,018 [OneDriveGUI.py:92][fn=on_page_change][INFO] - Checking installed OneDrive version

System Info

OneDriveGUI info How did you install OneDriveGUI?: AppImage What is the name of the AppImage file (if applicable)? : both OneDriveGUI-1.0.3_fix150-x86_64.AppImage and OneDriveGUI-1.1.0rc1-x86_64.AppImage give the same error

bpozdena commented 3 months ago

You should install the Onedrive Client correctly according to the instructions from its project page.

Alternatively, specify the path to the Onedrive client binary manually in the OnedriveGUI settings.

SarreqTeryx commented 3 months ago

firstly, I did. the ubuntu repository's version is at 2.4.13, which throws the error that the minimum version necessary is 2.4.15, which is why I went with HomeBrew, which is also in the client's installation instructions from the project page. secondly, this error comes up before I can even get into the settings, and doesn't let me pass.

abraunegg commented 3 months ago

@SarreqTeryx

firstly, I did. the ubuntu repository's version is at 2.4.13, which throws the error that the minimum version necessary is 2.4.15, which is why I went with HomeBrew, which is also in the client's installation instructions from the project page. secondly, this error comes up before I can even get into the settings, and doesn't let me pass.

KDE neon is a Ubuntu-based Linux distribution - so you have not installed the client in the correct manner.

You should not install via the distribution provided packages as per the installation advice: https://github.com/abraunegg/onedrive/blob/master/docs/INSTALL.md

image

As you are using a Ubuntu based distribution, you must follow these instructions to correctly install the application on Ubuntu:

https://github.com/abraunegg/onedrive/blob/master/docs/ubuntu-package-install.md

slimhk45 commented 3 months ago

+1 @abraunegg

I have the same problem. I installed onedrive using HomeBrew on Bluefin (a Fedora Silverblue distro that uses Flatpak and Brew, more information here https://universal-blue.org/)

onedrivegui can't detect it.

abraunegg commented 3 months ago

@slimhk45 This is not something I can fix - sorry. @SarreqTeryx installed via HomeBrew because their chosen Ubuntu based distribution contains an old version, and did not follow the correct installation method. Had they done this, the application would have been correctly found.

Regardless of this, being able to search or specify where the 'onedrive' binary is, if it cannot be found at startup potentially needs to be done to accommodate HomeBrew installs.

@bpozdena Can you look into this issue a little deeper?

bpozdena commented 3 months ago

I'm not near PC to properly verify, but if I remember it right, you can only bypass the wizard in the 1.1 branch when 'onedrive --version' command does not work.

In the 1.0 branch, please specify the full path to onedrive binary under variable 'client_bin_path' inside of config file '~/.config/onedrive-gui/gui_settings' .