vauvenal5 / yaga

Nextcloud Yaga - A Nextcloud first gallery app for Android.
https://vauvenal5.github.io/yaga-docs/
GNU General Public License v3.0
136 stars 9 forks source link

File/Folder Names that look like URL parts are not handled properly #123

Closed Aurnytoraink closed 3 years ago

Aurnytoraink commented 3 years ago

No pictures. Just a empty space photo_2021-04-10_17-48-27

yaga.isolate.log.txt yaga.log.txt

nazo2004 commented 3 years ago

Doesn't it show up when you press BrowserView? IMG_20210412_050155

Aurnytoraink commented 3 years ago

Nope, still empty Screenshot_20210411-234259

nazo2004 commented 3 years ago

Oh, I see. Sorry.

vauvenal5 commented 3 years ago

@Aurnytoraink can you send me your logs?

Aurnytoraink commented 3 years ago

yaga.isolate.log.txt

2021-04-13 11:55:05.512548 INFO LogErrorFileHandler - Opened file
2021-04-13 11:55:11.920825 SEVERE NextCloudService - FormatException: Invalid empty scheme (at character 1)
:443/
^

2021-04-13 11:55:21.319746 SEVERE NextCloudService - FormatException: Invalid empty scheme (at character 1)
:443/
^

2021-04-13 11:55:23.053018 SEVERE NextCloudService - FormatException: Invalid empty scheme (at character 1)
:443/
^

2021-04-13 11:55:25.005345 SEVERE NextCloudService - FormatException: Invalid empty scheme (at character 1)
:443/
^

2021-04-13 11:55:25.717319 SEVERE NextCloudService - FormatException: Invalid empty scheme (at character 1)
:443/
^

yaga.log.txt

