smarttv-twitch icon indicating copy to clipboard operation
smarttv-twitch copied to clipboard

Ads playing crashing the app

Open Elapsed opened this issue 1 year ago • 39 comments

Describe the bug Ads, starting Sep 1st have started to play, and when they finish the app fully crashes. When trying to relaunch the app, when you play a channel the same round of ads will play again, and again they crash. The only workaround is watching in an official app, watching the group of ads, rebooting the tv, and then watching again.

Now the ads don't always crash the app, but it does cause audio and video glitches for a short time after the ads play.

I don't have it installed with the debug tool, I will do that now and get a log tomorrow, but I felt this was important to get up.

To Reproduce Steps to reproduce the behavior:

  1. Go to any channel with ads
  2. Watch ads
  3. Right at the end of the ads the app crashes

Expected behavior I expected no ads, as you have had it that way for many years now. But as long as I can watch without it crashing I'm happy

Device:

  • TV Model: UN55MU6300
  • Os version App Version 4.0.1. August 25 2023. Tizen Version 3.0 | TV: UMU6102 | FW: T-KTMAKUC-1310.1

Elapsed avatar Sep 03 '23 04:09 Elapsed

I cannot get the debug tool to launch, not sure why

Screenshot 2023-09-02 224049

Elapsed avatar Sep 03 '23 05:09 Elapsed

I don't know why the tool will not work.

If you can share the logs will help.

There is s related issue

https://github.com/fgl27/smarttv-twitch/issues/241

fgl27 avatar Sep 03 '23 14:09 fgl27

I have the same problem on my Q8FN but not on my Q60R.

I am surprised that i even get ads when i am subscribed to a channel.

Did twitch change something on their API or why are there suddenly ads showing?

Yozze85 avatar Sep 04 '23 13:09 Yozze85

I have the same problem on my Q8FN but not on my Q60R.

I am surprised that i even get ads when i am subscribed to a channel.

Did twitch change something on their API or why are there suddenly ads showing?

the app doesn't have access to your twitch sub or turbo privileged.

you can see what the app has here

https://github.com/fgl27/smarttv-twitch#twitchtv-app-for-samsung-tv-authorization-request-page

twitch sometimes doesn't show ads for some reason now they show to more people.

No "me too" please, one person reporting an issue is fine, we need someone to help debug and not add to the complaining.

fgl27 avatar Sep 04 '23 17:09 fgl27

well you say it as if i wouldnt have provided further information by telling where the problem occurs and where not.

i could try to help with debugging but i am not familiar on how to debug samsung tv apps.

Yozze85 avatar Sep 04 '23 19:09 Yozze85

well you say it as if i wouldnt have provided further information by telling where the problem occurs and where not.

i could try to help with debugging but i am not familiar on how to debug samsung tv apps.

Here is the how to log

https://github.com/fgl27/smarttv-twitch/issues/250#issuecomment-1328306442

fgl27 avatar Sep 04 '23 20:09 fgl27

Hello @fgl27 . I managed to debug the application when crashing while playing ads (used Chromium 74 because "--disable-web-security and "--disable-site-isolation-trials" flags wasn't working for me).

Here is the screenshot when the crash occurs: Crash 1

And the code in the debugger i that column:

Captura de pantalla 2023-09-30 210544

Hope it helps to find the problem here. Dont heasiate to ask If you want me to try something.

maeseoki avatar Sep 30 '23 19:09 maeseoki

It does help, but not to resolve.

that crash is outside the app code, on the Samsung avplayer API, that the app doesn't control.

@maeseoki can you run the test again but this time install not from release?

If yes install it by downloading the repo

From

https://github.com/fgl27/smarttv-twitch/archive/refs/heads/master.zip

Or from the main page... code > download zip

image

and them here https://github.com/fgl27/smarttv-twitch#setup-the-application

import this folder https://github.com/fgl27/smarttv-twitch/tree/master/app

and then when the error occurred before screenshotting open these triangular buttons

image

like this, so we can see the full path it takes to crash

image

Maybe with this extra info, we will understand this better and help.

Thanks for the help.

fgl27 avatar Oct 03 '23 12:10 fgl27

I am currently trying to get the debug app to work on my TV as OP seems to be missing.

I had to setup Tizen Studio etc from scratch, and I have imported the "app" folder from the master branch. I deleted the Twitch app from the TV. When I try to run it I get this error, and it is so unspecified I dont even know where to start.

Please advice

2023-11-29 13_11_40-workspace - Tizen Studio

jazha avatar Nov 29 '23 12:11 jazha

That is a Tizen SDK bug.

On windows it has various problems, Samsung doesn't properly support it.

As is an java error maybe changing the java version helps but maybe not.

So try a old version of java to see if that helps.

I use Ubuntu and is working fine, but the last time I update Tizen was months ago. So if someone try that maybe buged also.

fgl27 avatar Nov 29 '23 14:11 fgl27

Thanks for the quick reply, I will find a spare machine here to setup with Ubuntu tonight, and then hopefully get some debugging done.

jazha avatar Nov 29 '23 14:11 jazha

I have my spare laptop setup and I finished configuring the Tizen studio, with certificates etc. I could finally reupload the app to the TV successfully using the 4.0.1_V9.zip file

I wanted to test Tizen studio using that file as I cannot figure out any way to get past the error I get when trying to install the from the "app" folder in the master.zip.

Is there something I need to do before I can use the master.zip to install the debug version? Any extra steps etc? I get the same error as above for the master.zip method to try to get debug version installed.

My TV is Tizen 3.0, if that has any implications

jazha avatar Nov 29 '23 17:11 jazha

No diff the install process is the same, the normal mode and debug must give you the same error.

does?

fgl27 avatar Nov 29 '23 17:11 fgl27

No diff the install process is the same, the normal mode and debug must give you the same error.

does?

I can install and run both modes from the 4.0.1_V9.zip. I get no output in debug mode from running it from this file.

I cannot install or run any of the modes from importing the app folder in the master.zip.

Not sure how to proceed. Should I get output from the app running it in debug when using the files from 4.0.1_V9.zip ?

jazha avatar Nov 29 '23 18:11 jazha

I got it running, apparently I needed to build a signed package first, I did not realize it wouldnt just do it itself automatically. I got the master.zip version running now, but debug on my ubuntu machine only shows a blank white page. Suggestions of how to get them to talk together?

jazha avatar Nov 29 '23 19:11 jazha

None, let me see it

fgl27 avatar Nov 29 '23 20:11 fgl27

It looks like the debugger backend isnt working correctly somehow. It gives no error, just a blank white page after uploading the app to the tv via the "run debug as" meny

debug

jazha avatar Nov 29 '23 20:11 jazha

What browser is that?

Chrome always works for me, but you need to defined it as default browser.

fgl27 avatar Nov 29 '23 23:11 fgl27

What browser is that?

Chrome always works for me, but you need to defined it as default browser.

It is the latest chrome, and it is configured in the studio. Problem is it comes up blank. I tried googling, and the answer seemed to be to try older versions, which I did. I tried different versions of both Chrome and Chromium, unfortunately none worked correctly, so I'm stuck for now.

Its late here, so I will try more after I get some sleep. Hopefully I can get it debugging tomorrow

jazha avatar Nov 29 '23 23:11 jazha

Got it running I think, I could not sleep and tried alot of different solutions from various sources on the internet. Could you confirm I am in the right place? Should I look in the console for logs, or is there somewhere else? I'm off sleep now, hopefully getting something running will ease my brain ;)

console

jazha avatar Nov 30 '23 00:11 jazha

Just the console, reproduce the issue a few times

Open any log that has a button in the form of a triangle and take some screen shots

fgl27 avatar Nov 30 '23 02:11 fgl27

Hello, I caught the crash, here is the only error it shows in console. It keeps throwing the same error multiple times over and over, black screen on TV and no resuming of the stream. If you need more info from somewhere else, or more data, just let me know.

error

jazha avatar Nov 30 '23 09:11 jazha

No that is it.

The player has already those two methods that are supposed to check if the player for some reason stops and restores things.

But I didn't expect that crash, I will add an improvement to account for crashes, and wherever it happens the player will just restart the playback.

I let you know when this is pushed to the app.

Thank you great work!

fgl27 avatar Nov 30 '23 13:11 fgl27

No that is it.

The player has already those two methods that are supposed to check if the player for some reason stops and restores things.

But I didn't expect that crash, I will add an improvement to account for crashes, and wherever it happens the player will just restart the playback.

I let you know when this is pushed to the app.

Thank you great work!

Nice to hear, and happy to be able to help with this.

The app is a great service to us with a TV that doesnt have Twitch available by normal channels.

I should be the one to thank you for your continued support to the project :)

Looking forward to testing the app when the push has gone through. Thanks again!

jazha avatar Nov 30 '23 13:11 jazha

The above was deployed to the app if you have the release installed it must receive the update, just close the app if open and reopen it for it to receive it.

The behavior now must be that the app will detect the problem and restart the player, but as I can't get this I don't know the behavior so it may just restart and work or something else.

If the problem persists repeat the log pelase.

fgl27 avatar Nov 30 '23 14:11 fgl27

Hello, I updated the app and checked that it had the new date set in app. The ad that causes the crash ran directly, and unfortunately it crashed again, see attached image for console output error2

jazha avatar Nov 30 '23 14:11 jazha

Yes the player is gone there....

After that can you exit the player, then open a new stream and it plays fine?

fgl27 avatar Nov 30 '23 14:11 fgl27

The player crashed after exiting the ad and trying to restart the stream.

It looks like the player tries to continue after the ad crash: error3part1

Errors after the player tries to play(I still havent touched any buttons at this point), seems to fail. error3part2

After exiting the ad, and trying to restart stream, the app just closes, I get no error in console unfortunately, this is the last messages before the crash: error3part3

Hope it helps to narrow it down :)

jazha avatar Nov 30 '23 14:11 jazha

Seems that the player is just gone, I have no idea how to recover from this error, and the biggest problem is that it crashes the app itself, which is almost impossible to achieve unless is an OS problem related to the player implementation on Tizen, which this problem is.

The above separates it player initialization function, it may fix but if it doesn't I can have some more info trying to understand what to do next.

please test again and share the logs even if work share it.

fgl27 avatar Dec 01 '23 15:12 fgl27

Two logs here, first one is the same type of crash we had with the ad. Next is the app actually managing to survive the crash, so it worked 1 out of 2 times :)

Log for crash, without recovery: error4

Log for crash with successful recovery: works1

jazha avatar Dec 01 '23 18:12 jazha