anytime_podcast_player icon indicating copy to clipboard operation
anytime_podcast_player copied to clipboard

while playing any episode when press back button and exit of application and going to it again you will have same exceptions

Open Anthony-Sol opened this issue 4 years ago • 14 comments

Hi Ben ,I hope you are well. while playing any episode when press back button and exit of application and going to it again you will have same exceptions that it make very problem while using app To Reproduce Steps to reproduce the behavior:

  1. play any episode
  2. Click on back button and exit of application
  3. and going to app again
  4. you will have very exception

it is a image of exceptions bug

Anthony-Sol avatar Mar 08 '21 09:03 Anthony-Sol

Thanks for reporting this issue @mohammad-soltani77. A few questions:

  1. When you backed out using the back button was the episode playing, paused or stopped?
  2. Does this happen every time you exit via the back button or only sometimes?
  3. What version of Android are you running on?

Thanks,

Ben.

amugofjava avatar Mar 08 '21 14:03 amugofjava

@amugofjava if episode was played from net(feed) sometimes that you press back button and exit of app and going to it again ,episode will not stop or pause but miniPlayer will be blank and you will get very exceptions android version may phone is 8.0.0

here is a video of what I said that I put in dropbox: https://www.dropbox.com/s/mlymfznrr4hx5px/anytime.mp4?dl=0

Anthony-Sol avatar Mar 08 '21 15:03 Anthony-Sol

Thanks for the video @mohammad-soltani77. I can now recreate the issues. This back button is proving to be a source of issues.

amugofjava avatar Mar 08 '21 16:03 amugofjava

Do you know where the problem comes from? because when episode was played from download list it is fine(don't have exception and miniPlayer don't be blank ).

Anthony-Sol avatar Mar 08 '21 16:03 Anthony-Sol

Yes. When you download or subscribe to a podcast the details of the podcast and episodes are stored in a local database. When you back out of the app and then return the details of the current episode can be loaded back from the database. When you stream an ad-hoc episode, in your case from the Discover tab, it doesn't save the episode details until later so when you return after backing out using the back button it fails to load it from the database. You'll find that if you play the same streamed episode a second time, when you back out and then return it works as expected. This is because by the second time you stream it has been saved to the database.

I am testing a fix now that ensures that an episode being streamed ad-hoc is persisted to the database so it can be fetched later. I will also need to add a cleanup routine so these ad-hoc records are removed from the database after a period of time.

amugofjava avatar Mar 08 '21 16:03 amugofjava

thanks Ben for answer giving me. I hope this problem will be solved as soon as possible

Anthony-Sol avatar Mar 08 '21 17:03 Anthony-Sol

This should now be resolved in the source @mohammad-soltani77. Please let me know if it still errors for you. Thanks.

amugofjava avatar Mar 18 '21 07:03 amugofjava

Hi @amugofjava there are still exceptions when you play a episode will get exception. it is a image of this exception bug 5

and previous problem (while playing any episode when press back button and exit of application and going to it again you will get some exceptions) is still (but miniplayer don't blank) it is a image of this exception bug 3

Anthony-Sol avatar Mar 18 '21 12:03 Anthony-Sol

Hi,

I did push an update a little after closing this issue as I found a problem, and I've just pushed another minor improvement. Can you please try again and see if you still get this error? Thanks.

amugofjava avatar Mar 18 '21 19:03 amugofjava

this problem is still (while playing any episode when press back button and exit of application and going to it again you will get some exceptions) you will get previous exception bug 3

Anthony-Sol avatar Mar 18 '21 19:03 Anthony-Sol

I'm not sure why this is happening just yet. For now I have wrapped the offending code with a null check to see if that improves things for you. I'll spend some time over the weekend looking into this further.

amugofjava avatar Mar 18 '21 20:03 amugofjava

thank you best regard

Anthony-Sol avatar Mar 18 '21 20:03 Anthony-Sol

Hi @mohammad-soltani77,

I have pushed several updates to master including moving to Flutter 2. This appears to be fixed, but are you able to test again and see if it's fixed for you? Thanks.

amugofjava avatar Apr 01 '21 16:04 amugofjava

Hi @amugofjava it is solved (previous problem ) but when you are playing a episode but when this has not been played if you close it with Miniplayer this will have exception. here is a image of this exception bug

Anthony-Sol avatar Apr 12 '21 09:04 Anthony-Sol