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

Stuck in loading screen #89

Closed LukeVader-IV closed 3 years ago

LukeVader-IV commented 3 years ago

Hey, before connecting to my server i don't have any issues and works as I think it's supposed to, however the moment I link it up it doesn't load any images from the server and the moment I close and reopen the app it gets stuck in the loading screen.

Server: CentOS stream (Linode) Phone: Android 11 (sonny Xperia 10 ii)

I tried the latest version in both the google play store and F-droid and I tried rolling back to 0.20.3 and 0.15.6 but the issue persists I can provide you with any other necessary information about the system and configuration

LukeVader-IV commented 3 years ago

I tested the app on a Pixel 2a and the exact same thing happens also, I noticed you are using .png for images that could be made much more efficiently in .svg, is there a reason for this?

vauvenal5 commented 3 years ago

Hi!

When you login to your server and change to Browse View and then tap on your account does it load anything? Also does your user icon get loaded?

Can you elaborate on the png vs svg question? The app should be providing your files like they are on the server.

LukeVader-IV commented 3 years ago

So I tried recreating the issue again however It now suddenly seems to work as it should and I haven't changed anything. I'll try to reproduce the issue again when i can so i can post screenshots.

About the .SVG question it was not about the files on the server but the project assets being .PNG like app icon and such.

LukeVader-IV commented 3 years ago

So i tried once again to connect the Pixel 2a and the same issue happens once again, here are the screenshots i took:

signal-2021-02-28-141119_001 signal-2021-02-28-141119_002 signal-2021-02-28-141119_003 signal-2021-02-28-141119_004

vauvenal5 commented 3 years ago

About the assets, I used generations tools to automatically create them to be honest.

LukeVader-IV commented 3 years ago

the Grey areas are not edited in and how it actually looks like. I downloaded The app from Google play and F-Droid so i assume so and I also tried older versions with the exact same issue, meaning the grey squares and stuck in loading screen as for the logs I searched the entire phone via USB and didn't find it, where should they be?

LukeVader-IV commented 3 years ago

I just realised you wrote 'logcat' so i'll try my best.

vauvenal5 commented 3 years ago

Logcat logs have to be retrieved with ADB. Its a Android dev tool but if you do not have it don't worry I will think of something else.

It looks like for some reason the app is not able to load the user icon and that leads to the grey areas. I am not yet sure why this happens.

LukeVader-IV commented 3 years ago

ok so I was struggling a little with adb logcat but I figured it out as it's the first time i'm using adb for anything else then rooting i'm not too experienced with it but i copied and pasted the output in some text files, i did it both on the sony where it seems to work now and the pixel where it still doesn't work so you could maybe see the difference [edit vauvenal5: removed for security]

If i accidentally cut something important out, let me know.

vauvenal5 commented 3 years ago

Hi! Thanks I downloaded them and will have a look if I see anything in there. I removed them from Github to make sure nothing gets leaked by accident.

LukeVader-IV commented 3 years ago

oh yeah thanks, I didn't think about that (-:

vauvenal5 commented 3 years ago

Sadly I do not see anything in the log. Can you by chance try again? Also while recording the log please open the drawer and also navigate to the Browse View. And just send it by email if possible, thx!

In the working log I can see how the file list gets fetched successfully.

LukeVader-IV commented 3 years ago

I just sent you a new file with logs through email, it should be in your inbox. I didn't have an opportunity to do so before now so sorry for the delay

vauvenal5 commented 3 years ago

Okay, for some reason the app is not able to load your user information from the server. You have a standard Nextcloud setup? Or did you deactivate the OCS API (not even sure that is possible)?

LukeVader-IV commented 3 years ago

well it's a pretty standard setup and I'm pretty sure open collaboration services are enabled by default, also don't forget I did get it to connect to the server on the Sony Xperia and it still works, even though I'm not doing anything different and it didn't work multiple times before

