Bug 1911037 Comment 4 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

I think I may have found the issue. I am only able to reproduce the issue if I hit pause when the download is at 100% but it hasn't shown "Download completed" yet. Please see the attached video. If I pause the download at any other time, it shows download complete for me. Furthermore, even though the notification shows "Download completed", the file is actually successfully downloaded in the downloads directory. Upon using logcat, I see the following stacktrace:
```
ACTION_RESUME for 51e55713-f013-4fa9-9947-1ec7fa2b86a9
2024-08-06 10:41:39.352  1842-2322  DownloadMiddleware      org.mozilla.fenix.debug              D  Updated download BigBuckBunny(5).mp4 on the storage
2024-08-06 10:41:39.353  1842-7945  AbstractFe...oadService org.mozilla.fenix.debug              D  Starting download for 51e55713-f013-4fa9-9947-1ec7fa2b86a9 
2024-08-06 10:41:39.421  1842-7945  AbstractFe...oadService org.mozilla.fenix.debug              D  Fetching download for 51e55713-f013-4fa9-9947-1ec7fa2b86a9 
2024-08-06 10:41:39.424  1842-7945  AbstractFe...oadService org.mozilla.fenix.debug              D  Unable to fetching Download for 51e55713-f013-4fa9-9947-1ec7fa2b86a9 status FAILED
2024-08-06 10:41:39.425  1842-2322  DownloadMiddleware      org.mozilla.fenix.debug              D  Updated download BigBuckBunny(5).mp4 on the storage
2024-08-06 10:41:39.764  1842-1842  NotificationManager     org.mozilla.fenix.debug              I  org.mozilla.fenix.debug: notify(100, null, Notification(channel=mozac.... shortcut=null contentView=null vibrate=null sound=null defaults=0x0 flags=0x200 color=0xff592acb groupKey=mozac.feature.downloads.group vis=PRIVATE semFlags=0x0 semPriority=0 semMissedCount=0)) as user
2024-08-06 10:41:39.771  1842-1842  NotificationManager     org.mozilla.fenix.debug              I  org.mozilla.fenix.debug: notify(998369038, null, Notification(channel=mozac.... shortcut=null contentView=null vibrate=null sound=null defaults=0x0 flags=0x8 color=0xff592acb category=err groupKey=mozac.feature.downloads.group actions=2 vis=PRIVATE semFlags=0x0 semPriority=0 semMissedCount=0)) as user
2024-08-06 10:41:42.931 26397-26397 ViewRootIm...59368[App] org.mozilla.fenix                    I  onDisplayChanged oldDisplayState=2 newDisplayState=2
2024-08-06 10:41:42.931  1842-1842  ViewRootIm...e85b3[App] org.mozilla.fenix.debug              I  onDisplayChanged oldDisplayState=2 newDisplayState=2
```
This suggests that the issue is how / when we update the notification and not the actual download process itself. YEO HYEON DUG, can you please confirm if this issue also only appears for you if you hit pause and the progress has hit 100% but hasn't shown "Download completed" yet?
I think I may have found the issue. I am only able to reproduce the issue if I hit pause when the download is at 100% but it hasn't shown "Download completed" yet. Please see the attached video. If I pause the download at any other time and then resume, it shows download complete for me, which is the expected behaviour. Furthermore, even though the notification shows "Download completed", the file is actually successfully downloaded in the downloads directory. Upon using logcat, I see the following stacktrace:
```
ACTION_RESUME for 51e55713-f013-4fa9-9947-1ec7fa2b86a9
2024-08-06 10:41:39.352  1842-2322  DownloadMiddleware      org.mozilla.fenix.debug              D  Updated download BigBuckBunny(5).mp4 on the storage
2024-08-06 10:41:39.353  1842-7945  AbstractFe...oadService org.mozilla.fenix.debug              D  Starting download for 51e55713-f013-4fa9-9947-1ec7fa2b86a9 
2024-08-06 10:41:39.421  1842-7945  AbstractFe...oadService org.mozilla.fenix.debug              D  Fetching download for 51e55713-f013-4fa9-9947-1ec7fa2b86a9 
2024-08-06 10:41:39.424  1842-7945  AbstractFe...oadService org.mozilla.fenix.debug              D  Unable to fetching Download for 51e55713-f013-4fa9-9947-1ec7fa2b86a9 status FAILED
2024-08-06 10:41:39.425  1842-2322  DownloadMiddleware      org.mozilla.fenix.debug              D  Updated download BigBuckBunny(5).mp4 on the storage
2024-08-06 10:41:39.764  1842-1842  NotificationManager     org.mozilla.fenix.debug              I  org.mozilla.fenix.debug: notify(100, null, Notification(channel=mozac.... shortcut=null contentView=null vibrate=null sound=null defaults=0x0 flags=0x200 color=0xff592acb groupKey=mozac.feature.downloads.group vis=PRIVATE semFlags=0x0 semPriority=0 semMissedCount=0)) as user
2024-08-06 10:41:39.771  1842-1842  NotificationManager     org.mozilla.fenix.debug              I  org.mozilla.fenix.debug: notify(998369038, null, Notification(channel=mozac.... shortcut=null contentView=null vibrate=null sound=null defaults=0x0 flags=0x8 color=0xff592acb category=err groupKey=mozac.feature.downloads.group actions=2 vis=PRIVATE semFlags=0x0 semPriority=0 semMissedCount=0)) as user
2024-08-06 10:41:42.931 26397-26397 ViewRootIm...59368[App] org.mozilla.fenix                    I  onDisplayChanged oldDisplayState=2 newDisplayState=2
2024-08-06 10:41:42.931  1842-1842  ViewRootIm...e85b3[App] org.mozilla.fenix.debug              I  onDisplayChanged oldDisplayState=2 newDisplayState=2
```
This suggests that the issue is how / when we update the notification and not the actual download process itself. YEO HYEON DUG, can you please confirm if this issue also only appears for you if you hit pause and the progress has hit 100% but hasn't shown "Download completed" yet?
I think I may have found the issue. I am only able to reproduce the issue if I hit pause when the download is at 100% but it hasn't shown "Download completed" yet. Please see the attached video. If I pause the download at any other time and then resume, it shows download complete for me, which is the expected behaviour. Furthermore, even though the notification shows "Download failed", the file is actually successfully downloaded in the downloads directory. Upon using logcat, I see the following stacktrace:
```
ACTION_RESUME for 51e55713-f013-4fa9-9947-1ec7fa2b86a9
2024-08-06 10:41:39.352  1842-2322  DownloadMiddleware      org.mozilla.fenix.debug              D  Updated download BigBuckBunny(5).mp4 on the storage
2024-08-06 10:41:39.353  1842-7945  AbstractFe...oadService org.mozilla.fenix.debug              D  Starting download for 51e55713-f013-4fa9-9947-1ec7fa2b86a9 
2024-08-06 10:41:39.421  1842-7945  AbstractFe...oadService org.mozilla.fenix.debug              D  Fetching download for 51e55713-f013-4fa9-9947-1ec7fa2b86a9 
2024-08-06 10:41:39.424  1842-7945  AbstractFe...oadService org.mozilla.fenix.debug              D  Unable to fetching Download for 51e55713-f013-4fa9-9947-1ec7fa2b86a9 status FAILED
2024-08-06 10:41:39.425  1842-2322  DownloadMiddleware      org.mozilla.fenix.debug              D  Updated download BigBuckBunny(5).mp4 on the storage
2024-08-06 10:41:39.764  1842-1842  NotificationManager     org.mozilla.fenix.debug              I  org.mozilla.fenix.debug: notify(100, null, Notification(channel=mozac.... shortcut=null contentView=null vibrate=null sound=null defaults=0x0 flags=0x200 color=0xff592acb groupKey=mozac.feature.downloads.group vis=PRIVATE semFlags=0x0 semPriority=0 semMissedCount=0)) as user
2024-08-06 10:41:39.771  1842-1842  NotificationManager     org.mozilla.fenix.debug              I  org.mozilla.fenix.debug: notify(998369038, null, Notification(channel=mozac.... shortcut=null contentView=null vibrate=null sound=null defaults=0x0 flags=0x8 color=0xff592acb category=err groupKey=mozac.feature.downloads.group actions=2 vis=PRIVATE semFlags=0x0 semPriority=0 semMissedCount=0)) as user
2024-08-06 10:41:42.931 26397-26397 ViewRootIm...59368[App] org.mozilla.fenix                    I  onDisplayChanged oldDisplayState=2 newDisplayState=2
2024-08-06 10:41:42.931  1842-1842  ViewRootIm...e85b3[App] org.mozilla.fenix.debug              I  onDisplayChanged oldDisplayState=2 newDisplayState=2
```
This suggests that the issue is how / when we update the notification and not the actual download process itself. YEO HYEON DUG, can you please confirm if this issue also only appears for you if you hit pause and the progress has hit 100% but hasn't shown "Download completed" yet?
I think I may have found the issue. I am only able to reproduce the issue if I hit pause when the download is at 100% but it hasn't shown "Download completed" yet. Please see the attached video. If I pause the download at any other time and then resume, it shows download complete for me, which is the expected behaviour. Furthermore, even though the notification shows "Download failed", the file is actually successfully downloaded in the downloads directory. Upon using logcat, I see the following stacktrace:
```
ACTION_RESUME for 51e55713-f013-4fa9-9947-1ec7fa2b86a9
2024-08-06 10:41:39.352  1842-2322  DownloadMiddleware      org.mozilla.fenix.debug              D  Updated download BigBuckBunny(5).mp4 on the storage
2024-08-06 10:41:39.353  1842-7945  AbstractFe...oadService org.mozilla.fenix.debug              D  Starting download for 51e55713-f013-4fa9-9947-1ec7fa2b86a9 
2024-08-06 10:41:39.421  1842-7945  AbstractFe...oadService org.mozilla.fenix.debug              D  Fetching download for 51e55713-f013-4fa9-9947-1ec7fa2b86a9 
2024-08-06 10:41:39.424  1842-7945  AbstractFe...oadService org.mozilla.fenix.debug              D  Unable to fetching Download for 51e55713-f013-4fa9-9947-1ec7fa2b86a9 status FAILED
2024-08-06 10:41:39.425  1842-2322  DownloadMiddleware      org.mozilla.fenix.debug              D  Updated download BigBuckBunny(5).mp4 on the storage
2024-08-06 10:41:39.764  1842-1842  NotificationManager     org.mozilla.fenix.debug              I  org.mozilla.fenix.debug: notify(100, null, Notification(channel=mozac.... shortcut=null contentView=null vibrate=null sound=null defaults=0x0 flags=0x200 color=0xff592acb groupKey=mozac.feature.downloads.group vis=PRIVATE semFlags=0x0 semPriority=0 semMissedCount=0)) as user
2024-08-06 10:41:39.771  1842-1842  NotificationManager     org.mozilla.fenix.debug              I  org.mozilla.fenix.debug: notify(998369038, null, Notification(channel=mozac.... shortcut=null contentView=null vibrate=null sound=null defaults=0x0 flags=0x8 color=0xff592acb category=err groupKey=mozac.feature.downloads.group actions=2 vis=PRIVATE semFlags=0x0 semPriority=0 semMissedCount=0)) as user
2024-08-06 10:41:42.931 26397-26397 ViewRootIm...59368[App] org.mozilla.fenix                    I  onDisplayChanged oldDisplayState=2 newDisplayState=2
2024-08-06 10:41:42.931  1842-1842  ViewRootIm...e85b3[App] org.mozilla.fenix.debug              I  onDisplayChanged oldDisplayState=2 newDisplayState=2
```
This suggests that the issue is how / when we update the notification and not the actual download process itself. YEO HYEON DUG, can you please confirm if this issue also only appears for you if you hit pause when the progress has hit 100% but hasn't shown "Download completed" yet?

Back to Bug 1911037 Comment 4