Skip to content
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

Webdav sync is broken since 2.12.15 #8788

Closed
romu70 opened this issue Sep 6, 2023 · 20 comments · Fixed by #9286
Closed

Webdav sync is broken since 2.12.15 #8788

romu70 opened this issue Sep 6, 2023 · 20 comments · Fixed by #9286
Labels
bug It's a bug desktop All desktop platforms high High priority issues sync sync related issue

Comments

@romu70
Copy link

romu70 commented Sep 6, 2023

Environment

Joplin version: 2.12.15
Platform: macOS Ventura 13.5.1 Arm64
OS specifics:

Steps to reproduce

I sync my iPad, my iPhone and my Mac on my Synology nas through Webdav. So of course, with the same settings.

  1. Open Joplin on the Mac
  2. Go to settings -> Synchronisation
  3. Check the sync settings are the same than on my other devices (it's not a fresh install, I've been using Joplin for a long time).
  4. Click on "Check synchronisation configuration"

And I get:

Error. Please check that URL, username, password, etc. are correct and that the sync target is accessible. The reported error was:
request to https://---my webdav server url---/home/notes/ failed, reason: connect ECONNREFUSED ---my home ipv6 address---:443 (Code ECONNREFUSED)

Describe what you expected to happen

On my other devices, I get this:

Success! Synchronisation configuration appears to be correct.

Logfile

@romu70 romu70 added the bug It's a bug label Sep 6, 2023
@romu70
Copy link
Author

romu70 commented Sep 6, 2023

Oups, I forgot to attach the log trace.

Screenshot 2023-09-06 at 08 26 03

@PaulTate
Copy link

PaulTate commented Sep 7, 2023

WebDav sync also appears broken on Windows. I am using an https url.

image

Joplin 2.12.15 (prod, win32)

Client ID: 4cfbbe01b63a4cb59e341522d9a64a9c
Sync Version: 3
Profile Version: 43
Keychain Supported: Yes

Revision: 2d26332

Downgrading to 2.9.17 works.

@romu70
Copy link
Author

romu70 commented Sep 7, 2023

The last prod macOS version is 2.10.19, and as I already ran the 2.12.x, I can't downgrade. I'm stuck with non synchronising files.

@JackGruber
Copy link
Contributor

WebDav Sync works without problems for me on Windows 10 with Joplin 2.12.15 to my Synology WebDav service via https.

@romu70
Copy link
Author

romu70 commented Sep 12, 2023

Same issue on 2.15.16.

@NicholasYamamoto
Copy link

Started seeing this issue too on my iOS and MacOS Ventura device. Confirmed that I am able to reach my WebDAV just fine, but Joplin will not sync with it. I am also being shown Success! Synchronization configuration appears to be correct. on both of my devices when checking the sync configuration, despite it not actually working.

@romu70
Copy link
Author

romu70 commented Oct 7, 2023

Same with 2.12.18. And as I don’t have any workaround and need my notes, it’s the end for me with Joplin. Too bad.

@jogi4github
Copy link

I was able to solve my ECONNREFUSED sync issue on my macbook by disabling ipv6.

network -listallnetworkservices
networksetup -setv6off <networkservice>

@V1ck3s
Copy link

V1ck3s commented Nov 4, 2023

I have the same problem:
FetchError: request to http://myjoplin/api/sessions failed, reason: connect ECONNREFUSED 2a1:ipv6::1:80

I tested several versions, version 2.12.5 works and it is from the next version, 2.12.7 that it starts to no longer work.

The changelog for the 2.12.7 is :

