laurent22 / joplin

Joplin - the privacy-focused note taking app with sync capabilities for Windows, macOS, Linux, Android and iOS.
https://joplinapp.org
Other
46.35k stars 5.04k forks source link

Joplin sync failure on IPv6 only networks #7842

Open drwwirth opened 1 year ago

drwwirth commented 1 year ago

Environment

Joplin version: 2.9.17 Platform: Standard PC Fujitsu Esprimo P958, 16 GB RAM OS specifics: Windows 10 64 bit 22H2 Build 19045.2486

Steps to reproduce

  1. Open Joplin application
  2. Go to tools > options > configuration > synchronization
  3. Configure sync target
  4. Check sync configuration

Describe what you expected to happen

Joplin should give me the information that the sync target is o.k. and reachable

What happens

Joplin throws an error:

Fehler. Bitte überprüfe, ob die URL, der Benutzername, das Passwort usw. korrekt sind und dass das Synchronisationsziel erreichbar ist. Fehlermeldung:
request to https://wicloud.sytes.net/remote.php/webdav/Joplin_Wo/ failed, reason: connect ETIMEDOUT 100.85.45.18:443 (Code ETIMEDOUT)
Error. Please check if the URL, the username, the password etc. are correct and the sync target is reachable.
Error message:
request to https://wicloud.sytes.net/remote.php/webdav/Joplin_Wo/ failed, reason: connect ETIMEDOUT 100.85.45.18:443 (Code ETIMEDOUT)

Logfile

