-
Notifications
You must be signed in to change notification settings - Fork 1.5k
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
CORS Authentication Errors for OPTIONS on iOS. #4633
Comments
What version of CouchDB? I'm on 1.6.0 and seeing a similar issue, I believe it's related to https://issues.apache.org/jira/browse/COUCHDB-2027. Would love to know if there's a workaround. EDIT: |
Definitely looks like a CORs error, double check http://pouchdb.com/errors.html#no_access_control_allow_origin_header For convenience you can try https://github.com/pouchdb/add-cors-to-couchdb Hopefully this helps, let me know 👍 |
We tried downgrading to Pouch 3.6.0 and do not receive these errors. We've allowed CORS support with add-cors-to-couchdb from the beginning. Android is syncing from the exact same database, with the exact same CORS configuration, for the exact same collection, and not receiving these errors. They seem to be occurring intermittently, and only on some subset of the OPTIONS requests. OPTIONS that result in a 204 actually seem to be the ones that resolve, where as ones that return a 200 with a JSON content body are the ones that are producing this CORS issue. It only seems to happen on collections that have multiple revisions of documents. |
So this only occurs on iOS? Does it occur in Safari, UIWebView, or WKWebView? |
Our main testing environment is iOS, Pouch 5.1, and UIWebView. We tried WKWebView with similar intermittent errors occurring on OPTIONS. It also occurs on 5.0, but not on 3.6.0. |
Can you provide a live reproducible test case? I realize it's difficult to test because you need a live running CouchDB, but if we can't reproduce then we can't really fix it. BTW if this only occurs on iOS (and not Android), I wonder if it's actually a Safari bug. If you're able to reproduce consistently, we might be able to file a bug on WebKit and have them look into it. |
I encounter this issue with Cloudant as well. On PouchDB 5.0.0 with a IOS 9 device : I get the "Failed to load resource: Request header field Authorization is not allowed by Access-Control-Allow-Headers." errors in the console. Especially when I do a loop of :
ps : @thedracle what config do you recommend for IOS envt ? |
Seems related to #4633. Basically checking for |
sorry I meant #4773 |
I think it's OK with the new version. let me confirm that to you |
Not been seeing this recently |
When doing a sync against CouchDB, we receive several "Failed to load resource: Request header field Authorization is not allowed by Access-Control-Allow-Headers." errors in the console.
It is entirely intermittent, and some OPTIONS requests succeed with no problem.
This doesn't occur on Android syncing against the very same server.
Our CORS configuration appears to be correct for our CouchDB server.
The text was updated successfully, but these errors were encountered: