MarmadileManteater / FreeTubeAndroid

A soft fork of FreeTube which brings it to Android (formerly FreeTubeCordova)
GNU Affero General Public License v3.0
243 stars 6 forks source link

[Bug]: app goes to background immediately #327

Open elpaso opened 3 months ago

elpaso commented 3 months ago

Guidelines

Describe the bug

  1. Install the app from F-Droid after adding the repo
  2. run the app
  3. search for "Sting"
  4. click on first result
  5. play first video result
  6. video starts buffering
  7. the app screen disappears, no video or sound is played
  8. two notifications: "Freetube is running in the background" and another one with the player control symbols "<| || >|"
  9. clicking on the notifications has no effect

Expected Behavior

the video plays

Issue Labels

content not loading

FreeTube Version

v0.20.0.11 Beta

Operating System Version

android 10

Installation Method

.apk

Primary API used

Local API

Last Known Working FreeTube Version (If Any)

No response

Additional Information

No response

Nightly Build

MarmadileManteater commented 3 months ago

It sounds like the app is crashing.

MarmadileManteater commented 3 months ago

The notification doesn't get cancelled because the lifecycle hook isn't called when the app crashes like that, but the app is not still running. Well, the service probably is, but the activity is not.

elpaso commented 3 months ago

Yes, the app is crashing, after a while the OS tells me that the app is repeatedly crashing. Is there anything I can do to debug this?

MarmadileManteater commented 3 months ago

You have to download the nightly (release is no longer debuggable), and you should be able to read the logs using logcat (although, you might be able to read logcat for release, idk, but if you actually want to debug and step through the code, you need nightly). I would personally use android studio (since I already have it), but it might be easier to just get the SDK platform tools and run adb logcat.

Typically, most problems can be debugged with the chrome inspector, but this problem doesn't seem like it would be easy to debug this way seeing as the problem would definitely result in the webview being destroyed, closing the debug session.