Closed elluminatte closed 6 years ago
@elluminatte I misunderstood your comment earlier, and mistook your issue for something else.
The issue you are experiencing is most likely due to some inconsistent configuration. Do you mind sharing what your config is like? You can mask out important credentials :)
@ifedapoolarewaju of course, this is my config:
UPPYSERVER_SECRET=blabla
UPPYSERVER_DOMAIN=images.nikolay.office.blabla.ru
UPPYSERVER_DATADIR=app/storage
UPPYSERVER_PROTOCOL=https
UPPYSERVER_GOOGLE_KEY=blabla.apps.googleusercontent.com
UPPYSERVER_GOOGLE_SECRET=blabla
UPPYSERVER_INSTAGRAM_KEY=blabla
UPPYSERVER_INSTAGRAM_SECRET=blabla
UPPYSERVER_OAUTH_DOMAIN=images.nikolay.office.blabla.ru
DOMAIN_UPPY=images.nikolay.office.blabla.ru
Please keep in mind that instagram provider works perfect, i'm facing issues only with Google Drive
If this issue is only with google drive then it is most likely you set the wrong redirect_uri on your google drive dashboard. Can you confirm if that’s the case?
Sent from my iPhone
On 2 Dec 2017, at 2:38 PM, Salov Nikolay notifications@github.com wrote:
@ifedapoolarewaju of course, this is my config:
UPPYSERVER_SECRET=blabla UPPYSERVER_DOMAIN=images.nikolay.office.optimuspro.ru UPPYSERVER_DATADIR=app/storage
UPPYSERVER_PROTOCOL=https
UPPYSERVER_GOOGLE_KEY=blabla.apps.googleusercontent.com UPPYSERVER_GOOGLE_SECRET=blabla
UPPYSERVER_INSTAGRAM_KEY=blabla UPPYSERVER_INSTAGRAM_SECRET=blabla
UPPYSERVER_OAUTH_DOMAIN=images.nikolay.office.optimuspro.ru
DOMAIN_UPPY=images.nikolay.office.optimuspro.ru Please keep in mind that instagram provider works perfect, i'm facing issues only with Google Drive
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
@ifedapoolarewaju but i don't specify the redirect_uri in API console. i only specify the authorized URIs list. I've added the URI, that is generated by uppy server in this list. So i think that redirect uri is controlled by uppy-server, am i wrong?
@ifedapoolarewaju i see this string in library test file (test/tests/provider-manager.js):
_expect(grantConfig.google.redirecturi).toBe('http://domain.com/google/redirect')
This is the URI, that i see in browser address string, then i think that it's not really Drive Dashboard tuning issue.
I am currently responding from my mobile so I’m unable to do much, one suggestion would be to drop the UPPYSERVER_OAUTH_DOMAIN config if you don't have multiple instances of your server running.
Perhaps there’s a bug somewhere in the Multiple instance redirect channeling for google drive (I can’t confirm till I get to my machine) but I know for sure that it works right for single instance setting.
So simply drop the UPPYSERVER_OAUTH_DOMAIN config and see if it works
Sent from my iPhone
On 2 Dec 2017, at 2:57 PM, Salov Nikolay notifications@github.com wrote:
@ifedapoolarewaju i see this string in library test file (test/tests/provider-manager.js):
expect(grantConfig.google.redirect_uri).toBe('http://domain.com/google/redirect')
This is the URI, that i see in browser address string, then i think that it's not really Drive Dashboard tuning issue.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
LOL i've just figured out the same issue.
There are these lines in src/server/provider/index.js file:
if (oauthDomain) {
grantConfig[providerName].redirect_uri = `${server.protocol}://${oauthDomain}/${providerName}/redirect`
}
Then redirectUrl becomes https://blabla/google/redirect, and uppy tries to find google provider, while it should be drive.
I've temporary removed UPPYSERVER_OAUTH_DOMAIN setting, described issue has been resolved. But now nothing happens after auth - i login with google account, then i was redirected to my site but button on Uppy Dashboard says "PLEASE AUTHENTICATE WITH GOOGLE DRIVE TO SELECT FILES". Again and again... No errors in console or in docker log.
Could you check that Google Drive provider really works with latest uppy-server release?
Does instagram work with this change?
Sent from my iPhone
On 2 Dec 2017, at 3:17 PM, Salov Nikolay notifications@github.com wrote:
LOL i've just figured out the same issue.
There are these lines in src/server/provider/index.js file:
if (oauthDomain) { grantConfig[providerName].redirect_uri =
${server.protocol}://${oauthDomain}/${providerName}/redirect
} Then redirectUrl becomes https://blabla/google/redirect, and uppy tries to find google provider, while it should be drive.I've temporary removed UPPYSERVER_OAUTH_DOMAIN setting, described issue has been resolved. But now nothing happens after auth - i login with google account, then i was redirected to my site but button on Uppy Dashboard says "PLEASE AUTHENTICATE WITH GOOGLE DRIVE TO SELECT FILES". Again and again... No errors in console or in docker log.
Could you check that Google Drive provider really works with latest uppy-server release?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
@ifedapoolarewaju yep. Instagram still works properly
Ok, my hands are a bit tied right now, let me suggest a more reasonable solution in a couple hours when I get back to my machine.
Is that ok?
Sent from my iPhone
On 2 Dec 2017, at 3:29 PM, Salov Nikolay notifications@github.com wrote:
@ifedapoolarewaju yep. Instagram still works properly
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
@ifedapoolarewaju no problem! This is opensource project anyway lol. Thank you!
@elluminatte did you make any progress with this? I can confirm that the GoogleDrive provider is working fine as at the last release. Maybe there's still something up with your configuration? Did you restart the docker instance after updating the config?
PS. This difficulty in debugging would no longer be so by the next release, as I have added a debug
flag functionality, that would help one get more detailed logs on every level/layer the server routing process passes through.
@ifedapoolarewaju hi have not figured out anything new. looks like google authorization finishes successfully, but uppy doesnt see auth state - after auth with google dashboard says: "PLEASE AUTHENTICATE WITH GOOGLE DRIVE TO SELECT FILES". If i click button, i'm being immediately redirected to site (so i think auth is completed). Again and again. May be reason is related with Uppy frontend code? I'm using bundled version from your CDN
@ifedapoolarewaju this is network log - Demo on your site VS uppy on my site. I see requesting /drive/root in demo, vs 3 ones of /authorize on my site
@elluminatte I am unable to reproduce this issue on my end, since instagram provider works for you, this is most likely an issue with your google provider set up.
Can you confirm you have a URL of the form <protocol>://<yourhost>/connect/google/callback
as authorized url on your google api console?
This is usually what you would set if you are not making use of the UPPYSERVER_OAUTH_DOMAIN
option
@ifedapoolarewaju hi. yes, URL is confirmed in console of course
Hmm, now I'm running out of ideas, what version of the uppy client are you running?
@ifedapoolarewaju i'm using latest v 0.21.0
@ifedapoolarewaju this was not really uppy issue. I've added console.log(err) in server/controllers/authorized.js, then i've seen the error reason: "Access Not Configured. Drive API has not been used in project xxxx before or it is disabled". So after enabling it works OK.
Anyway could you please implement error loging for similar situations in future - as we have seen it's very hard to debug
Hi there
Looks like Google Drive integration doesnt work properly in standalone mode.
Preconditions:
Expected result:
Actual result:
So please fix this or tell me what am i doing wrong.
Regards, Nikolay