photoprism-mobile icon indicating copy to clipboard operation
photoprism-mobile copied to clipboard

Videos don't upload [android]

Open gomme600 opened this issue 4 years ago • 13 comments

Any video bigger than a few MB doesn't upload, via auto-ypload the app just crashes and when restarting the upload the same thing happens again. The only way to resume auto-upload is to delete the video from the device... When uploading the same video manually the app doesn't crash but after fully uploading it to the server it returns an error, the server log doesn't show any activity. Uploading the same video from the web interface works. Thanks for any help with this!

gomme600 avatar Jan 06 '21 21:01 gomme600

Are there any updates on this yet? The developpement for this app seems pretty dead unfortunately. I am available for testing if need be.

gomme600 avatar Feb 08 '21 10:02 gomme600

my largest video is around 90MB and uploads just fine, how large are the videos we are talking about here? And are you úsing android or ios?

My priorities are currently at these two PRs (https://github.com/photoprism/photoprism-mobile/pull/96, https://github.com/photoprism/photoprism/pull/995), but I can look into this bug on the weekend.

thielepaul avatar Feb 10 '21 17:02 thielepaul

Ok thanks. On Android 10, on a OnePlus 7t. Videos above a few megabytes, like 20. One very short 9 sec clip did upload at the very beginning I think. Almost any video seems to crash the upload, the app just crashes with no error and nothing in the logs. Restarting the upload does the same thing. The only way to resume is to delete the video from the phone. Then it crashes again on the next one. Uploading the same videos via the web GUI works fine. Uploading 1000s of photos from the app also works fine.

gomme600 avatar Feb 10 '21 18:02 gomme600

uploading through the web interface works well for the same video file, I suppose? The best thing to find the cause of this problem would be if you could install flutter, setup adb for your phone and then use flutter logs to to display the log output of the app. I will anyway check if I can reproduce this problem with larger video files.

thielepaul avatar Feb 10 '21 19:02 thielepaul

ok, I think I found the problem (tried with 315MB video):

E/AndroidRuntime(10243): java.lang.OutOfMemoryError: Failed to allocate a 314757000 byte allocation with 25165824 free bytes and 253MB until OOM, target footprint 27632880, growth limit 268435456

I will need to think about how this can be fixed

thielepaul avatar Feb 10 '21 19:02 thielepaul

Ok thanks

gomme600 avatar Feb 11 '21 07:02 gomme600

Do you still need the flutter logs?

gomme600 avatar Feb 11 '21 07:02 gomme600

I believe I fixed the problem. Can you test with the latest apk? https://github.com/photoprism/photoprism-mobile/releases/download/latest/photoprism.apk

thielepaul avatar Feb 11 '21 19:02 thielepaul

Ok, so that seems to have helped! But now everything is marked as failed even if the photo does import into PhotoPrism!

gomme600 avatar Feb 12 '21 11:02 gomme600

Does the issue persist, if you use the "retry all failed" uploads option?

thielepaul avatar Feb 12 '21 14:02 thielepaul

I tried and it didn't work unfortunately. The media does upload though. Resetting the app didn't work either. Here is the log. Thanks for all the help. Screenshot_20210212-193942 Uploading Screenshot_20210212-193946.jpg…

gomme600 avatar Feb 12 '21 18:02 gomme600

Seems like I fixed one bug and introduced another one. I hope it does work for you with the latest commit.

thielepaul avatar Feb 13 '21 07:02 thielepaul

Just uninstalled and installed the latest version from GitHub and the upload is working again, waiting for it to upload a video to see if that works ok aswell.

Edit: A 30MB video just uploaded fine, waiting for some bigger ones.

gomme600 avatar Feb 14 '21 08:02 gomme600