-
Notifications
You must be signed in to change notification settings - Fork 351
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
filesListFolderLongpoll() causes CORS preflight error #85
Comments
|
Thanks! We'll look into it. |
|
I'm also having what I think is this issue - same errors as above:
When I then installed "Allow-Control-Allow-Origin: *" Chrome plugin as a test, longpoll still returns:
|
|
@grazinskis what exactly do we need to do for Safari? Thanks! |
|
This looks like it was reported four months ago and is not yet working. I am getting the same error as the OP @tnightingale and @MaxwellK above and cannot use longpoll. Am I missing something? |
|
I just got lonpoll working by hacking the .min version from distribution (since non-min does not work in a browser) to effectively change rpcRequest() to do apiRequest.type("text/plain; charset=dropbox-cors-hack") and apiRequest.send(JSON.stringify(body)) This apparently avoids the CORS preflight, thus avoiding the 501 response from the server to the preflight. This hack also did not break anything (in my own little testing of my app). I hope this can make it into a distribution soon (or a fix to the server accepting preflight). I'm trying really hard to get off of v1 before it's shutoff in June! |
|
@episodeyang I have come up with a couple ways of dealing with it:
It's ugly though. Amazing for how long this issue is still relevant. Let's hope the fix of @kennellink works, doesn't break anything else and can make it to distribution. |
|
Thanks for following up, everyone. This issue is still open with the team on our side. I'll follow up here once we have an update. |
|
Thanks @episodeyang. My hack does not work in Firefox and perhaps others since they rewrite the content-type. Works in IE. |
|
Hey @kennellink and others, we are in the midst of a backend rewrite that will fix this for free, but I'm unable to give you an eta yet. Give me a couple of days for an ETA. Thanks a lot for the patience, and thanks for reporting. |
|
Thanks @pran1990, I appreciate the help! Can I look forward to having a working filesListFolderLongpoll() (with some time to test) before the June deadline to be off API v1? |
|
I don't have a timeline for a fix right now. I'll check in with the team again. |
|
@greg-db Thanks! :) |
|
Hi everyone. I appreciate the work you're doing here. We have a deadline, however, from Dropbox to be off API v1 by June 28 and I am in dire need of filesListFolderLongpoll() to work before then. Do you know if Dropbox will extend that deadline or if Longpoll is expected before then? I'm sorry to push, but we have an app in production that our customers rely on and I need a plan to provide uninterrupted service. I'm afraid the active polling technique would trigger throttling, so I don't have an alternative at this point. |
|
@kennellink Thanks for following up, and apologies for the delay. Work on this is ongoing, but it requires some infrastructure changes to do right. I can't offer a guaranteed timeline, but we do expect this to be done this month, well ahead of the v1 retirement. |
|
Thanks @greg-db ! It's really good to hear. |
|
Thanks @greg-db that sounds great! Best wishes. |
|
Hey @greg-db and @pran1990 , I hope all is well. I just received a reminder from Dropbox that the v1 API is going away soon. I have about a month, which is not long enough to completely rewrite to another SDK. Is this SDK going to have longPoll working in the near near future so I can finish testing and finalize the upgrade? If not, do you know who I would contact at Dropbox to extend access to v1 API or if they'll even entertain the idea since I've been depending on this SDK working? |
|
Hey @kennellink, thanks for reaching out! I'm in the process of testing the
new backend, I'll update this thread when that is over. The change on your
side will be minimal (upgrading the SDK) at this point.
|
|
We are reviewing requests for extensions to API v1 access though. If you'd like an extension for access to API v1, please open an API ticket: https://www.dropbox.com/developers/contact Please include:
|
|
Longpoll still 501 (Not Implemented) - any ETA please? |
|
I don't have an update on this yet unfortunately. We'll follow up here once we do. |
|
This is really critical for our applications. Glad that you postponed the depreciation date, but we would love to see this implemented in new API. |
|
Hi pavol, when our fix for this issue is ready, I expect it to be a noop
(except for removing workarounds). That fix is not tied to the deprecation
date.
…On Jun 29, 2017 4:49 AM, "Pavol Rusnak" ***@***.***> wrote:
This is really critical for our applications. Glad that you postponed the
depreciation date, but we would love to see this implemented in new API.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#85 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AE2ScM95LOEijYvoRQdXlrHpjQMN7MCHks5sI485gaJpZM4Kq9jB>
.
|
|
So filesListFolderLongPoll was reported broken 9 months ago, is not fixed, and has no fix in sight. There is no unit test for it, so it's not clear if it was ever tested or if it ever worked. Am I missing something? As someone new to this SDK and assuming it was generally stable, that's pretty disconcerting. |
|
Thanks for the feedback @BobDickinson . We are still working on the infrastructure change, but it has taken longer than anticipated. We'll follow up here once it's done. Apologies for the trouble! |
|
API v1 cutoff date until September 28th, 2017 ??? |
|
Work on this is still in progress. If you need an extension for access to API v1 please refer to this comment for instructions for requesting one. |
|
This should be working now. Please let us know if you're still seeing any issues. |
Tested on macOS Chrome (54.0.2840.71 (64-bit)), Safari (10.0.1 (11602.2.14.0.7)) & Firefox (49.0.2).
This seems unrelated to #42 (or associated issues) because domain is notify.dropboxapi.com not api.dropboxapi.com.
Can also be reproduced with following XHR request:
It seems it is the Content-Type "application/json" header that is triggering the CORS prefilght. The suggested Content-Type "text/plain;charset=dropbox-cors-hack" hack doesn't work as all 3 browsers I tested rewrite to "text/plain" which result in a 400 Bad request.
The text was updated successfully, but these errors were encountered: