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

Can't sync on custom nextcloud server #382

Closed
markwmuller opened this issue Feb 21, 2023 · 14 comments
Closed

Can't sync on custom nextcloud server #382

markwmuller opened this issue Feb 21, 2023 · 14 comments
Labels
bug Something isn't working nextcloud Issues regarding logging in to a Nextcloud server

Comments

@markwmuller
Copy link

markwmuller commented Feb 21, 2023

Describe the bug
I'm trying to use this on two android devices, and my linux laptop. I am logging into my own private nextcloud instance (works fine) on multiple devices. I expect notes to sync, but they don't. I see the folder appear on nextcloud, and then each new note I make seems to create a new file in the folder (with gibberish encrypted title). I notice there are a few similar posts, but they don't seem to quite match what I have. Notably:

  1. The files have size >0B, so I don't think it's the same as Syncing not working. File has 0b size #283
  2. I've deleted the "Saber" folder on Nextcloud, and deleted all data from the app (as suggested in Syncing not working #118 ). When logging in again, a new folder is created, and everything proceeds as before.
  3. I've done the above when logging in with my nextcloud username, and as my email (as per Syncing not working #118 (comment) ).
  4. (edit to add): The sync animation spins for a second or two, but then stops, so I don't think it's the same as The logging in animation keeps spinning in the saber app and and doesn't sign in to my nc server as well. #143

Is there any way I can see info on what's happening to try and debug (or other suggestions)?

Device (please complete the following information):

  • Device:
    • Laptop, Ubuntu 22.04 (Saber latest from flatpak, v0.9.3 (9030).
    • Android tablets, Android 13, both v0.9.3 Google Play (9030)
@markwmuller markwmuller added the bug Something isn't working label Feb 21, 2023
@adil192 adil192 added the nextcloud Issues regarding logging in to a Nextcloud server label Feb 22, 2023
@markwmuller
Copy link
Author

I have a hacky workaround, which solves my problem. Presumably, there are better ways of fixing this.

Workaround is:

  • In file_syncer.dart, in the function _addToDownloadQueue: the "filePathRemote" has an unnecessary prefix (in my case the file name might be /files/USERNAME/Saber/234234.sbc). If I remove the leading part of the filename (so it is Saber/234234.sbc) then the download works fine, and I can sync.
  • I hacked the same into the logic for filePathEncrypted, but I don't know that it matters there.

@scholzri
Copy link

+1 for this issue.
The files get uploaded to my selfhosted nextcloud, but do not get recognized/downloaded by the other clients. As OP described, neither deleting the Saber folder on the nextcloud nor resetting the clients seem to help. @adil192 Please advise how to get some useful logs to aid fixing this problem. Maybe @markwmuller solution could already help to develop a fix?

Tested with the flatpak package and two Android 13 devices with version 0.12.10.

Thank you!

@adil192
Copy link
Member

adil192 commented Jun 15, 2023

@markwmuller Please can you test out 1f919fb?

@markwmuller
Copy link
Author

@markwmuller Please can you test out 1f919fb?

Sorry, but I no longer use this, and don't have the capacity to test this.

@adil192
Copy link
Member

adil192 commented Jun 16, 2023

No worries

@adil192 adil192 closed this as completed Jun 16, 2023
@scholzri
Copy link

@adil192 Hey, unfortunately I still cannot get my own Nextcloud to work with sync. With your instance, sync works just fine. I know there must be an issue on my side, but is there anything special to configure on a fresh nextcloud instance to make sync work?

Kind regards

@scholzri
Copy link

As an additional note: with my own nextcloud instance, all clients can successfully upload notes but the all cannot download/read the notes that other clients uploaded to the Saber folder.

@adil192
Copy link
Member

adil192 commented Jun 19, 2023

but is there anything special to configure on a fresh nextcloud instance to make sync work?

Mine is pretty much a stock install, I've not configured much except the theming and removing some apps that I don't need.

they all cannot download/read the notes that other clients uploaded to the Saber folder

Are they uploading to one universal Saber folder or their own user account's Saber folder? Saber can only sync to one user account's Saber folder

@punithrudrappa
Copy link

I'm facing the same issue. I really love your project. Can you please help me with this.
It syncs to nextcloud. But changes doesn't get reflected in other devices.

@QubaB
Copy link
Contributor

QubaB commented Mar 1, 2024

I am observing problem that some files are not synchronized from nextcloud.
In the log file is:

flutter: SEVERE: FileSyncer: Failed to download file /Škola/BF/3. cvičení/7.22.sbn2 (Saber/f10b4c04e90a32b20ac0f13121ea34f501817d1a11a1fc47969053421301fd6ef3fe1609a7bbbe.sbe): Invalid argument(s): Invalid or corrupted pad block

Invalid or corrupted pad block is probably caused by decryption of file (File is downloaded, bud decrypter fails). I am trying to investigate it now.

Can you @punithrudrappa post log file?

@punithrudrappa
Copy link

How to get logs? I didn't any such option in docs or in the app settings.

@QubaB
Copy link
Contributor

QubaB commented Mar 2, 2024

How to get logs? I didn't any such option in docs or in the app settings.

Which OS do you use?

I am working on nextcloud synchronization log directly in Saber now, because I think it is important to know about synchronization issues.

@punithrudrappa
Copy link

Mac, android, ios

@QubaB
Copy link
Contributor

QubaB commented Mar 2, 2024

Try youtube and search for "android logcat viewer". I have no experience with Mac and ios.

I am using Windows (there it is easy to obtain logs running Saber from console: Saber.exe > log.txt 2>&1) and AndroidStudio for Saber development so I have easy access to logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working nextcloud Issues regarding logging in to a Nextcloud server
Projects
None yet
Development

No branches or pull requests

5 participants