0

Using the Google Drive/Picker API v3 for our webapp (c#)

Implemented via the example from their docs.

Works great the first time, but consecutive attempts fail.
What happens is, the auth dialog pops up, then disappears and no picker is displayed.

  • If the user is in a Chrome browser, they can logout via the dropdown on the upper right-hand side. Then click the Google Drive button, sign in again and the picker works fine.

  • If they user is not in a Chrome browser. Again it works just fine the first time. The next time, the auth dialog appears. It then disappears, but the picker dialog is never displayed again. In a different browser the user cannot logout of google, so they are unable to access the documents.

The lack of hits when googling this topic makes me feel like it is something I have done on my end, but the login is really bizzare, so I feel like there is more to it.

We have made sure no browser popups are effecting the flow.

Has anyone ran into this? Any advice. I keep walking through example implemenations, but I keep getting the same results.

BTW. I do not see this problem on my localhost.

J_sdev
  • 341
  • 1
  • 13
  • 1
    What do you mean by `the first time`? What actions happens between the first time and the `next time`? Could you please provide the relevant parts of the code you're working on? – Iamblichus Jul 08 '20 at 09:35
  • There really is no "relevent" part of the code, see the link to the documentation. I implemented it exactly as they have it there. The first time you use the API, it works perfectly as expected... Click a button, sign in, pick a file. The file gets uploaded. The second time, the authentication dialog (sign in) displays for a brief moment, then goes away... but the actual picker dialog is never displayed. So the user can no longer pick a file. Between the first and second time? The file is uploaded and the page gets refreshed. – J_sdev Jul 08 '20 at 15:02
  • For anyone else. I finally figured out the problem thanks to nvioli in this thread: https://stackoverflow.com/questions/50123733/google-drive-api-picker-v3-may-2018-window-disappears-and-gives-split-is-not – J_sdev Jul 08 '20 at 18:01
  • Needed to remove the `[]` in the scope variable – J_sdev Jul 08 '20 at 18:02

0 Answers0