Closed personalizedrefrigerator closed 3 weeks ago
Thanks a lot for looking into this so quickly, but I'd like to see if Dropbox is going to answer before merging this.
As I understand in most cases on each request we'll do three extra requests (/list
, /get randomfile
, /get actualfile
), is that right? If so, although it's a fix I feel it would make sync so slow on mobile that it will be unusable.
There's also as you mentioned this issue with the privacy manifest. And finally there's this build issue that will need to be resolved too before we can release another 2.14 version:
As I understand in most cases on each request we'll do three extra requests (/list, /get randomfile, /get actualfile), is that right? If so, although it's a fix I feel it would make sync so slow on mobile that it will be unusable.
This is only done on failed download requests (which shouldn't be every download request). For me, this issue occurred when requesting info.json
— it could be that our sync process requests this file multiple times without first requesting some other file.
Thanks for clarifying. I need to upgrade macOS before I can build using Xcode 15, I'm going to do that and let's try to release this as quickly as possible.
How about the privacy manifest, do you know how we can add this?
Finally could you try running the test units directly again Dropbox please? As described here: https://joplinapp.org/help/dev/spec/sync#testing It should be fine to limit the tests to just those that contain the "sync" string yarn test --runInBand sync
. Also make sure to include the --runInBand
parameter
How about the privacy manifest, do you know how we can add this?
A template is added automatically by newer React Native versions, but I think it still needs to be linked to XCode. Apple documentation on privacy manifests can be found here. The "Next Steps" section of this React Native Community post may also be relevant.
Most tests pass. A few, however, are failing. (Edit) Re-running the test suite, only one test fails.
The same test fails when running the tests from the release-2.14
branch.
POST files/upload: Error (409): {"error_summary": "path/disallowed_name/...", "error": {".tag": "path", "reason": {".tag": "disallowed_name"}, "upload_session_id": "pid_upload_session:[[...]]"}
Is it possible that they've implemented some strange disallow list and they are rejecting the name "garbage.json"? Have you tried naming it differently? How about "desktop.ini"? Maybe it's blocked as well since it could be considered a system file
How about "desktop.ini"?
If I change desktop.ini
to desktop.ini.test
, the test passes.
Thanks for checking, I think we can merge then since all failures seem to be unrelated to your change
Summary
This pull request applies a workaround to fix a Dropbox sync issue on mobile:
GET
request to/files/download
fails:GET
request for that file.POST
request to download files from Dropbox instead of aGET
request.POST
requests rather thanGET
requests for/files/download
. This forum post is linked as an explanation for whyPOST
won't work for this on iOS.GET
requests seem to fail if multiple requests are sent for the same file, butPOST
requests don't.Fixes #10396.
Notes for releasing
Before this change can be released for iOS, we may need to add an iOS privacy manifest for a Joplin update to be accepted by Apple.
Based on the forum post and attempts to reproduce this issue in a local NodeJS REPL, the issue only impacts mobile.
Testing plan
I was able to consistently reproduce the original issue by creating a note, then syncing. As such, it should be verified that:
I plan to test on the following platforms: