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

Desktop,Cli: Fixes #8788: Work around WebDAV sync issues over ipv6 #9286

Merged
merged 4 commits into from
Nov 14, 2023

Conversation

personalizedrefrigerator
Copy link
Collaborator

@personalizedrefrigerator personalizedrefrigerator commented Nov 12, 2023

Summary

This should fix a WebDAV sync issue by restoring a network resolution behavior from Node 16 (defaulting to ipv4).

May fix #8788.

Notes

Testing

While I have verified that I can still sync to DropBox and a locally-hosted Joplin Server, this is mostly untested.

Copy link

@V1ck3s V1ck3s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix works on 2.12.7, the version from which the bug is present.

Comment on lines 640 to 644
// Work around issues with ipv6 resolution
// (possibly incorrect URL serialization see https://github.com/mswjs/msw/issues/1388#issuecomment-1241180921).
// See also https://github.com/node-fetch/node-fetch/issues/1624#issuecomment-1407717012
dns.setDefaultResultOrder('ipv4first');

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to add an option to disable this — setDefaultResultOrder has a higher precedence than NODE_OPTIONS and users could previously enable/disable this with NODE_OPTIONS=--dns-result-order=verbatim or NODE_OPTIONS=--dns-result-order=ipv4first.1

Edit: It seems that Electron also accepts --dns-result-order=verbatim and --dns-result-order=ipv4first.

Footnotes

  1. Suggested by https://github.com/nodejs/node/issues/41145#issuecomment-991929539

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pull request has been updated to not override the default result order if --dns-result-order=something is specified on the command line.

@laurent22 laurent22 merged commit 2c0181d into laurent22:dev Nov 14, 2023
10 checks passed
@kuon
Copy link

kuon commented Jan 2, 2024

Does this means that webdav sync will not work over ipv6 only network? Or will it use ipv6 normally after trying ipv4?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Webdav sync is broken since 2.12.15
4 participants