Help - Notes not downloading?
Closed this issue · 9 comments
Something got corruped when I was editing my notes, long story short, I recovered my Saber directory from a backup of my nextcloud instance and put it in the /Saber folder in my nextcloud.
Then I tried to synchronize on my computer (latest flatpak version) but I keep getting these errors:
flutter: SEVERE: FileSyncer: Failed to download file /niemiecki/24-02-27 Untitled.sbn2.p (Saber/5c7238dcc12c278171f995d9186fd6d6ba6ba5715fcf901036bf0a4d05a6914b90b702ccfb5074fe7e16def271bc67f9.sbe): RangeError (length): Invalid value: Valid value range is empty: -16
....
flutter: WARNING: FileSyncer: startSync: 117 downloads failed
This is happening with all files, not just the one I was editing when it got corrupted.
Any suggestions on what to do to debug this further?
All webdav downloads result in zero byte files for me currently (but propfind shows non-zero file sizes), that's probably what's causing your error. I've been incredibly busy with uni lately so I've not had a chance to investigate properly
@provokateurin may be able to diagnose the issue, but I can't give this any time atm
Which version of saber are you using and which version of the nextcloud package does that saber version use?
I'm pretty sure it is the same as #945, but this time the problem is saber not setting the content length (see
saber/lib/data/nextcloud/file_syncer.dart
Line 248 in ffb6404
Using nextcloud 6.0.0 with nextcloud/neon#1987
dependency_overrides:
nextcloud:
git:
url: https://github.com/nextcloud/neon.git
ref: fix/nextcloud/webdav-put-require-content-length
path: packages/nextcloud
still gives me an empty file:
ahann@fedora:~/Documents/GitHub/saber$ flutter test -r expanded test/nc_deletion_test.dart
00:00 +0: loading /home/ahann/Documents/GitHub/saber/test/nc_deletion_test.dart
00:00 +0: Test deleting a file and syncing it
00:00 +0 -1: Test deleting a file and syncing it [E]
FormatException: Unexpected end of input (at character 1)
^
dart:convert jsonDecode
package:saber/data/nextcloud/nextcloud_client_extension.dart 60:21 NextcloudClientExtension.getConfig
00:00 +0 -1: Some tests failed.
But that failure is not caused by the upload but by some code of yours.
Can you please check with Wireshark what is actually sent to the server?
I think it could also be nextcloud/neon#1988 which was just filed by another user. Please check what data is actually sent over the network using Wireshark, that would settle what exactly is wrong here.
Thank you very much, I’ll see if it’s working for me when I can