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

Oauth failed for googledrive when the app is installed from the Microsoft Store #13695

Closed
yokada-code opened this issue Aug 29, 2022 · 1 comment · Fixed by #13697
Closed
Assignees
Labels
bug googledrive Google Drive Protocol Implementation googlestorage Google Cloud Storage Protocol Implementation
Milestone

Comments

@yokada-code
Copy link

yokada-code commented Aug 29, 2022

Describe the bug

Cyberduck installed from Microsoft Store fails oauth process for googledrive authentication.

During the app waiting for the browser response about user authentication/authorization, the browser doesn't kick back to the app.
The authorization page is redirected to the google top page without displaying any dialogs.

This issue doesn't occur if the app is installed from the installer provided in the web ( https://cyberduck.io/download/ ).

I tried several times to reproduce this issue with the app installed from the Microsoft Store and the app from the web installer, and found that: if I installed it from the web installer, the following registry keys are created, but if I installed from the Microsoft Store, it isn't.

PS C:\> Get-Item -Path "HKCU:\Software\Classes\com.googleusercontent.apps.996125414232-30v0nuldk4p54spra0k6gg3b8c8c9kib"


    Hive: HKEY_CURRENT_USER\Software\Classes


Name                           Property
----                           --------
com.googleusercontent.apps.996 (default)    : custom handler
125414232-30v0nuldk4p54spra0k6 URL Protocol :
gg3b8c8c9kib

PS C:\> Get-ChildItem -Path "HKCU:\Software\Classes\com.googleusercontent.apps.996125414232-30v0nuldk4p54spra0k6gg3b8c8c9kib\shell\open"


    Hive: HKEY_CURRENT_USER\Software\Classes\com.googleusercontent.apps.996125414232-30v0nuldk4p54spra0k6gg3b8c8c9kib\shell\open


Name                           Property
----                           --------
command                        (default) : "C:\Program Files\Cyberduck\Cyberduck.exe" "%1"

I guess this registry key is necessary to work oauth properly.
This registry key is specified as oauth redirect url in the commit 9626cfc .

So, I tried to avoid this issue by creating such registry keys manually, and confirmed it works fine.
One thing I have to be careful is the installation path, there is a difference between the app installed from the Microsoft Store and from the installer.

To Reproduce

Install the cyberduck from Microsoft Store and try to connect to googledrive.

Note: If you have already installed the installer version previously, registry key may be remains. In that case, the browser try to open "custom handler" app in oauth process. But it won't work because the regisry key named "command" does not indicate the proper app path.

Expected behavior

Oauth succeed and files in the googledrive listed.

Screenshots

None

Desktop (please complete the following information):

  • Windows 11 21H2 22000.856
  • Google Chrome 104.0.5112.102
  • Cyberduck 8.4.3

Log Files

None

Additional context

None

@dkocher dkocher added googledrive Google Drive Protocol Implementation googlestorage Google Cloud Storage Protocol Implementation labels Aug 29, 2022
@dkocher dkocher added this to the 8.4.4 milestone Aug 29, 2022
@dkocher dkocher added the bug label Aug 29, 2022
@AliveDevil
Copy link
Contributor

AliveDevil commented Aug 29, 2022

Got it. We'll provide a quick fix within the next update, then a more rigid solution afterwards. Also relates to #13691, #13688.
The rigid solution will be part of #13476.

dkocher added a commit that referenced this issue Aug 31, 2022
… maximum of 32 characters in Windows Store. Fix #13695.

Signed-off-by: David Kocher <dkocher@iterate.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug googledrive Google Drive Protocol Implementation googlestorage Google Cloud Storage Protocol Implementation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants