Akylas / OSS-DocumentScanner

Android document document scanning app
https://www.akylas.fr
MIT License
612 stars 22 forks source link

[BUG] Share to Export Folder crashes Share-Button #254

Open will2048 opened 6 days ago

will2048 commented 6 days ago

Version

v1.9.9 Build 85

What platform are you using?

No response

OS Version

Android 13, Security Update 5th June 2024

What happened?

Clicked Share Button > First Entry "Exportordner Download" Screenshot_2024-07-04-22-06-07-16_95dcfb87bea3b5fbac634956b75eabe9

File Explorer is Material Files. Selected WebDav-Folder on my nextcloud. Clicked "Diesen Ordner verwenden" (Select current folder) Screenshot_2024-07-04-22-06-33-49_5734e8eb49b4234b62f913f831715b0f

Clicked "Zulassen" (allow) Screenshot_2024-07-04-22-06-44-40_5734e8eb49b4234b62f913f831715b0f

Error "Cannot read properties of null (reading 'split') Screenshot_2024-07-04-22-06-55-26_95dcfb87bea3b5fbac634956b75eabe9

Error persists till then wenn share button is clicked. Also after restart app.

Workaround: Export Settings. Clear App-Cache and -Files. Reimport Settings.

Alternative to fix this special bug would be to expand the export folder setting to use also webdav instead of local path. export path is actual found under pdf-export but here it is used to export jpg/png. It should be placed one level up next to webdav sync.

Greetings and again thanks a lot for this fine app.

Relevant log output

No response

Code of Conduct

farfromrefug commented 5 days ago

@will2048 thanks for the detailed report. I am trying to reproduce it. I did add my webdav folder in MaterialFiles but i cant get MaterialFiles to be used as a folder picker from my app. It still uses the system files app. Is there anything special to do? The issue is then i cant choose the nextcloud webdav folder if i am not in materialfiles, right?

will2048 commented 5 days ago

If I remember correctly you have to disable your default file explorer (Google Files or Samsung File-App) in the app management. Then a popup shows up where you can select your new default file explorer.

farfromrefug commented 5 days ago

I cant disable it. Will try more

will2048 commented 5 days ago

This may help: https://support.google.com/pixelphone/thread/89199881/switch-back-to-default-file-manager-google-pixel-5-android-11?hl=en

farfromrefug commented 16 hours ago

@will2048 so i managed to disable my default files app. Then i tried to reproduce your issue. but I get android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.OPEN_DOCUMENT_TREE error while trying to set the export folder. That error means that Material Files does not support the action android.intent.action.OPEN_DOCUMENT_TREE which is true https://github.com/zhanghai/MaterialFiles/blob/61a3cffede303d159ee9ad805319b89c21c3aa04/app/src/main/AndroidManifest.xml#L127

My question is dont get how it can be working for you. Are you sure:

will2048 commented 8 hours ago

Mea Culpa!

Your absolutely right. I own a realme-Phone and the design of its file explorer is so similar i didn't realised it. 🤦‍♂️

So i also can't figure out how to change the default explorer.

Would be my alternative to set a webdav-folder as an export destination folder an option for you? So this would be a rather a FEATURE REQUEST.

My goal with your awesome App is to quickly scan our till receipts / sales slips directly to a network storage to collect them digitally.

So I don't need OCR and meta data but cut to size, optical optimised image files sent to my nextcloud. IMHO there must be a bunch of people out there who would appreciate this. Because the WebDav synchronisation is already implemented and works well, it shouldn't be so hard to implement it, isn't it?! 🤔

Thanks for your time, work and knowledge building this stuff.

farfromrefug commented 6 hours ago

@will2048 Ok i understand better. What s the name of the file app? Do you know if i can get it somewhere to test with it?

So what you are asking for is automatic syncing of "images" to a webdav folder. For now it is the app data which is synced to a webdav folder not the "image" (with all settings applied like brightness, filters...). I think i see way to do that . Please open a Feature Request for that.

will2048 commented 5 hours ago

258

Done!