saber-notes / saber

The cross-platform open-source app built for handwriting
https://saber.adil.hanney.org
GNU General Public License v3.0
2.1k stars 131 forks source link

Unable to sync with saber cloud #1304

Closed JustDj-Git closed 2 months ago

JustDj-Git commented 3 months ago

Before submitting an issue, please check the following

Describe the bug

Unable to sync with saber cloud. I tried to: -create a new acc -change devices (tried on Samsung tab s9, tab s6, nothing phone 1 and 2, appimage and flatpak versions on Linux -reinstall saber everywhere

sometimes files are synced with cloud (I can see them in cloud) but if I delete notes from my pad/phone - I cant resync them

Error on Linux (flatpak): flutter: WARNING: SaberSyncInterface: Failed to get sync file from remote file: Exception: Decryption failed for Saber/ flutter: WARNING: SaberSyncInterface: Failed to get sync file from remote file: Invalid argument(s): Invalid or corrupted pad block

To reproduce

  1. Sign-in on tab + phone (or more devices)
  2. Create any note and sync
  3. Try to sync notes on other devices - nothing happens

Expected behavior

Sync :)

Saber version

v0.24.1

Device

Anything else?

No response

TekkertheChaot commented 3 months ago

same here! have the same bahaviour using the flatpack 0.24.1 on linux and 0.24.1 on android. I also saw the same journal entry described above.

I've attached a video reproducing this behavior https://github.com/saber-notes/saber/assets/17234581/10b83ebd-3871-45e2-804c-d9931bc8bb7a

EDIT: I use my own nextcloud but have the exact same behaviour

gewinh commented 3 months ago

Same here Saber v0.24.1 syncs to the nextcloud server with what looks like the right file size, but there is no syncing between my Android devices. I have a phone and a tablet each has the same version of saber and each is setup to sync to the same Nextcloud account with the same encryption password. They both sync there files to the saber folder but files created on the phone don't show up on the tablet and viz versa. I have also installed Saber on ubuntu as a snap and have the same issue, no syncing between devices. I am running Nextcloud 29.02 behind an nginx reverse proxy. Other apps that are using nextcloud sync are working fine. eg. Moonreader, files, notes deck etc.

While we are at it although I love the Saber software, I don't like the app lock in, by forcing encryption when you sync to Nextcloud (this should be optional). If for some reason Saber goes away or stops working, I would need to get to my notes another way. There are plenty of encryption options external from Saber that a user could choose, if they decided they needed that level of security. Thanks again for the great work

TekkertheChaot commented 3 months ago

@gewinh Regarding the encryption, I absolutely support you on that! IMO this should be an option for the user to decide. The enabled encryption (which is great to provide encryption by default) could be a default recommendation, which can be disabled on setup behind a "I know what I'm doing" button or similar. Please create a separate, trackable issue for this as this issue #1304 should only be tracking the sync issue. ;)

Lennart01 commented 3 months ago

This issue was introduced after 0.23.0. I can get syncing to work flawlessly between my android devices on that version.

mar565 commented 2 months ago

This issue was introduced after 0.23.0. I can get syncing to work flawlessly between my android devices on that version.

Thank you for the fix. Can confirm this issue on 0.24.1 FOSS version with own NC.

ceskyDJ commented 2 months ago

While we are at it although I love the Saber software, I don't like the app lock in, by forcing encryption when you sync to Nextcloud (this should be optional). If for some reason Saber goes away or stops working, I would need to get to my notes another way. There are plenty of encryption options external from Saber that a user could choose, if they decided they needed that level of security. Thanks again for the great work

The "App lock in" isn't actually that bad. You can freely export your notes (to PDF or SBA), if you want to. I think it's good enough for the use-case you described. But, as @TekkertheChaot said, don't mix up two things in one issue, please. If you want to discuss this a bit more, create a new issue/discussion for it.

charitarthchugh commented 2 months ago

Just curious, has this been fixed with v0.24.2?

QubaB commented 2 months ago

Syncing was rewritten in 0.24.0

TekkertheChaot commented 2 months ago

Syncing was rewritten in 0.24.0

Yeah but the issue persists in 0.24.1 so this needs attention

QubaB commented 2 months ago

see #1314

TekkertheChaot commented 2 months ago

Trying to sync with v0.24.3 clients (flatpack and android) unfortunately still has this issue: Jul 22 16:25:51 Veldin flatpak[3725]: flutter: WARNING: SaberSyncInterface: Failed to get sync file from remote file: Exception: Decryption failed for Saber/ I had fresh-installed app in both plattforms and removed the previous Saber files on Nextcloud.

@adil192 Can we reopen this issue or should we create a dupe?

adil192 commented 2 months ago

That message is expected behaviour, it's just because Saber/ is a folder and not a file

TekkertheChaot commented 2 months ago

That message is expected behaviour, it's just because Saber/ is a folder and not a file

Hmm, alright. Either way, I can't seem to sync notes between devices. So this message probably doesn't relate to the sync issue? Should I record another reproduction with the new versions? Maybe I am missing something crucial...

JustDj-Git commented 2 months ago

The problem still persists - can't sync between devices...

bryanpaget commented 2 months ago

I also am unable to sync between devices.

TekkertheChaot commented 2 months ago

@adil192, sorry to ping you like this but (as other people are also pointing out) this issue still persists. Can you reopen, please?

bryanpaget commented 2 months ago

I have four devices connected to a self-hosted nextcloud instance, a ThinkPad running Ubuntu, Steam Deck, Samsung phone, and a Samsung tablet. All devices connect to the server, and all think they are syncing. But I have four separate sets of synced files. It's like the devices sync to the server in their own isolated storage compartments.

TekkertheChaot commented 2 months ago

I have opened a new issue #1326 in hopes to avoid it being overlooked. Hopefully someone of the moderators / contributors can sort this out.

(I know this is dirty and not the intended way of handling / against the CoC, but I'm trying to keep this on the radar as long as I cannot contribute something useful by myself to the project ❤️)

TekkertheChaot commented 2 months ago

For anyone still having this issue and monitoring this thread, it seems this issue is being tracked by #1320 .