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

Issues with GoogleDrivePicker and GooglePhotosPicker in Uppy #5577

Closed
2 tasks done
nermineslimane opened this issue Jan 7, 2025 · 13 comments
Closed
2 tasks done

Issues with GoogleDrivePicker and GooglePhotosPicker in Uppy #5577

nermineslimane opened this issue Jan 7, 2025 · 13 comments
Assignees
Labels

Comments

@nermineslimane
Copy link

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

Import GoogleDrivePicker from @uppy/google-drive-picker.
Use the following configuration in your Uppy instance:
javascript

import GoogleDrivePicker from '@uppy/google-drive-picker';

uppyInstance.use(GoogleDrivePicker, {
    companionUrl: 'http://localhost:8010',
    clientId: 'Google client ID',
    apiKey: 'Google API key',
    appId: 'Google App ID',
});

Attempt to pick or upload a file using the Google Drive picker.

Expected behavior

The file picker should allow me to select a file from Google Drive or Google Photos and successfully upload it without any errors.

Actual behavior

Encounter a 404 error on /google-picker/get when attempting to upload a file.
The error message Unknown RPC service: picker appears when trying to pick a file.
None of the configured providers (google-picker, google, or googlePicker) function as expected.

@Murderlon
Copy link
Member

Are you on the latest version of companion?

@nermineslimane
Copy link
Author

Yes, "@uppy/companion": "^5.4.0"

@mifi
Copy link
Contributor

mifi commented Jan 8, 2025

are you using the latest version of uppy picker plugin? could it be #5532 (comment) ?

@refkagn
Copy link

refkagn commented Jan 8, 2025

I used the latest versions of both companion and @uppy/google-drive-picker (^0.3.0). The appId is correctly configured from the Google Cloud Console, but I keep getting the error: Cannot POST /google-picker/get.

@mifi
Copy link
Contributor

mifi commented Jan 8, 2025

So you're using project number (not project name) from Google Console as app id?

@refkagn
Copy link

refkagn commented Jan 8, 2025

yes I'm using project number

@mifi
Copy link
Contributor

mifi commented Jan 8, 2025

is it the same problem in all browsers? (chrome/safari etc)
could it be something wrong with authorized javascript origins? https://stackoverflow.com/a/10873072/6519037

@refkagn
Copy link

refkagn commented Jan 8, 2025

same in all browsers

@refkagn
Copy link

refkagn commented Jan 8, 2025

The idea was to enable the Google Drive Picker in the Companion server by setting the enableGooglePickerEndpoint property to true. Thank you all for your help and support!

@mifi
Copy link
Contributor

mifi commented Jan 9, 2025

@nermineslimane can you try the above suggestions too?

@theahmedmuneeb
Copy link

I am also facing issue similar to this. How can I solve it?
Whenever I try to upload from Drive it shows this error.
@mifi

image
Screenshot from 2025-01-15 12-31-25

@mifi
Copy link
Contributor

mifi commented Jan 30, 2025

@theahmedmuneeb please make sure you've double checked 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
Copy link
Contributor

mifi commented Feb 4, 2025

closing this, because I think we have ironed out all these issues now

@mifi mifi closed this as completed Feb 4, 2025
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

5 participants