Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AppImage Crashes when login is required #37

Closed
mengzyou opened this issue Jun 10, 2022 · 4 comments
Closed

AppImage Crashes when login is required #37

mengzyou opened this issue Jun 10, 2022 · 4 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@mengzyou
Copy link

Description

Start the AppImage, following the wizard to add profile.
After click the "start" button of profile, the app crash with below logs

2022-06-10 20:17:35,324 - INFO - [mengzyou] Authorize this app visiting:
2022-06-10 20:17:35,324 - INFO - [mengzyou] 
2022-06-10 20:17:35,324 - INFO - [mengzyou] 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&prompt=login&redirect_uri=https://login.microsoftonline.com/common/oauth2/nativeclient
2022-06-10 20:17:35,324 - INFO - [mengzyou] 
Qt WebEngine resources not found at /tmp/.mount_OneDrioI1kkV/resources. Trying parent directory...
Qt WebEngine resources not found at /tmp/.mount_OneDrioI1kkV. Trying application directory...
Qt WebEngine resources not found at /tmp/.mount_OneDrioI1kkV/usr/bin. Trying fallback directory... The application MAY NOT work.
Path override failed for key base::DIR_QT_LIBRARY_DATA and path '/home/mengz/.OneDriveGUI'
Installed Qt WebEngine locales directory not found at location /tmp/.mount_OneDrioI1kkV/translations/qtwebengine_locales. Trying application directory...
Qt WebEngine locales directory not found at location /tmp/.mount_OneDrioI1kkV/usr/bin/qtwebengine_locales. Trying fallback directory... Translations MAY NOT not be correct.
Path override failed for key ui::DIR_LOCALES and path '/home/mengz/.OneDriveGUI'
[0610/201735.475630:ERROR:icu_util.cc(252)] Couldn't mmap icu data file

Other Info

  • App Version: OneDriveGUI-0.2.0-x86_64.AppImage
  • OneDrive Version: onedrive v2.4.18
  • OS: openSUSE Leap 15.4, KDE Plasma 5.24.4

Screenshoots

Issue-OneDriveGUI

@bpozdena
Copy link
Owner

Thanks for the detailed report. I'm aware of this issue with AppImage. Already self-reported under #30 , but I will keep your report open as you made it so nice.

I've already spent a few hours trying to resolve the missing dependency in AppImage, but I could not get it to work. I've found similar issues to occur with some keyboard layouts as well.

The issue is caused when the OneDrive client requires you to login. It should open the OneDrive website and allow you to login within the Qt WebEngine, but it fails.

I plan to implement more login options in the future, but I will not have time in the next few weeks.

There are two possible workarounds:

  • Run the OneDriveGUI manually from source (at least for the initial login). You can then use the AppImage again.

  • Perform the initial OneDrive login via CLI. Once you login, the GUI will start working just fine.

    1. Run the bellow command to initialize OneDrive client login (you may need to change the config directory):
      onedrive --confdir='~/.config/onedrive/accounts/mengzyou'
    2. Open the printed login URL and login to OneDrive website.
    3. Paste the response URL from your browser into the OneDrive CLI.
    4. Once you get a confirmation of successful login in the OneDrive CLI client, you can start your OneDriveGUI AppImage.

@bpozdena bpozdena self-assigned this Jun 10, 2022
@bpozdena bpozdena added the bug Something isn't working label Jun 10, 2022
@mengzyou
Copy link
Author

@bpozdena Thanks for your quick help, I run it successfully with the workaround.
THnaks again.

@bpozdena bpozdena changed the title App Crash when start AppImage Crashes when login is required Jul 24, 2022
@bpozdena
Copy link
Owner

I really can't figure it out. I've managed to ensure all dependencies and webengine resources are loaded, but then the chromium component appears to be crashing without any trace.

This is the furthest I got with:

version: 1
script:
  - rm -rf AppDir  | true
  - mkdir -p AppDir/usr
  - mkdir -p AppDir/usr/share/icons/hicolor/48x48
  - cp src AppDir/usr -r
  - cp src/resources/images/OneDriveGUI.png AppDir/usr/share/icons/hicolor/48x48
  - python3 -m pip install --ignore-installed --prefix=/usr --no-cache-dir --root=AppDir -r ./requirements.txt
  - cp AppDir/usr/lib/python3.8/site-packages/PySide6/Qt/resources AppDir/ -r
  - cp AppDir/usr/lib/python3.8/site-packages/PySide6/Qt/translations AppDir/ -r
  - cp AppDir/usr/lib/python3.8/site-packages/PySide6/Qt/ AppDir/ -r
  - cp qt.conf AppDir/usr/bin/

AppDir:
  path: ./AppDir

  app_info:
    id: io.github.bpozdena.OneDriveGUI
    name: OneDriveGUI
    icon: OneDriveGUI
    version: 0.2.3
    exec: usr/bin/python3
    exec_args: "$APPDIR/usr/src/OneDriveGUI.py $@"

  apt:
    arch: amd64
    sources:
      - sourceline: 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse'
        key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3b4fe6acc0b21f32'

    include:
      - python3
      - python3-pyside2.qtwebengine
    exclude: []

  runtime:
    env:
      PYTHONHOME: '${APPDIR}/usr'
      PYTHONPATH: '${APPDIR}/usr/lib/python3.8/site-packages'

AppImage:
#  update-information: gh-releases-zsync
  sign-key: None
  arch: x86_64
qt.webenginecontext: 

GLImplementation: desktop
Surface Type: OpenGL
Surface Profile: CompatibilityProfile
Surface Version: 4.6
Using Default SG Backend: yes
Using Software Dynamic GL: no
Using Angle: no

Init Parameters:
  *  application-name OneDriveGUI 
  *  browser-subprocess-path /tmp/.mount_OneDrilNF8Fj/usr/lib/python3.8/site-packages/PySide6/Qt/libexec/QtWebEngineProcess 
  *  create-default-gl-context  
  *  disable-features DnsOverHttpsUpgrade,ConsolidatedMovementXY,InstalledApp,BackgroundFetch,WebOTP,WebPayments,WebUSB,PictureInPicture 
  *  disable-setuid-sandbox  
  *  disable-speech-api  
  *  enable-features NetworkServiceInProcess,TracingServiceInProcess 
  *  enable-threaded-compositing  
  *  in-process-gpu  
  *  use-gl desktop 

free(): invalid pointer

As a workaround, I will just force appimage users login externally in browser.

@bpozdena bpozdena added the help wanted Extra attention is needed label Jul 30, 2022
@bpozdena
Copy link
Owner

AppImage users will now have to login externally in browser. The prompt looks like this:
image

Those running GUI from source/AUR will use QT WebEngine for login :
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants