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

Sync stops working on macOS after resume from sleep #2367

Closed
streetwriters bot opened this issue Apr 16, 2023 · 4 comments · Fixed by #2441 or #2445
Closed

Sync stops working on macOS after resume from sleep #2367

streetwriters bot opened this issue Apr 16, 2023 · 4 comments · Fixed by #2441 or #2445
Labels
Platform: Desktop Status: Confirmed Bug is confirmed but work on a fix hasn't yet started. Type: Bug Something isn't working Unit: Sync

Comments

@streetwriters
Copy link

streetwriters bot commented Apr 16, 2023

I haven't tested on other platforms, but on macOS, if the computer goes to sleep and is resumed, with Notesnook still running, the status bar at the bottom shows sync failed.

In this state, I created a new note on mobile (iOS) and made sure sync was done on the phone. The note did not sync to desktop, I had to initial a force sync by cling on the "sync failed" message in the status bar.

Running on an M1 MacBook Pro, macOS Ventura 13.3.1 (22E261)

Device information:
App version: 2.4.7-71ecc05-desktop
OS: OS X 10.15.7
Browser: Electron 21.1.1
Pro: true

@ajgraves
Copy link

Please let me know if any additional details are needed for this report.

@thecodrr
Copy link
Contributor

I was able to reproduce this on Linux as well. Fixing it ASAP. Thanks for reporting!

@thecodrr thecodrr added Type: Bug Something isn't working Status: Confirmed Bug is confirmed but work on a fix hasn't yet started. Unit: Sync Platform: Desktop labels Apr 27, 2023
@thecodrr
Copy link
Contributor

Detailing my findings here.

When a device goes to sleep, its Internet/WiFi gets disconnected which also stops the Notesnook app from syncing and puts it in offline mode. However, when the device wakes up it takes some time for it to connect to the Internet. During this time, the Notesnook app also tries and fails to connect its sync throwing the "Could not connect to sync server" error.

I was not able to reproduce this on the web app so I am assuming this has something to do with how/when Electron sends the reconnection/device wake event.

A possible fix for it would be to send more reliable connectivity events from the native side instead of relying on the browser.

@ajgraves
Copy link

This still seems to be an issue, at least on macOS. Still shows "Sync failed" until I click on that to force a sync.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: Desktop Status: Confirmed Bug is confirmed but work on a fix hasn't yet started. Type: Bug Something isn't working Unit: Sync
Projects
None yet
2 participants