ddvk / rmfakecloud

host your own cloud for the remarkable
GNU Affero General Public License v3.0
751 stars 61 forks source link

page goes back to last previously known page on reconnect #215

Closed martinetd closed 1 year ago

martinetd commented 1 year ago

Hello,

I've recently upgraded my remarkable2 to 3.0, and I don't recall seeing this before so it might be a bug on the remarkable side... But I never created a "real" cloud account so cannot try to confirm.

I sometimes have my remarkable "randomly change page" back to a page I previously was on.

After a bit of investigation, that happens when the remarkable reconnects to rmfakecloud; I see a get /document-storage/json/2/docs and it presumably returns to the page that was filled in the cloud document.

I wasn't able to reproduce by just entering airplane mode briefly, as that seems to correctly do a PUT and re-upload the document on reconnect at this point; but I've managed to reproduce this voluntarily by restarting my reverse proxy (so connection is broken) and entering/leaving sleep briefly (that seems to make it notice the connection was gone?) -- it then reconnected and did a get. It also happens without restarting the proxy but I'm not sure when exactly -- after long sleeps that my home router forgot the NAT connection?

I believe there isn't much that can be done at this point, as the client should know it just reconnected and issue a put in that case, so that probably is also present with the "real cloud"... but I can't believe they would have let that go unnoticed, perhaps there's something different in how we store page number on the cloud?

Frankly I'd rather not have the remarkable issue any request at all on page change, I seem to recall it re-uploads the whole pdf/whatever everytime I go back to main menu with a page changed and I couldn't care less that the cloud knows what page I was on. I don't really believe we can make the remarkable send different things easily, but maybe if we just omit the page info in our document reply that would behave correctly?

Thanks anyway for this great software!

ddvk commented 1 year ago

you should migrate to sync 1.5. the old sync will be removed from the tablets softwareat some point probably

martinetd commented 1 year ago

Oh, I didn't even know that was a thing... and it's been here for a while! Sorry for asking this and thanks for the pointer.

I've migrated/fixed new hosts/regenerated all auth tokens I could remember and I'll reopen if the problem happens again with sync 1.5.