insanum / sncli

Simplenote CLI
MIT License
396 stars 34 forks source link

App don't reconnect to internet #87

Open matteocrippa opened 5 years ago

matteocrippa commented 5 years ago

I'm facing this issue, once the device go suspend and later I wake it up, or if the wifi goes down and then up (so internet is back working) sncli stays disconnected.

2019-05-23-085858_928x14_scrot

Even forcing sync with S doesn't help

2019-05-23-085909_931x85_scrot

Is there a way to force it connect back? Last time, sadly, I lost the note written in the meanwhile and not synced :(

samuelallan72 commented 5 years ago

Hmm I'll look into it, thanks for the report. I'm surprised this would happen because afaik there aren't any long running connections.

samuelallan72 commented 5 years ago

I can't reproduce the issue on my machine with the latest revision of sncli. Could you let us know which version of sncli you are running, the versions of the dependencies (especially simperium-python). If you're running in a virtual env, an easy way to find this is with pip freeze.

Also would be interested in seeing the full log, annotated with when the internet connection changes state.

matteocrippa commented 5 years ago

I was using the AUR package https://aur.archlinux.org/packages/sncli-git But I noticed that requests with pip was not latest, tried for now to upgrade that and now monitoring that.

Here's the new pip freeze: freeze.log

matteocrippa commented 5 years ago

Just experimented again the same issue, here a quick snapshot of the log

2019-05-24-191737_937x996_scrot

If I run in terminal sncli and open a new instance I see that is perfectly connected.

Was wondering if not worth to add an extra key to force reconnect manually in this scenario.

ps. reopening the app I see that it syncs and logs shows

2019-05-24-192050_626x636_scrot

samuelallan72 commented 5 years ago

Was wondering if not worth to add an extra key to force reconnect manually in this scenario.

sncli doesn't keep any long running connections. Any action does a plain requests.post or requests.get. That's why I can't understand why this is happening.