2023-02-26 09:22:53: App: "Profile directory: r:/joplin/Profile_Wo"
2023-02-26 09:22:53: App: "Root profile directory: r:/joplin/Profile_Wo"
2023-02-26 09:22:53: "Database was open successfully"
2023-02-26 09:22:53: "Checking for database schema update..."
2023-02-26 09:22:53: "Current database version", "{"version":41,"table_fields_version":41}"
2023-02-26 09:22:53: "Upgrading database from version 41"
2023-02-26 09:22:53: "New version: 41. Previously recorded version: 41"
2023-02-26 09:22:53: "KeychainService: checking if keychain supported"
2023-02-26 09:22:53: "KeychainService: check was already done - skipping. Supported:", "0"
2023-02-26 09:22:53: e2ee/utils: "Master password is not set - trying to get it from the active master key..."
2023-02-26 09:22:53: handleSyncStartupOperation: "Processing operation:", "0"
2023-02-26 09:22:53: App: "Client ID: 2ba32a227869489b95483ceba161852f"
2023-02-26 09:22:53: models/Setting: "Applying default migrations..."
2023-02-26 09:22:53: e2ee/utils: "Trying to load 0 master keys..."
2023-02-26 09:22:53: e2ee/utils: "Loaded master keys: 0"
2023-02-26 09:22:53: "ResourceFetcher: Auto-add resources: Mode: always"
2023-02-26 09:22:53: "ResourceFetcher: Auto-added resources: 0"
2023-02-26 09:22:53: App: ""syncInfoCache" was changed - setting up encryption related code"
2023-02-26 09:22:53: e2ee/utils: "Trying to load 0 master keys..."
2023-02-26 09:22:53: e2ee/utils: "Loaded master keys: 0"
2023-02-26 09:22:53: App: ""syncInfoCache" was changed - setting up encryption related code"
2023-02-26 09:22:53: e2ee/utils: "Trying to load 0 master keys..."
2023-02-26 09:22:53: e2ee/utils: "Loaded master keys: 0"
2023-02-26 09:22:53: App: ""syncInfoCache" was changed - setting up encryption related code"
2023-02-26 09:22:53: e2ee/utils: "Trying to load 0 master keys..."
2023-02-26 09:22:53: e2ee/utils: "Loaded master keys: 0"
2023-02-26 09:22:53: "app.start: doing regular boot"
2023-02-26 09:22:53: App: ""syncInfoCache" was changed - setting up encryption related code"
2023-02-26 09:22:53: e2ee/utils: "Trying to load 0 master keys..."
2023-02-26 09:22:53: e2ee/utils: "Loaded master keys: 0"
2023-02-26 09:22:53: App: ""syncInfoCache" was changed - setting up encryption related code"
2023-02-26 09:22:53: e2ee/utils: "Trying to load 0 master keys..."
2023-02-26 09:22:53: e2ee/utils: "Loaded master keys: 0"
2023-02-26 09:22:53: App: ""syncInfoCache" was changed - setting up encryption related code"
2023-02-26 09:22:53: e2ee/utils: "Trying to load 0 master keys..."
2023-02-26 09:22:53: e2ee/utils: "Loaded master keys: 0"
2023-02-26 09:22:53: RevisionService: "runInBackground: Starting background service with revision collection interval 600000"
2023-02-26 09:22:53: defaultPluginsUtils: "Could not find default plugins' directory: C:\Users\iwpa00\AppData\Local\Temp\2HZj4IZBHeRUj6rf0zpEM8QxyJ5\resources\build\defaultPlugins - skipping installation."
2023-02-26 09:22:53: PluginService: "Loading plugin from r:/joplin/Profile_Wo/cache/com.coderrsid.pasteSpecial"
2023-02-26 09:22:53: PluginService: "Loading plugin from r:/joplin/Profile_Wo/cache/com.hieuthi.joplin.markdown-table-sortable"
2023-02-26 09:22:53: PluginService: "Loading plugin from r:/joplin/Profile_Wo/cache/com.joplin.copy.codeBlocks"
2023-02-26 09:22:53: PluginService: "Loading plugin from r:/joplin/Profile_Wo/cache/com.joshthor.export"
2023-02-26 09:22:53: PluginService: "Loading plugin from r:/joplin/Profile_Wo/cache/com.whatever.quick-links"
2023-02-26 09:22:53: PluginService: "Loading plugin from r:/joplin/Profile_Wo/cache/cx.evermeet.tessus.menu-shortcut-toolbar"
2023-02-26 09:22:53: PluginService: "Loading plugin from r:/joplin/Profile_Wo/cache/de.habelt.CsvImport"
2023-02-26 09:22:53: PluginService: "Loading plugin from r:/joplin/Profile_Wo/cache/io.github.daeraxa.match-highlight"
2023-02-26 09:22:54: PluginService: "Loading plugin from r:/joplin/Profile_Wo/cache/io.github.jackgruber.backup"
2023-02-26 09:22:54: PluginService: "Loading plugin from r:/joplin/Profile_Wo/cache/io.github.jackgruber.note-overview"
2023-02-26 09:22:54: PluginService: "Loading plugin from r:/joplin/Profile_Wo/cache/joplin-insert-date"
2023-02-26 09:22:54: PluginService: "Loading plugin from r:/joplin/Profile_Wo/cache/joplin-plugin-conflict-resolution"
2023-02-26 09:22:54: PluginService: "Loading plugin from r:/joplin/Profile_Wo/cache/joplin-plugin-dddot"
2023-02-26 09:22:54: PluginService: "Loading plugin from r:/joplin/Profile_Wo/cache/joplin-plugin-note-encryption"
2023-02-26 09:22:54: PluginService: "Loading plugin from r:/joplin/Profile_Wo/cache/joplin-plugin-search-and-replace"
2023-02-26 09:22:54: PluginService: "Loading plugin from r:/joplin/Profile_Wo/cache/joplin.plugin.MultiMarkdownTableTools"
2023-02-26 09:22:54: PluginService: "Loading plugin from r:/joplin/Profile_Wo/cache/joplin.plugin.ambrt.fold-cm"
2023-02-26 09:22:54: PluginService: "Not running disabled plugin: "joplin.plugin.ambrt.fold-cm""
2023-02-26 09:22:54: PluginService: "Loading plugin from r:/joplin/Profile_Wo/cache/joplin.plugin.cmoptions"
2023-02-26 09:22:54: PluginService: "Loading plugin from r:/joplin/Profile_Wo/cache/joplin.plugin.remoods.theme"
2023-02-26 09:22:54: PluginService: "Not running disabled plugin: "joplin.plugin.remoods.theme""
2023-02-26 09:22:54: PluginService: "Loading plugin from r:/joplin/Profile_Wo/cache/net.rmusin.joplin-table-formatter"
2023-02-26 09:22:54: "DecryptionWorker: cannot start because no master key is currently loaded."
2023-02-26 09:22:54: PluginService: "Loading plugin from r:/joplin/Profile_Wo/cache/org.joplinapp.plugins.ToggleSidebars"
2023-02-26 09:22:54: joplin.plugins: "Starting plugin: com.joplin.copy.codeBlocks"
2023-02-26 09:22:54: joplin.plugins: "Finished running onStart handler: com.joplin.copy.codeBlocks (Took 18ms)"
2023-02-26 09:22:54: PluginService: "Loading plugin from r:/joplin/Profile_Wo/cache/plugin.calebjohn.rich-markdown"
2023-02-26 09:22:54: PluginService: "Loading plugin from r:/joplin/Profile_Wo/cache/plugin.calebjohn.todo"
2023-02-26 09:22:54: PluginService: "Loading plugin from r:/joplin/Profile_Wo/cache/ylc395.betterMarkdownViewer"
2023-02-26 09:22:54: "Preparing scheduled sync"
2023-02-26 09:22:54: "Starting scheduled sync"
2023-02-26 09:22:54: Synchronizer: "Sync: starting: Starting synchronisation to target 5... supportsAccurateTimestamp = false; supportsMultiPut = false [1677399774731]"
2023-02-26 09:22:54: Synchronizer: "Indexing resources..."
2023-02-26 09:22:54: "ResourceService::indexNoteResources: Start"
2023-02-26 09:22:54: joplin.plugins: "Starting plugin: com.hieuthi.joplin.markdown-table-sortable"
2023-02-26 09:22:54: joplin.plugins: "Starting plugin: com.whatever.quick-links"
2023-02-26 09:22:54: SpellCheckerServiceDriverNative: "Set effective languages to "de""
2023-02-26 09:22:56: joplin.plugins: "Starting plugin: com.joshthor.export"
2023-02-26 09:22:56: joplin.plugins: "Starting plugin: io.github.jackgruber.backup"
2023-02-26 09:22:56: joplin.plugins: "Starting plugin: cx.evermeet.tessus.menu-shortcut-toolbar"
2023-02-26 09:22:56: joplin.plugins: "Starting plugin: de.habelt.CsvImport"
2023-02-26 09:22:56: joplin.plugins: "Starting plugin: com.coderrsid.pasteSpecial"
2023-02-26 09:22:56: joplin.plugins: "Starting plugin: io.github.jackgruber.note-overview"
2023-02-26 09:22:56: joplin.plugins: "Starting plugin: joplin-plugin-dddot"
2023-02-26 09:22:56: joplin.plugins: "Starting plugin: joplin-insert-date"
2023-02-26 09:22:56: joplin.plugins: "Starting plugin: joplin-plugin-conflict-resolution"
2023-02-26 09:22:56: joplin.plugins: "Starting plugin: joplin.plugin.MultiMarkdownTableTools"
2023-02-26 09:22:56: joplin.plugins: "Starting plugin: net.rmusin.joplin-table-formatter"
2023-02-26 09:22:56: joplin.plugins: "Starting plugin: joplin-plugin-search-and-replace"
2023-02-26 09:22:56: joplin.plugins: "Starting plugin: joplin-plugin-note-encryption"
2023-02-26 09:22:56: joplin.plugins: "Starting plugin: org.joplinapp.plugins.ToggleSidebars"
2023-02-26 09:22:56: joplin.plugins: "Starting plugin: plugin.calebjohn.rich-markdown"
2023-02-26 09:22:56: joplin.plugins: "Starting plugin: joplin.plugin.cmoptions"
2023-02-26 09:22:56: joplin.plugins: "Starting plugin: ylc395.betterMarkdownViewer"
2023-02-26 09:22:56: joplin.plugins: "Starting plugin: plugin.calebjohn.todo"
2023-02-26 09:22:56: joplin.plugins: "Starting plugin: io.github.daeraxa.match-highlight"
2023-02-26 09:22:57: joplin.plugins: "Finished running onStart handler: net.rmusin.joplin-table-formatter (Took 872ms)"
2023-02-26 09:22:58: RevisionService: "maintenance: Starting..."
2023-02-26 09:22:58: RevisionService: "maintenance: Service is enabled"
2023-02-26 09:22:58: joplin.plugins: "Finished running onStart handler: io.github.daeraxa.match-highlight (Took 2271ms)"
2023-02-26 09:22:58: joplin.plugins: "Finished running onStart handler: com.hieuthi.joplin.markdown-table-sortable (Took 3926ms)"
2023-02-26 09:22:58: joplin.plugins: "Finished running onStart handler: org.joplinapp.plugins.ToggleSidebars (Took 2491ms)"
2023-02-26 09:22:59: checkForUpdates: "Starting..."
2023-02-26 09:22:59: checkForUpdates: "Checking with options {"includePreReleases":false}"
2023-02-26 09:22:59: joplin.plugins: "Finished running onStart handler: de.habelt.CsvImport (Took 2780ms)"
2023-02-26 09:22:59: joplin.plugins: "Finished running onStart handler: joplin-insert-date (Took 2779ms)"
2023-02-26 09:22:59: joplin.plugins: "Uncaught exception in plugin "com.coderrsid.pasteSpecial":", "Error: Der Beschleuniger „Cmd+Shift+V“ ist nicht gültig.
Error: Der Beschleuniger „Cmd+Shift+V“ ist nicht gültig.
    at KeymapService.validateAccelerator (C:\Users\iwpa00\AppData\Local\Temp\2HZj4IZBHeRUj6rf0zpEM8QxyJ5\resources\app.asar\node_modules\@joplin\lib\services\KeymapService.js:336:19)
    at KeymapService.registerCommandAccelerator (C:\Users\iwpa00\AppData\Local\Temp\2HZj4IZBHeRUj6rf0zpEM8QxyJ5\resources\app.asar\node_modules\@joplin\lib\services\KeymapService.js:207:18)
    at JoplinViewsMenus.registerCommandAccelerators (C:\Users\iwpa00\AppData\Local\Temp\2HZj4IZBHeRUj6rf0zpEM8QxyJ5\resources\app.asar\node_modules\@joplin\lib\services\plugins\api\JoplinViewsMenus.js:29:52)
    at JoplinViewsMenus.<anonymous> (C:\Users\iwpa00\AppData\Local\Temp\2HZj4IZBHeRUj6rf0zpEM8QxyJ5\resources\app.asar\node_modules\@joplin\lib\services\plugins\api\JoplinViewsMenus.js:52:18)
    at Generator.next (<anonymous>)
    at C:\Users\iwpa00\AppData\Local\Temp\2HZj4IZBHeRUj6rf0zpEM8QxyJ5\resources\app.asar\node_modules\@joplin\lib\services\plugins\api\JoplinViewsMenus.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (C:\Users\iwpa00\AppData\Local\Temp\2HZj4IZBHeRUj6rf0zpEM8QxyJ5\resources\app.asar\node_modules\@joplin\lib\services\plugins\api\JoplinViewsMenus.js:4:12)
    at JoplinViewsMenus.create (C:\Users\iwpa00\AppData\Local\Temp\2HZj4IZBHeRUj6rf0zpEM8QxyJ5\resources\app.asar\node_modules\@joplin\lib\services\plugins\api\JoplinViewsMenus.js:41:16)
    at Object.<anonymous> (C:\Users\iwpa00\AppData\Local\Temp\2HZj4IZBHeRUj6rf0zpEM8QxyJ5\resources\app.asar\node_modules\@joplin\lib\services\plugins\utils\executeSandboxCall.js:50:19)"
