These 3 errors are preventing me from using the Google Drive API. You think this would have been tested? I am using the default Picker example code. Nothing changed but my client_id and my developer Key.
1) .split is not a function.
2) API Developer Key is not valid (this is a repeat, I seen it posted many times)
The very first time I authenticate, the authentication works. But the next window displays "API Developer Key is not valid"
As mentioned here I removed the .setDeveloperKey(developerKey) and it then it random throws the ".split is not a function" error from above, or the popup_closed_by_user
3) If I do not get the "split is not a function error" I receive an error that the popup_closed_by_user
The current state of the Picker is not usable.
Please advise.
Having identical issues, albeit in a different order.
I was receiving API Developer Key is not valid first, and then I added the Google Identity scope, at which point I started receiving the (b || "").split is not a function error. Have not encountered the third error yet.
I'm developing in the current version of electron with ES6 and transpiling with Babel as well.
Any suggestions?
Edit: I'm not hitting all three cases. Seems completely random with the errors it's throwing out. I can change nothing and just reload and the error will change. Seems like the split error may have something to do with scopes though.
I figured it out for myself at least, make sure you have the "Google Picker API" API enabled and added to your API client

I am still getting this error even though I have the "Google Picker API" API enabled. Any other ideas or suggestions?
@digitalbart What scopes are you requesting?
@XanderLuciano I am using Drive.scope for Google team drives. I think however my issue maybe more closely related to this one: https://github.com/google/google-api-javascript-client/issues/409 but I am not 100% sure they seem very similar.
I was having the (b || "").split is not a function error, and tracked down (what seems so far to be) a solution in this thread:
https://github.com/google/google-api-javascript-client/issues/13#issuecomment-290129284
GSI v2 does not accept a list of scope, it has to be a comma-delimited string (e.g. 'scope1 scope2'). > Change to 'https://www.googleapis.com/auth/drive' instead of ['https://www.googleapis.com/auth/drive'] and it will work.
Note that he means space-delimited. I was having this problem using the analytics API, and indeed, changing scope: ['https://www.googleapis.com/auth/analytics.readonly'] to scope: 'https://www.googleapis.com/auth/analytics.readonly' appears to have solved it.
The 'popup_closed_by_user' error should be fixed now. See: https://github.com/google/google-api-javascript-client/issues/405
@nvioli Thank You! That little subtlety saved the day.
Most helpful comment
I was having the
(b || "").split is not a functionerror, and tracked down (what seems so far to be) a solution in this thread:https://github.com/google/google-api-javascript-client/issues/13#issuecomment-290129284
Note that he means space-delimited. I was having this problem using the analytics API, and indeed, changing
scope: ['https://www.googleapis.com/auth/analytics.readonly']toscope: 'https://www.googleapis.com/auth/analytics.readonly'appears to have solved it.