Search code examples
javascriptgoogle-drive-realtime-api

Google Drive API cross-origin frame error


I'm following the documentation here to run the sample javascript app. I set my clientId and upload the two files to my server, but when I go to the index.html page I get this error in my developer tools console:

Error in event handler for (unknown): Blocked a frame with origin     "https://accounts.google.com" from accessing a cross-origin frame.
Stack trace: Error: Blocked a frame with origin "https://accounts.google.com" from accessing a cross-origin frame.
at Error (native)
at setupffoverrides (chrome-extension://hdokiejnpimakedhajhdlcegeplioahd/onloadwff.js:151:86)
at checkgenpwfillforms (chrome-extension://hdokiejnpimakedhajhdlcegeplioahd/onloadwff.js:152:33)
at receiveBG (chrome-extension://hdokiejnpimakedhajhdlcegeplioahd/onloadwff.js:130:210)
at Function.target.(anonymous function) (extensions::SafeBuiltins:19:14)
at EventImpl.dispatchToListener (extensions::event_bindings:395:22)
at Function.target.(anonymous function) (extensions::SafeBuiltins:19:14)
at publicClass.(anonymous function) [as dispatchToListener] (extensions::utils:69:26)
at EventImpl.dispatch_ (extensions::event_bindings:378:35)
at EventImpl.dispatch (extensions::event_bindings:401:17) 

Furthermore, when I click the "you must authorize" button I get a dialog box with this error:

401. That’s an error.
Error: invalid_client
No registered origin

How do I set the origin? I've looked in the API console but can't find anything in the settings.


Solution

  • That error is coming from the LastPass extension. If you disable the extension (or test in incognito), you won't get that error. See: