bcc-code / bmm-app

[BMM] App for iOS and Android to consume audio content from BCC
GNU Affero General Public License v3.0
8 stars 4 forks source link

freezing app when downloading #461

Closed kkuepper closed 5 months ago

kkuepper commented 1 year ago

https://projects.bcc.no/desk/tickets/10517494/messages https://projects.bcc.no/desk/tickets/10511526/messages

kkuepper commented 1 year ago

example of a user starting the app 5 times within 10 minutes:

Screenshot 2023-08-21 at 10 52 20 AM
kkuepper commented 1 year ago

If an iOS user experiences "Playlist not found exception" they have more AppStarts per day. On Android it doesn't seem to be a problem because the numbers are very similar, but on iOS it seems to be a problem.

Screenshot 2023-08-21 at 11 19 55 AM

Theory: If a user has downloaded an unpublished playlist, it leads to a crash while synchronizing offline tracks. For some reason that crash doesn't get reported in AppCenter.

Update: looking at it more, "Playlist not found exception" can be explained by users that have downloaded more tracks. So it's probably just correlation and not cause and effect. However on iOS the number of starts is almost double between users that have 500 and 1000 tracks. On Android both have about the same number of starts.

query:

//app("AppCenterExport-BMM-Android").customEvents
app("AppCenterExport-BMM-iOS").customEvents
| extend properties = parsejson(tostring(customDimensions.Properties)) 
| where name == "After SynchronizeOfflineTracks" or name == "User started the app" or name contains "Playlist not found exception" or name startswith "SynchronizeOfflineTracks - Application is" or name contains "SynchronizeOfflineTracks"
| extend Count = toint(properties.NumberOfTracksInPodcastsAndPlaylistsFromLocalStorage)
| summarize starts=countif(name == "User started the app"), playlistException=countif(name == "Playlist not found exception"), after=countif(name == "After SynchronizeOfflineTracks"), 
before=countif(name == "Before SynchronizeOfflineTracks"), inThing=countif(name == "In SynchronizeOfflineTracks"), Count=avg(Count) by user_Id, bin(timestamp, 1d)
//| where Count > 100 and Count < 200 | summarize count() by starts | order by starts asc
| where Count > 500 
| summarize starts = avg(starts), playlistException=avgif(starts, playlistException>0), after=avgif(starts, after>0), before=avgif(starts, before>0), inThing=avgif(starts, inThing>0),
track1=avgif(starts, Count >0 and Count <100), track100=avgif(starts, Count>=100 and Count<500), track500=avgif(starts, Count>=500 and Count<1000), track1000=avgif(starts, Count>1000)
//max1=maxif(starts, Count >0 and Count <100), max100=maxif(starts, Count>=100 and Count<500), max500=maxif(starts, Count>=500 and Count<1000), max1000=maxif(starts, Count>1000) 
by timestamp
| render timechart 
kkuepper commented 1 year ago

Updated theory: If a user has more tracks, he is more likely to experience the 'crashes'. Maybe the user calls it a crash, when the app is unresponsive/frozen.

https://github.com/bcc-code/bmm-app/assets/649978/ffe26f45-37d2-427a-a42d-00cff2700643

kkuepper commented 1 year ago

I managed to reproduce the crash while having 600 files downloaded. I think the number of downloaded files matters. First try of providing reproduction steps: