OSS-DocumentScanner icon indicating copy to clipboard operation
OSS-DocumentScanner copied to clipboard

[BUG] WebDav to Nextcloud Upsync works but can not Downsync to new Phone!

Open t0cc opened this issue 10 months ago • 13 comments

Which app is your issue for

Document Scanner

Version

1.13.7 Build 113 (on both phones)

What platform are you using?

Android

OS Version

15 (on both phones)

What happened?

I used WebDAV Sync on my old phone to sync all pictures to Nextcloud (LAN). The documents are now in the Nextcloud folder, but I cannot download them to the new phone using exactly the same settings.

Both phones are Pixel phones with same OS version, same OSS app version, exactly same WebDAV settings. Both sync tests show a green confirmation button. Both can connect to Nextcloud via browser. Everything looks fine, but downloading the sync to the new phone does nothing but spin the wheel.

I have had this for three months, never got any down sync working. Where are saved image scans stored so that I can manually import/export them to a new phone?

Relevant log output


Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

t0cc avatar Jan 22 '25 15:01 t0cc

@t0cc sorry to hear that. Do you have some error? BTW are you using data sync? or PDF/Image sync?

2way sync only work with data sync. If you use image/pdf there is no way to import them back as app "document".

farfromrefug avatar Jan 22 '25 16:01 farfromrefug

I have tried all three methods. Unfortunately, no errors are shown and only the old phone's folders are shown in Nextcloud.

Does this mean I will not be able to export and import my data to the new phone once I switch phones? I thought app data sync was used for this export > import process?

t0cc avatar Jan 22 '25 19:01 t0cc

@t0cc let s just clarify things a bit:

  • set up webdav on phone 1
  • sync on phone 1
  • data appears on webdav server
  • setup webdav on phone 2 with same settings /remote folder
  • sync on phone 2
  • data should appear on phone 2

This is what i use kind of daily on my phones/tablets

I just tested that process again here and it worked. BTW where did you install the app from?

farfromrefug avatar Jan 23 '25 09:01 farfromrefug

Yes, I did, expecting the same results as you.

Yesterday I had something new. After changing the cloud folder (app data) on phone 2 to a non-existent remote folder, pressing the Test button still showed Successful ?!

Then going back to the documents and pressing the sync icon shows this error: Error TypeError: Cannot convert undefined or null to object.

I will now reinstall the app on phone 2:

Reinstalling the App from Google Play and setting sync for App-Data and Sync for documents with same settings as on phone 1 shows the same Error from above.

  • Server address: http://192.168.1.123/remote.php/dav/files/user1
  • Authentication PASSWORD
  • Admin + PW same as in browser of phone 2 and same as in OSS phone 1
  • Cloud folder Documents/OSs

I do not know what else to say right now. Something is strange. I may reinstall the app on both phones tonight and sync to a new empty Nextcloud folder.

EDIT: I just realize I can not delete OSS on phone 1 as this would wipe all my documents, too.

BTW, is it normal for me to have to re-enter the admin password when I change a setting before saving it?

t0cc avatar Jan 23 '25 13:01 t0cc

@t0cc about the password yes the app does not store your password (for obvious security reasons), so whenever you modify the webdav settings you need to enter the password again

And yes until we got it working dont uninstall/install the app. What s important is to see the logs from the "second" installation from where you want to connect. Seeing you are using play store version is good as you can send me bug reports:

  • can you share a screenshot/list of the content of the synced folder on webdav? Should look something like this. Also add a screenshot of the convent of like the first folder inside it Image
  • on the "second" phone. once you ve setup webdav. go back the main view, trigger a sync with the sync button. Then go back into setting and use the "feedback" menu entry. In the dialog add your mail (so we can chat privately about your issue) and click send. Maybe after that close and open the app to ensure the bug report is sent.
  • let me know when it is done so that i can find the bug report on my sentry instance

farfromrefug avatar Jan 23 '25 13:01 farfromrefug

What I notice in your screenshot is a file called folders-json. I cannot find this in my Nextcloud folder.

The rest looks very similar. Here are some screenshots:

Image Image

If this folders-json file and my screenshots do not help, I will start the suggested debugging process tomorrow.

t0cc avatar Jan 23 '25 22:01 t0cc

@t0cc the folder.json is there only if you use folders. So kind of normal for you not to have it. What bugs is that in 1715785299045 you have a subfolder but also a data.json . This would explain why it cant sync back on the new phone. By any chance could you privately share/create with a test account on your nextcloud so that i can try and see what could be the issue? But clearly the issue comes from the "first" phone which do not completely sync the data on your nextcloud. Also a quick test you can do is remove the OSs folder on your nextcloud and try to sync back from first phone

farfromrefug avatar Jan 24 '25 10:01 farfromrefug

What bugs is that in 1715785299045 you have a subfolder but also a data.json . This would explain why it cant sync back on the new phone. Here is an example search resul for data.json FYI

Image

@farfromrefug I assume the number is a typo, right? Because I don't see it in my screenshots, and not in this folder number either.

By the way, I updated both OSS to version 0.14.0 Build 116.

What I tried now is to create a new upload folder on Nextcloud. Delete all Phone 1 WebDAV entries and create new ones. The test button is successful, but no files are uploaded from either phone.

So it looks like something is wrong again. I think I will stop investigating. I was using the Nextcloud snap version on desktop and sharing this would be quite difficult. Furthermore, I probably also uploaded the files a month ago with another OSS version before trying to sync on phone 2, too. So many variables I can not trace back, really.

If you do not mind, we will just leave it as is, as I can still download all the files to my PC and do what I want with them anyway. Just thought I would let you know in case we find an obvious fix for this.

t0cc avatar Jan 24 '25 16:01 t0cc

@t0cc ok you might be hitting a bug, which prevented sync to even start, that i might have fixed today! please try 1.4.1 when you can and report how it goes

farfromrefug avatar Jan 24 '25 20:01 farfromrefug

Well, still no sync. Maybe I did something wrong by setting the same destination folder for AppData, PDF and Document Images at some point in the past and that caused this problem?! The sync icon on the main page now seems to go grey after flashing for a second.

t0cc avatar Jan 24 '25 22:01 t0cc

@t0cc there has been quite a few fixes. Is this still an issue?

farfromrefug avatar Feb 05 '25 13:02 farfromrefug

@farfromrefug Except for a longer error message saying "... More details can be found in the server log." there is still no download happening. I am not sure, if we can even fix it here, because who knows what happened the last months with this setup.

I installed the Nextcloud Snap. Furthermore, I disabled IP block lists and set LAN IP network in Nextcloud as allowed list settings. But besides that, neither up nor download works any more.

Btw. I would recommend adding some examples in the App sync input fields, to know better what to enter in each input box and if all point to the same folder or three separate ones e.g.

t0cc avatar Feb 11 '25 23:02 t0cc

@t0cc you get an error message? Looking at the log might give us the answer here. If it says More details can be found in the server log then you should look at your nextcloud log. You can share it privately with me if you want

farfromrefug avatar Feb 12 '25 14:02 farfromrefug