2023-02-26 09:22:59: joplin.plugins: "Finished running onStart handler: com.coderrsid.pasteSpecial (Took 2815ms)"
2023-02-26 09:22:59: "ResourceService::indexNoteResources: Completed"
2023-02-26 09:23:02: Plugin: "onContentScriptMessage: No such content script: CMOptions"
2023-02-26 09:23:02: joplin.plugins: "Finished running onStart handler: ylc395.betterMarkdownViewer (Took 6266ms)"
2023-02-26 09:23:02: Plugin: "onContentScriptMessage: No such content script: SearchAndReplace"
2023-02-26 09:23:03: joplin.plugins: "Finished running onStart handler: joplin.plugin.cmoptions (Took 6748ms)"
2023-02-26 09:23:03: joplin.plugins: "Finished running onStart handler: com.whatever.quick-links (Took 8461ms)"
2023-02-26 09:23:03: "SearchEngine: Updating FTS table..."
2023-02-26 09:23:03: joplin.plugins: "Finished running onStart handler: joplin-plugin-search-and-replace (Took 7331ms)"
2023-02-26 09:23:04: joplin.plugins: "Finished running onStart handler: joplin-plugin-conflict-resolution (Took 7891ms)"
2023-02-26 09:23:04: "SearchEngine: Updated FTS table in 355ms. Inserted: 0. Deleted: 0"
2023-02-26 09:23:04: joplin.plugins: "Finished running onStart handler: com.joshthor.export (Took 7914ms)"
2023-02-26 09:23:04: joplin.plugins: "Finished running onStart handler: joplin-plugin-note-encryption (Took 8433ms)"
2023-02-26 09:23:06: joplin.plugins: "Finished running onStart handler: cx.evermeet.tessus.menu-shortcut-toolbar (Took 10297ms)"
2023-02-26 09:23:07: joplin.plugins: "Finished running onStart handler: plugin.calebjohn.todo (Took 11201ms)"
2023-02-26 09:23:07: joplin.plugins: "Finished running onStart handler: plugin.calebjohn.rich-markdown (Took 11250ms)"
2023-02-26 09:23:07: joplin.plugins: "Finished running onStart handler: io.github.jackgruber.note-overview (Took 11253ms)"
2023-02-26 09:23:09: checkForUpdates: "Current version: 2.9.17"
2023-02-26 09:23:09: checkForUpdates: "Latest version: 2.9.17"
2023-02-26 09:23:09: checkForUpdates: "Is Pre-release:", "false"
2023-02-26 09:23:09: checkForUpdates: "Done."
2023-02-26 09:23:10: "Cannot respond to message because target is gone", "{"responseId":"noteViewer_16773997890290.2618487970678727","response":1,"error":null}"
2023-02-26 09:23:10: Plugin: "onContentScriptMessage: No such content script: MultiMarkdownTableTools"
2023-02-26 09:23:10: RepositoryApi: "findWorkingMirror: Using: https://raw.githubusercontent.com/joplin/plugins/master"
2023-02-26 09:23:10: joplin.plugins: "Finished running onStart handler: joplin-plugin-dddot (Took 14554ms)"
2023-02-26 09:23:10: joplin.plugins: "Finished running onStart handler: joplin.plugin.MultiMarkdownTableTools (Took 14563ms)"
2023-02-26 09:23:10: joplin.plugins: "Finished running onStart handler: io.github.jackgruber.backup (Took 14583ms)"
2023-02-26 09:23:11: RevisionService: "collectRevisions: Created revisions for 5 notes"
2023-02-26 09:23:11: RevisionService: "maintenance: Done in 12945ms"
2023-02-26 09:23:23: "ResourceService::indexNoteResources: Start"
2023-02-26 09:23:23: "ResourceService::indexNoteResources: Completed"
2023-02-26 09:23:23: "ResourceService::deleteOrphanResources:", "[]"
2023-02-26 09:24:48: Synchronizer: "FetchError: request to https://wicloud.sytes.net/remote.php/webdav/Joplin_Wo/info.json failed, reason: connect ETIMEDOUT 100.85.45.18:443
Code: ETIMEDOUT
FetchError: request to https://wicloud.sytes.net/remote.php/webdav/Joplin_Wo/info.json failed, reason: connect ETIMEDOUT 100.85.45.18:443
    at ClientRequest.<anonymous> (C:\Users\iwpa00\AppData\Local\Temp\2HZj4IZBHeRUj6rf0zpEM8QxyJ5\resources\app.asar\node_modules\@joplin\lib\node_modules\node-fetch\index.js:133:11)
    at ClientRequest.emit (node:events:526:28)
    at TLSSocket.socketErrorListener (node:_http_client:442:9)
    at TLSSocket.emit (node:events:526:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:83:21)"
2023-02-26 09:24:48: Synchronizer: "Sync: finished: Synchronisation finished [1677399774731]"
2023-02-26 09:24:48: Synchronizer: "Operations completed: "
2023-02-26 09:24:48: Synchronizer: "Total folders: 564"
2023-02-26 09:24:48: Synchronizer: "Total notes: 5027"
2023-02-26 09:24:48: Synchronizer: "Total resources: 13101"
2023-02-26 09:24:48: "Updating all notifications..."
2023-02-26 09:24:48: "Garbage collecting alarms..."
2023-02-26 09:24:49: "DecryptionWorker: cannot start because no master key is currently loaded."
2023-02-26 09:24:58: "SearchEngine: Updating FTS table..."
2023-02-26 09:24:58: "SearchEngine: Updated FTS table in 236ms. Inserted: 3. Deleted: 0"
tessus commented 1 year ago

As discussed in the topic on the forum, it seems that the module used for requests does not support IPv6. Since this is an upstream issue, I moved the priority from high to medium, because we can't do anything in Joplin to fix this sooner.

We should open an issue with the upstream project.

However, I also remember that there's is no h2 support either in that module. Maybe we can find a newer, better package that suits our needs. This is just a random idea, because I haven't done any research on that topic.

I think it is a serious problem that IPv6-only servers can't be reached via Joplin desktop. As in this case, it is not the user's fault, not being able to add an IPv4 endpoint, which makes this even more serious.

