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

GoogleDrivePicker plugin - after popup closes cannot proceed. #5625

Open
2 tasks done
Tracked by #5532
Fingel opened this issue Jan 27, 2025 · 5 comments
Open
2 tasks done
Tracked by #5532

GoogleDrivePicker plugin - after popup closes cannot proceed. #5625

Fingel opened this issue Jan 27, 2025 · 5 comments
Labels

Comments

@Fingel
Copy link

Fingel commented Jan 27, 2025

Initial checklist

  • I understand this is a bug report and questions should be posted in the Community Forum
  • I searched issues and couldn’t find anything (or linked relevant results below)

Link to runnable example

No response

Steps to reproduce

I'm having a hard time creating a reproducible example without pasting my API keys everywhere.

I am using Uppy with Transloadit hosted companion, trying to get the GoogleDrivePicker plugin working. Here is how it is set up:

.use(GoogleDrivePicker, {
      companionUrl: 'https://api2.transloadit.com/companion',
      clientId: '<CLIENT ID>',
      apiKey: '<GOOGLE APP KEY>',
      appId: '<APP ID>',
    })

It doesn't seem like any other configuration is required. I've double a triple checked all the provided keys and ids.

When clicking on google drive, the Google Oauth window pops up. Once authorized, the popup displays "please wait" with a google spinner, then closes immediately. Nothing occurs back on the Uppy dashboard. Nothing is printed to the console, no network requests, etc. Very tough to debug. The "sign in with google" button remains visible.

Occurs on both Chrome and Firefox.

Uppy is being loaded via the CDN (for testing purposes):

import {
  Uppy,
  Dashboard,
  RemoteSources,
  StatusBar,
  Transloadit,
  GoogleDrivePicker,
} from 'https://releases.transloadit.com/uppy/v4.13.0/uppy.min.mjs'

Please let me know if there is any way I can debug this or other details I can provide.

Expected behavior

I would expect something to occur when the plugin is authorized (obtains an Oauth key from google?) but nothing happens.

Actual behavior

Nothing.

@Fingel Fingel added the Bug label Jan 27, 2025
@mifi
Copy link
Contributor

mifi commented Jan 27, 2025

Hi, not sure if it's the reason but you seem to be missing some options for the plugin. Have you checked the official docs? https://uppy.io/docs/google-drive-picker/#use-with-transloadit

@Fingel
Copy link
Author

Fingel commented Jan 27, 2025

Are you referring to companionAllowedHosts? I’m not hosting companion on multiple hosts (I am using transloadit) so the default should be fine.

@mifi
Copy link
Contributor

mifi commented Jan 28, 2025

Yes talking about that option. Not sure what you mean by not hosting companion on multiple hosts, but AFAIK if you're using Transloadit's companion you need to use the provided option, because Transloadit hosts Companion on multiple hosts.

@Fingel
Copy link
Author

Fingel commented Jan 28, 2025

Even with compainAllowedHosts set explicitly, there is no change in behavior.

@mifi
Copy link
Contributor

mifi commented Jan 30, 2025

Could you double check all the following in the Google Developer Console settings:

  • Some users reported that both Google (Drive) Picker API and Google Drive API must be enabled.
  • Make sure appId is set to the project number (not project ID or project name), see Uppy docs
  • Check your API key:
    • Application restrictions: Websites
    • Website restrictions: Add the base URL of the domain name you're hosting the frontend web app on, example: https://example.com. Note that if you're testing locally you need to add http://localhost:local_port or similar
    • API restrictions: Restrict key: Tick "Google Picker API"
    • Click "Show key" and confirm it's the same as the apiKey argument to Uppy.
  • Check your OAuth 2.0 Client IDs:
    • Double check that Client ID matches your Uppy clientId
    • Authorized JavaScript origins: Add the base URL of the domain name you're hosting the frontend web app on, example: https://example.com. Note that if you're testing locally you need to add http://localhost:local_port or similar

@mifi mifi mentioned this issue Jan 30, 2025
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants