node-asana
node-asana copied to clipboard
CORS request rejected v0.13.0 on accessing Projects
Hi,
Getting the following error on accessing workspaces
, "Only for some users".
asana.js:4776 Unhandled rejection Error: CORS request rejected: https://app.asana.com/api/1.0/workspaces?limit=50 at on_response (http://176.9.35.233:8080/asana/asana.js:8971:22) at XMLHttpRequest.on_state_change (http://176.9.35.233:8080/asana/asana.js:8954:7)
Browser: Chrome 46 (Incognito mode with No extension)
With one user, everything works just fine and the workspaces, tasks are being pulled. But with another user, CORS rejection always happen.
Thanks for reporting this issue. I'm having difficulty reproducing this, and also wondering why CORS has anything to do with which user would be involved. But hey, strange things happen.
Can you provide some more detail about the differences between the users? Are you using the same authentication mechanism for each? Is it Oauth, API Key, or Personal Access Token? Does one of them have more than 50 workspaces somehow, so the request you're making ends up paginating? Is the request always served from javascript inside a page served on that origin (your IP and port)?
Note, this is a public forum, so please don't put any personal or confidential information (including user IDs) in your response. If you end up needing to provide us data to help debug this, we should communicate via [email protected].
Hi,
Thanks for the response :+1:
- I am using the same login mechanism for all users (OAuth)
- Not sure if the user's having the issue is having 50+ workspaces. Will check with them and revert.
Tried this fix @ https://gist.github.com/agnoster/6e38a1c595102e892381 (Though, It seems outdated)
My App is hosted @ http://176.9.35.233/asana/index.html
The code is very simple and the core logic lies in http://176.9.35.233/asana/logic.js
I will get more details from the user, who is having the issue and revert here.