If you know how i could double check it i could try but it doesn't make a lot of sense to me I could also try disconnecting and reconnecting the Sony and get logs of that

Edit: just to be 100% sure we're on the same page the logs i sent you are logs of my trying to open the app and getting stuck in the loading screen, I now think that something gets saved incorrectly in the app at first connection attempt AKA when you set up the server and after that it tries to communicate with the server and fails causing it to get stuck in the loading screen. So a bug with the app, not an issue with the next cloud server

vauvenal5 commented 3 years ago

Yes, you are right otherwise it would not work on all devices. It would be great if you can send a full log of an initial login maybe we can then see the original exception and not only the aftereffect. Best would be to uninstall and re-install the to make sure everything is deleted.

If that does not help identify the exact cause I will increase logging output around the code responsible for Nextcloud integration and also around the code responsible for persisting login information locally and publish a new version. However, this will probably have to wait till end of week when I have some more time.

LukeVader-IV commented 3 years ago

I sent you the login logs through email, this time it is the Sony (the device that was working) and as i expected it no longer worked after doing this, so it's not something device specific and not something with my network either as i logged in on a different network

LukeVader-IV commented 3 years ago

I tried looking at the logs more closely this time and Errors are handily marked in red, I noticed a batch of SQL lite errors that i didn't notice in the other logs.

LukeVader-IV commented 3 years ago

i realise that on this network DAVx5 also gives an error and I can't even SSH to the server so these issues are actually probably not caused by the app but by this bad network implementation, I'll send you more logs once I'm back on a decent network

LukeVader-IV commented 3 years ago

In the new Logs i no longer see the SQL lite errors but I'm like 90% sure that something gets configured incorrectly at setup and it just never gives up, Is there no way to check whether or not you are actually able to retrieve the necessary information if not and at least cause a pop up with an error? because this way a user will simply think it's taking ages to load.

vauvenal5 commented 3 years ago

Hey! First of all thanks for the logs you submitted up until now! Very helpful.

I just had a look into your last submitted logs and I can see an exception in there but not the cause of it. I will improve logging and publish a new version which logs out more details.

Regarding your second suggestion, yes, it is one of the open todos to display errors to the user instead of failing silently.

LukeVader-IV commented 3 years ago

Great, Just notify me when ya release the new version :)

vauvenal5 commented 3 years ago

New version is up in the PlayStore. v0.22.3 contains improved logging. So if you could send me a new logcat file we will hopefully finally find the issue.

LukeVader-IV commented 3 years ago

Hey thanks, Unfortunately i don't have access to my tools right now due to unfortunate circumstances, however i should be able to do it this weekend (Sorry to keep you waiting)

LukeVader-IV commented 3 years ago

I just sent you new logs through email, however i haven't had the opportunity to check them out myself

vauvenal5 commented 3 years ago

I had a look and replied to you by mail. For some reason your access to the user information endpoint is denied. Did you do a full re-login while recording the logs? Can you also try if you have the same issue if you login with a app password instead?

LukeVader-IV commented 3 years ago

yes it was a log of me logging in after installing the app and I find that weird, does it maybe communicate with any other ports outside of the default http and https ports that might be blocked? also you lost me on the app password part

vauvenal5 commented 3 years ago

In your Nextcloud go to Settings and then to Security. At the bottom of the page you can manually create an app passwords. When logging into Yaga at the bottom of the screen there is an option to login with an app password.

Screenshot_1615723328

vauvenal5 commented 3 years ago

@LukeVader-IV any nows here? Is this still an open issue?

LukeVader-IV commented 3 years ago

hey, yeah sorry for the silence, I broke my phone and I've been way too busy to bring it to a repair shop for the moment, I'll get back to you once I get it repaired

LukeVader-IV commented 3 years ago

hey so i know it's been a few months but i was busy doing stuff like my end of year exams but i finally had some free time to try to get more logs and see if the issue is still there, i'm happy to report that the app now behaves as expected

sorry for the silence, but great work (: 👍🏻