Improved: Updated packages css-loader (v6.8.1)
Improved: Upgrade to Electron 25. Note that it means that Windows 7/8/8.1 are no longer supported (#8451) (#8258 by Henry Heino)
Fixed: Fix issue with Apple Silicon version (#8452) (#6052 by Noah Nash)

Among the 3 changes, I suspect the second one the most, the electron update. It must have changed something for users who use IPv6. I'm on Linux, others have had the problem on Windows or MacOS. The operating system is therefore not the cause.

@laurent22 laurent22 added desktop All desktop platforms sync sync related issue high High priority issues v2.13 labels Nov 7, 2023
@laurent22
Copy link
Owner

Would you mind trying with the latest pre-release? As it includes an upgrade of Electron which may fix the issue:

https://github.com/laurent22/joplin/releases/tag/v2.13.5

@V1ck3s
Copy link

V1ck3s commented Nov 10, 2023

@laurent22 Hello, I tested with this version and the error is still there. I am putting back some of the logs.

", "FetchError: request to https://xxxxxxxxxxx.fr/api/sessions failed, reason: connect ECONNREFUSED 2b11:aea:ipv6XXXXXXXXX
Code: ECONNREFUSED
FetchError: request to https://xxxxxxxxxxx.fr/api/sessions failed, reason: connect ECONNREFUSED 2b11:aea:ipv6XXXXXXXXX
    at ClientRequest.<anonymous> (/tmp/.mount_JoplinKzPPky/resources/app.asar/node_modules/@joplin/lib/node_modules/node-fetch/lib/index.js:1491:11)
    at ClientRequest.emit (node:events:513:28)
    at TLSSocket.socketErrorListener (node:_http_client:502:9)
    at TLSSocket.emit (node:events:513:28)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)"
2023-11-10 20:13:26: Synchronizer: "FetchError: request to https://xxxxxxxxxxx.fr/api/sessions failed, reason: connect ECONNREFUSED 2b11:aea:ipv6XXXXXXXXX
Code: ECONNREFUSED
FetchError: request to https://xxxxxxxxxxx.fr/api/sessions failed, reason: connect ECONNREFUSED 2b11:aea:ipv6XXXXXXXXX
    at ClientRequest.<anonymous> (/tmp/.mount_JoplinKzPPky/resources/app.asar/node_modules/@joplin/lib/node_modules/node-fetch/lib/index.js:1491:11)
    at ClientRequest.emit (node:events:513:28)
    at TLSSocket.socketErrorListener (node:_http_client:502:9)
    at TLSSocket.emit (node:events:513:28)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)"```

@laurent22
Copy link
Owner

Only clue I could find is this: electron/electron#35999 (review)

But that's for Electron 18 and we've already been using it since v2.9.1.

The Electron 25 upgrade was this commit: a354feb which upgraded from v19 to v25, but not sure what could have been broken there.

@personalizedrefrigerator
Copy link
Collaborator

Only clue I could find is this: electron/electron#35999 (review)

But that's for Electron 18 and we've already been using it since v2.9.1.

The stack trace above mentions node-fetch. (This looks similar to this issue, which includes a suggested fix).

@laurent22
Copy link
Owner

Brilliant, thanks for looking into it @personalizedrefrigerator. I did check node-fetch at some point but didn't come across this issue

@personalizedrefrigerator
Copy link
Collaborator

personalizedrefrigerator commented Nov 12, 2023

It would be helpful if someone experiencing this issue could try the following (in a recent version of Joplin):

  1. Open the development tools (Help > toggle development tools)
  2. Run require('dns').setDefaultResultOrder('ipv4first'); in the console (Note: This might need to be run soon after app startup)
    • According to this issue, this reverts an address resolution change made in Node 17, which might be causing this issue (or exposing an underlying issue related to how Joplin or a dependency handles ipv6).
  3. Try to sync again

@V1ck3s
Copy link

V1ck3s commented Nov 12, 2023

I can try this tonight.

@V1ck3s
Copy link

V1ck3s commented Nov 13, 2023

@personalizedrefrigerator It works !

@romu70
Copy link
Author

romu70 commented Nov 13, 2023

Same here, it works.

@mu88
Copy link

mu88 commented Jan 2, 2024

@laurent22 I tested this fix today with Joplin 2.12.19 on my Win11 laptop and running require('dns').setDefaultResultOrder('ipv4first'); returns undefined but fixes the sync issue. However, when restarting Joplin, the issue is back again, meaning that I would have to run this command on every app start 🤔

@V1ck3s
Copy link

V1ck3s commented Jan 2, 2024

@laurent22 I tested this fix today with Joplin 2.12.19 on my Win11 laptop and running require('dns').setDefaultResultOrder('ipv4first'); returns undefined but fixes the sync issue. However, when restarting Joplin, the issue is back again, meaning that I would have to run this command on every app start 🤔

Already fixed, update your app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It's a bug desktop All desktop platforms high High priority issues sync sync related issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants