Google drive picker error Google drive picker error angularjs angularjs

Google drive picker error


As some of the commentators have mentioned, the X-Frame-Option error is known bug in Chrome. You can see a long discussion about it here.

Now, for the real problem: origin matching. Google Drive does not play nice with localhost, with or without port, regardless of whether you add it to your origins in your permissions for your client id.

There is, however, hope. If you set up a domain in your hostfile to point to localhost, you can then add the domain to your origin in your Google App console, and everything works as expected!

I do this all the time in order to test my applications. For example:

  1. add dev.mysite.com to your hostfile (/etc/hosts in Mac).
  2. Replicate the domain in your permissions for your picker app in the Google App Console, and you should be good to go.
  3. Start your site using dev.mysite.com:80* and Drive Picker should now function correctly.

*Note: you must serve on port 80. Google does not play nice with ports at all, so when you go to your site, the address must be dev.mysite.com with no port.