Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why does it need a server in same domain? #18

Open
sbimochan opened this issue Mar 23, 2019 · 4 comments
Open

Why does it need a server in same domain? #18

sbimochan opened this issue Mar 23, 2019 · 4 comments

Comments

@sbimochan
Copy link

I'm building on a separate view. Communication with server using CORS. Google picker opens but gives Error "API Error" and in console "Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://docs.google.com') does not match the recipient window's origin ('http://localhost:3000')." I've whitelisted port 3000 in console.developers.google.com. May I know what other setting you had in google console? because your demo works fine.

@irfanlone
Copy link

@sdoomz @sbimochan Similar situation, were you able to find the answer to your question?

@sbimochan
Copy link
Author

Nope

@chitgoks
Copy link

i also get that error. localhost or remote and i already added both of the urls to the whitelist. im not sure what else is lacking here.

@jrgriffiniii
Copy link

I've been working with the Picker outside of the context of a React application, and encountered something very similar.

What I did to resolve the issue was configure a TLS reverse proxy in my localhost environment (please see https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/ and http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass - also note that I used a self-signed certificate for this in https://www.digitalocean.com/community/tutorials/openssl-essentials-working-with-ssl-certificates-private-keys-and-csrs)

I then needed to ensure that the Google Picker API was explicitly enabled for my app on console.developers.google.com: https://console.developers.google.com/apis/library/picker.googleapis.com?q=picker&id=09bbdd0e-d44b-4f13-b185-4f3ed6aa33d7&project=[MY-PROJECT]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants