-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
iOS,Android: Dropbox sync broken #10396
Comments
Additional details (originally posted on the forum):
Other users are reporting this on older versions of Joplin. Footnotes
|
At some point we had this "Network request failed" error because we weren't passing the "content-type" header (even when it wasn't needed), but in that case it looks like it's specified. Or maybe it should be application/json in this particular request? |
A
Using
Replacing
These all fail when fetching Here are a few other things that could be tried:
|
I've also noticed this issue on an Android 14 emulator (I've only tested with the React Native 0.73.8 upgrade branch, however). |
With Android maybe it's easier to debug - did you try running |
Also maybe compare the response between running curl on |
I've done additional testing on Android.
fetch("https://content.dropboxapi.com/2/files/download", {"headers":{"Dropbox-API-Arg":"{\"path\":\"/faf15418f15e410da0000ac96d8c4c47.md\"}","Authorization":"Bearer TOKEN_HERE","Content-Type":"application/octet-stream"},"method":"GET"})
.then(e => e.text()).then(t => console.log(t)).catch(e => console.error(e)) Edit: If I run the above Changing the path to fetch("https://content.dropboxapi.com/2/files/download", {"headers":{"Dropbox-API-Arg":"{\"path\":\"/info.json\"}","Authorization":"Bearer TOKEN_HERE","Content-Type":"application/octet-stream"},"method":"GET"})
.then(e => e.text()).then(t => console.log(t)).catch(e => console.error(e)) Interestingly, sending a // First, fetch with "method": "POST"
fetch("https://content.dropboxapi.com/2/files/download", {"headers":{"Dropbox-API-Arg":"{\"path\":\"/info.json\"}","Authorization":"Bearer TOKEN_HERE","Content-Type":"application/octet-stream"},"method":"POST"})
.then(e => e.text()).then(t => console.log(t))
// Fetching a second time, this time with "method": "GET" **also works**:
.then(() =>
fetch("https://content.dropboxapi.com/2/files/download", {"headers":{"Dropbox-API-Arg":"{\"path\":\"/info.json\"}","Authorization":"Bearer TOKEN_HERE","Content-Type":"application/octet-stream"},"method":"GET"})
).then(e => e.text()).then(t => console.log(t)) Adding a third
When I run
If I search for
Footnotes
|
I've raised this issue on the Dropbox forum (Edit: |
Syncing is working on Mac, but not on any of my iOS devices. |
…, fetch another file first before retrying with the original
…, fetch another file first before retrying with the original
To add some symptoms that may help in diagnosis, if I completely delete the iOS app, re-connect the Dropbox link, it syncs fine. Loads all the existing data from the Dropbox vault. But then will not perform any updates after that. Adding or deleting an item on a Mac does not sync to the iOS device. Or in the other direction. |
I've opened a pull request with a workaround for the sync issue. It seems that if Joplin tries to download the same file multiple times with a It's strange that repeated
For me, the sync errors happen first when requesting An alternate workaround could be to cache the last request to |
I don't have a lot of experience with Dropbox programming (I'm a real time embedded engineer) but could the difference between mobile and desktop be that on desktop computers Dropbox is a daemon and the app writes directly to the local Joplin folder for requests? Versus on mobile, the GET requests have to be issued to the Dropbox servers directly? |
No this is not it. There are three reasons for this issue:
|
Re-opening — users are still experiencing Dropbox sync issues: https://discourse.joplinapp.org/t/ios-sync-broke-due-to-network-request-failing-with-dropbox/37915/24. |
Operating system
iOS
Joplin version
13.0.1 (dev, ios)
Desktop version info
No response
Current behaviour
Expected behaviour
Dropbox sync should work.
Logs
No response
The text was updated successfully, but these errors were encountered: