Synchronization does not finish

Bug report

Synchronization does not always finish when editing on two machines.
Pressing “Synchronize Notes” completes the process, but it is a hassle to do it every time, so I would like to see it improved.

Environment

  • Platform: macOS
  • Platform version: Monterey * 2
  • App Version: 5.5.1

How to reproduce

  1. edit notes in the first machine
  2. display notes on the second machine
  3. “Syncing…” display does not end
    image

Hi Seito,

Thanks for the report. That sounds weird.
So, your notes are properly synced but the state says still syncing?

  • Does it happen on both computers?
  • Are there any errors in the terminal when running with --enable-logging option?
  • When did it start happening? Do you remember what you did that might be causing the issue? e.g., added a particular note?
  • To reproduce it, can you elaborate on the exact steps, like:
    1. Open note A in the first machine
    2. Open note A in the second machine
    3. Edit note A in the first machine

So, your notes are properly synced but the state says still syncing?

No, not even synchronized.

Simple editing on the two machines seems to synchronize well.
I will enable the --enable-logging option for a while and report back when I can clarify the reproduction procedure; thanks!

1 Like

Are you behind a web proxy? That might cause the issue where the long-poll HTTP requests silently fail which the app can’t catch.

Environment:

  • Platform: macOS
  • Platform version: Ventura 13.0

I also reproduced it on one machine.

  1. tethering in a cafe to edit notes
  2. connect to wi-fi at home
  3. the following debug log appears, and synchronization does not finish
[66633:1113/110658.494892:WARNING:dns_config_service_posix.cc(198)] Failed to read DnsConfig.
[66667:1113/110658.495012:WARNING:dns_config_service_posix.cc(198)] Failed to read DnsConfig.
[66633:1113/110701.090048:WARNING:dns_config_service_posix.cc(198)] Failed to read DnsConfig.
[66667:1113/110701.090057:WARNING:dns_config_service_posix.cc(198)] Failed to read DnsConfig.

Thanks for the information.
Can you clarify which machine you were on at each step?
Is this correct?

  1. tethering in a cafe to edit notes (laptop A)
  2. connect to wi-fi at home (laptop B)
  3. the following debug log appears, and synchronization does not finish (laptop B)

Was laptop B sleeping or awake and connected to the internet while you were working on laptop A at the cafe?

Looks like the warning message comes from Chromium: https://source.chromium.org/chromium/chromium/src/+/main:net/dns/dns_config_service_win.cc;l=583
But the synchronization is performed in the main process, not the renderer process (Chromium).
It might be something to do with the network issue though.
I’ve looked into the server but there were no error logs found regarding your sync.

BTW, Inkdrop automatically retries sync when a machine is back online by listening to the ‘online’ event: Window: online event - Web APIs | MDN
It is not working in your case for some reason.
Do you have any network issues on other apps at home?

Thanks! This case was reproduced on a single machine.

  1. tethering in a cafe to edit notes (laptop A)
  2. connect to wi-fi at home (laptop A)
  3. the following debug log appears, and synchronization does not finish (laptop A)

Before step 2, the machine will have gone to sleep and disconnected from the Internet completely.

Maybe my plugin is interfering, so I will turn it off once.
I had to change a few settings to prevent the timer plugin from stopping.

Got it. Let me know if it solved!

I have confirmed that turning off my plugin still causes the problem.
I was getting this error log.

  app:error error during auto update: Error: インターネット接続がオフラインのようです。

 +1h
[bugsnag] Event failed to send…
Error: connect EHOSTUNREACH 35.186.205.6:443 - Local (192.168.0.5:60303)
    at internalConnect (node:net:916:16)
    at defaultTriggerAsyncIdScope (node:internal/async_hooks:454:18)
    at GetAddrInfoReqWrap.emitLookup [as callback] (node:net:1060:9)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:73:8)
 Error: connect EHOSTUNREACH 35.186.205.6:443 - Local (192.168.0.5:60303)
    at internalConnect (node:net:916:16)
    at defaultTriggerAsyncIdScope (node:internal/async_hooks:454:18)
    at GetAddrInfoReqWrap.emitLookup [as callback] (node:net:1060:9)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:73:8)
 {
  errno: -65,
  code: 'EHOSTUNREACH',
  syscall: 'connect',
  address: '35.186.205.6',
  port: 443
}
  app:error error during auto update: Error: ネットワーク接続が切れました。

 +2h
[bugsnag] Event failed to send…
Error: getaddrinfo ENOTFOUND notify.bugsnag.com
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:71:26)
 Error: getaddrinfo ENOTFOUND notify.bugsnag.com
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:71:26)
 {
  errno: -3008,
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'notify.bugsnag.com'
}

I have two macs at home, and only one has the problem.
The machine with the problem tends to be slower, taking about 30 seconds to connect to the network when it comes back from sleep.
Perhaps there is some setting on the machine that is affecting the problem. I will write again if I find out anything.

Yeah, looks like so!
Hope it’ll be solved.

Hi, Takuya.
After investigating the cause, it appears that the problem occurs when the Norton Secure VPN feature is turned on.
I did not need this feature, so I turned it off and solved the problem.
Thanks for checking :smiley:

Makes sense. Glad it’s been resolved!