I will look into the package and possible alternatives next week. But I hope that others can also give their input on this topic.

laurent22 commented 1 year ago

What module doesn't support IPv6? Isn't it handled by Node, and it seems Node supports IPv6?

tessus commented 1 year ago

I remember that the fetch and other things are either handled by node directly but I think to recall it was a module. All communication is done via that module. I don't know off the top of my head, but I will look into it next week.

On mobile the OS TCP/IP stack takes care of that, which is why HTTP2 and IPv6 work on mobile.

laurent22 commented 1 year ago

Fetch operations are handled by node-fetch, but it's just an implementation of the fetch standard, but I think the low level network operations are done by Node

drwwirth commented 1 year ago

Is there a chance to get that running?

FernandoMarques-Santos commented 1 year ago

Same issue here. I decided to migrate from dropbox to my home-based nextcloud server and discovered I couldn't because my server is ipv6 only.

The desktop Joplin app throws "failed, reason: connect ETIMEDOUT [some ipv4 from my ISP here]:443". Joplin is trying the HTTPS port but of course, there is nothing there.

As the adoption of ipv6 increases and ipv4 addresses exhaust, this will happen more frequently.

tessus commented 1 year ago

When I looked into this I went down the rabbit hole. I know too little about nodejs and how to make IPv6-only or http2 work with node. This is somthing for "real" nodejs devs. Not someone who plays around with it like me.

But I certainly do understand the importance of it. (e.g. personally I've been hoping for h2 support for years now.)

laurent22 commented 1 year ago

I think it's something that we'll support when Electron supports it. From reading a few threads here and there, it's not clear to me if any of their versions properly supports it yet.

drwwirth commented 8 months ago

one year later ... is there a chance to get Joplin syncing with IPv6 only networks ?

Anything changed in electron ?