2021-04-13 11:55:05.269484 INFO LogErrorFileHandler - Opened file
2021-04-13 11:55:05.442994 SHOUT LogErrorFileHandler - ------- DEVICE INFO -------
2021-04-13 11:55:05.443159 SHOUT LogErrorFileHandler - id: QKQ1.190716.003
2021-04-13 11:55:05.443186 SHOUT LogErrorFileHandler - androidId: d5e337f5719b6ff1
2021-04-13 11:55:05.443204 SHOUT LogErrorFileHandler - board: msmnile
2021-04-13 11:55:05.443215 SHOUT LogErrorFileHandler - bootloader: unknown
2021-04-13 11:55:05.443241 SHOUT LogErrorFileHandler - brand: OnePlus
2021-04-13 11:55:05.443254 SHOUT LogErrorFileHandler - device: OnePlus7T
2021-04-13 11:55:05.443266 SHOUT LogErrorFileHandler - display: HD1903_14_210128
2021-04-13 11:55:05.443276 SHOUT LogErrorFileHandler - fingerprint: OnePlus/OnePlus7T_EEA/OnePlus7T:10/QKQ1.190716.003/2101282100:user/release-keys
2021-04-13 11:55:05.443290 SHOUT LogErrorFileHandler - hardware: qcom
2021-04-13 11:55:05.443300 SHOUT LogErrorFileHandler - host: ubuntu-14
2021-04-13 11:55:05.443312 SHOUT LogErrorFileHandler - isPhysicalDevice: true
2021-04-13 11:55:05.443320 SHOUT LogErrorFileHandler - manufacturer: OnePlus
2021-04-13 11:55:05.443329 SHOUT LogErrorFileHandler - model: HD1903
2021-04-13 11:55:05.443337 SHOUT LogErrorFileHandler - product: OnePlus7T_EEA
2021-04-13 11:55:05.443344 SHOUT LogErrorFileHandler - tags: release-keys
2021-04-13 11:55:05.443356 SHOUT LogErrorFileHandler - type: user
2021-04-13 11:55:05.443372 SHOUT LogErrorFileHandler - versionBaseOs: 
2021-04-13 11:55:05.443384 SHOUT LogErrorFileHandler - versionCodename: REL
2021-04-13 11:55:05.443395 SHOUT LogErrorFileHandler - versionIncremental: 2101282100
2021-04-13 11:55:05.443406 SHOUT LogErrorFileHandler - versionPreviewSdk: 0
2021-04-13 11:55:05.443433 SHOUT LogErrorFileHandler - versionRelease: 10
2021-04-13 11:55:05.443445 SHOUT LogErrorFileHandler - versionSdk: 29
2021-04-13 11:55:05.443453 SHOUT LogErrorFileHandler - versionSecurityPatch: 2021-01-01
2021-04-13 11:55:05.443461 SHOUT LogErrorFileHandler - ------- END DEVICE INFO -------
2021-04-13 11:55:05.458225 SHOUT LogErrorFileHandler - ------- APP INFO -------
2021-04-13 11:55:05.458310 SHOUT LogErrorFileHandler - environment: release
2021-04-13 11:55:05.458329 SHOUT LogErrorFileHandler - version: 0.23.12
2021-04-13 11:55:05.458341 SHOUT LogErrorFileHandler - appName: Yaga
2021-04-13 11:55:05.458355 SHOUT LogErrorFileHandler - buildNumber: 2312
2021-04-13 11:55:05.458367 SHOUT LogErrorFileHandler - packageName: com.github.vauvenal5.yaga
2021-04-13 11:55:05.458379 SHOUT LogErrorFileHandler - ------- END APP INFO -------
2021-04-13 11:55:05.522408 WARNING FileListLocalManager - 52c10920-9c3e-11eb-b492-2b77575b78f3 (start)
2021-04-13 11:55:05.535351 WARNING FileListLocalManager - 52c10920-9c3e-11eb-b492-2b77575b78f3 (received list - #images: 0)
2021-04-13 11:55:05.535713 WARNING FileListLocalManager - 52c10920-9c3e-11eb-b492-2b77575b78f3 (done - manager key)
2021-04-13 11:55:05.535768 WARNING FileListLocalManager - 52c10920-9c3e-11eb-b492-2b77575b78f3 (done - event key)
2021-04-13 11:55:07.628191 WARNING FileListLocalManager - 52c10920-9c3e-11eb-b492-2b77575b78f3 (start)
2021-04-13 11:55:07.632333 WARNING FileListLocalManager - 52c10920-9c3e-11eb-b492-2b77575b78f3 (received list - #images: 0)
2021-04-13 11:55:07.632825 WARNING FileListLocalManager - 52c10920-9c3e-11eb-b492-2b77575b78f3 (done - manager key)
2021-04-13 11:55:07.632896 WARNING FileListLocalManager - 52c10920-9c3e-11eb-b492-2b77575b78f3 (done - event key)
2021-04-13 11:55:08.581407 WARNING FileListLocalManager - 52c10920-9c3e-11eb-b492-2b77575b78f3 (start)
2021-04-13 11:55:08.587168 WARNING FileListLocalManager - 52c10920-9c3e-11eb-b492-2b77575b78f3 (received list - #images: 0)
2021-04-13 11:55:08.587751 WARNING FileListLocalManager - 52c10920-9c3e-11eb-b492-2b77575b78f3 (done - manager key)
2021-04-13 11:55:08.587861 WARNING FileListLocalManager - 52c10920-9c3e-11eb-b492-2b77575b78f3 (done - event key)
2021-04-13 11:55:10.039954 WARNING FileListLocalManager - 55724670-9c3e-11eb-836e-5dbc61f7a624 (start)
2021-04-13 11:55:10.077412 WARNING FileListLocalManager - 55724670-9c3e-11eb-836e-5dbc61f7a624 (received list - #images: 0)
2021-04-13 11:55:11.922830 WARNING FileListLocalManager - 55724670-9c3e-11eb-836e-5dbc61f7a624 (done - manager key)
2021-04-13 11:55:11.922989 WARNING FileListLocalManager - 55724670-9c3e-11eb-836e-5dbc61f7a624 (done - event key)
2021-04-13 11:55:20.972456 WARNING FileListLocalManager - 5bf684c0-9c3e-11eb-9e45-75fa21656360 (start)
2021-04-13 11:55:20.995228 WARNING FileListLocalManager - 5bf684c0-9c3e-11eb-9e45-75fa21656360 (received list - #images: 0)
2021-04-13 11:55:21.326393 WARNING FileListLocalManager - 5bf684c0-9c3e-11eb-9e45-75fa21656360 (done - manager key)
2021-04-13 11:55:21.326528 WARNING FileListLocalManager - 5bf684c0-9c3e-11eb-9e45-75fa21656360 (done - event key)
2021-04-13 11:55:22.691913 WARNING FileListLocalManager - 5bf684c0-9c3e-11eb-9e45-75fa21656360 (start)
2021-04-13 11:55:22.695957 WARNING FileListLocalManager - 5bf684c0-9c3e-11eb-9e45-75fa21656360 (received list - #images: 0)
2021-04-13 11:55:23.053936 WARNING FileListLocalManager - 5bf684c0-9c3e-11eb-9e45-75fa21656360 (done - manager key)
2021-04-13 11:55:23.054065 WARNING FileListLocalManager - 5bf684c0-9c3e-11eb-9e45-75fa21656360 (done - event key)
2021-04-13 11:55:24.635236 WARNING FileListLocalManager - 5e2572b0-9c3e-11eb-a6cc-73e60b8f3c27 (start)
2021-04-13 11:55:24.653946 WARNING FileListLocalManager - 5e2572b0-9c3e-11eb-a6cc-73e60b8f3c27 (received list - #images: 0)
2021-04-13 11:55:25.006651 WARNING FileListLocalManager - 5e2572b0-9c3e-11eb-a6cc-73e60b8f3c27 (done - manager key)
2021-04-13 11:55:25.006819 WARNING FileListLocalManager - 5e2572b0-9c3e-11eb-a6cc-73e60b8f3c27 (done - event key)
2021-04-13 11:55:25.383423 WARNING FileListLocalManager - 5e2572b0-9c3e-11eb-a6cc-73e60b8f3c27 (start)
2021-04-13 11:55:25.388055 WARNING FileListLocalManager - 5e2572b0-9c3e-11eb-a6cc-73e60b8f3c27 (received list - #images: 0)
2021-04-13 11:55:25.719318 WARNING FileListLocalManager - 5e2572b0-9c3e-11eb-a6cc-73e60b8f3c27 (done - manager key)
2021-04-13 11:55:25.719467 WARNING FileListLocalManager - 5e2572b0-9c3e-11eb-a6cc-73e60b8f3c27 (done - event key)
vauvenal5 commented 3 years ago

Sorry for the late response. It looks like the app can not access your server. Have you tried to logout and login again?

Aurnytoraink commented 3 years ago

Yes I tried it but it's still the same behaviour

vauvenal5 commented 3 years ago

Have you tried uninstalling it and installing it again?

The weird thing is that it is obviously able to fetch your user icon but fails when trying to retrieve the file list.

Aurnytoraink commented 3 years ago

Yes, even on a different phone. But I try to create another account for testing purpose with the default Nextcloud files and it works.

So I assume there is a problem you have too much photos (like 160Go) with too much file (like 975Go) I don't know if the problem is due to a too aborded requests because it was too long, if the problem comes from my server's speed, or if the app can't process too many files

vauvenal5 commented 3 years ago

The total size of the files should not be the issue. One thing that could be is that the file list is to long, as far as I know Nextcloud does not support pagination yet.

I have already loaded over 10k photos successfully in the app. However, this was done with recursive mode on. I have never tested how many files I can load from a single directory.

Edit: Yaga resets the log every time you close the app. It would be interesting if you could send me a log file for the entire login process. Maybe we can see something more in there.

Aurnytoraink commented 3 years ago

Well on the root folder, I have around 23 folders, but these are subfolders which may contain other 135 folders. I don't know how to count all folder and files but I think the answer is more than 1000 (even 10000)

For the hardware, I recycled my laptop. It has an Intel Celeron N2940 with, 4GB of RAM, and the data is stored on an external 3.0 2TB drive

Currently, I'm on the same wifi, but I'm not using a local connection since I connect to my server via the domain name

Aurnytoraink commented 3 years ago

yaga_log.txt Edit @vauvenal5: removed for security reasons (you URL was fully visible in the log, in future you can also send them via email to me)

yaga.txt

2021-04-25 09:46:15.176995 INFO LogErrorFileHandler - Opened file
2021-04-25 09:46:29.620366 SEVERE NextCloudService - FormatException: Invalid empty scheme (at character 1)
:443/
^

2021-04-25 09:46:31.223692 SEVERE NextCloudService - FormatException: Invalid empty scheme (at character 1)
:443/
^

2021-04-25 09:46:35.222149 SEVERE NextCloudService - FormatException: Invalid empty scheme (at character 1)
:443/
^
vauvenal5 commented 3 years ago

23 folders should not be a problem. I have more in my root and everything is fine. Since the browse view does not work, which always loads only the currently displayed folder it can not be a mass issue.

Other apps work fine with your setup?

vauvenal5 commented 3 years ago

I just published 0.25.1 with improved logging in the NC service. Please send me new log files once you have the update. Please note that the logs are not anonymized so please send them to me by mail.

Aurnytoraink commented 3 years ago

Done! Check your mail

vauvenal5 commented 3 years ago

Do you have a folder that is named :443?

Aurnytoraink commented 3 years ago

Yes

vauvenal5 commented 3 years ago

That's the issue. It is not being handled correctly in the app. I will have a look.

Aurnytoraink commented 3 years ago

Do you think there is a lack of support for special caracters ? I know it's a stupid name 😂

Also, do a test for emoji named folder, because yes, I do so

vauvenal5 commented 3 years ago

I am handling folder structures internally as a urls and escaping special chars (so emojis should be fine) but : is from a url perspective not a special char and I guess this leads to the path not being properly parsed.

Aurnytoraink commented 3 years ago

Oh okay! I'm sorry for breaking your app 😂

vauvenal5 commented 3 years ago

Nah, its a valid bug report. This should work.

vauvenal5 commented 3 years ago

this is actually an issue in the upstream library https://github.com/jld3103/dart-nextcloud/issues/37

vauvenal5 commented 3 years ago

Upstream fixed it. But I will need a few more days before I can publish a new version with the fix in it.

Aurnytoraink commented 3 years ago

So seems to be fix !38 ?

vauvenal5 commented 3 years ago

Yes it is. I need to republish on my side. Today or tomorrow.

Aurnytoraink commented 3 years ago

Nice !

vauvenal5 commented 3 years ago

fixed in v0.25.2