[Bug]: backgrounding when switching apps can get stuck #388

Closed
opened 2025-11-30 18:52:45 -05:00 by thenick775 · 1 comment
thenick775 commented 2025-11-30 18:52:45 -05:00 (Migrated from github.com)

🐞 Bug Description

What’s going wrong? Provide a brief description of the issue.

When backgrounding the emulator, sometimes it can get stuck.

Reports from original user:

It was randomly freezing, but cycling back and fourth to the emulator allows it to resume.

It worked when I changed tabs, and before it worked after changing apps. But I couldn’t get it to in this video

🔄 Steps to Reproduce

Help us see the bug:

  1. Background the emulator in a browser window on mobile iOS while running un-paused
  2. Go to another app
  3. Go back to the emulator
  4. Notice that the emulator is NOT unpaused, and is waiting for a background even to signal continuation

Expected Behavior

What should happen instead?

When coming back from the background, if not paused, the emulator should be in the un-paused running state 😎


📸 Screenshots

Got visuals? Screenshots or recordings are super helpful.

https://github.com/user-attachments/assets/878c8955-dc63-48e1-901d-8b362f5e49c8


💻 Device Details

Image

💡 Additional Context

Anything else we should know? Logs, configs, problematic files, or other details.


Thanks for helping us improve @dedwardstech ! 🚀

### 🐞 Bug Description What’s going wrong? Provide a brief description of the issue. When backgrounding the emulator, sometimes it can get stuck. Reports from original user: ``` It was randomly freezing, but cycling back and fourth to the emulator allows it to resume. It worked when I changed tabs, and before it worked after changing apps. But I couldn’t get it to in this video ``` --- ### 🔄 Steps to Reproduce Help us see the bug: 1. Background the emulator in a browser window on mobile iOS while running un-paused 2. Go to another app 3. Go back to the emulator 4. Notice that the emulator is NOT unpaused, and is waiting for a background even to signal continuation --- ### ✅ Expected Behavior What _should_ happen instead? When coming back from the background, if not paused, the emulator should be in the un-paused running state 😎 --- ### 📸 Screenshots Got visuals? Screenshots or recordings are super helpful. https://github.com/user-attachments/assets/878c8955-dc63-48e1-901d-8b362f5e49c8 --- ### 💻 Device Details <img width="1289" height="400" alt="Image" src="https://github.com/user-attachments/assets/b38e4822-5589-4237-80ce-589dcc499b75" /> --- ### 💡 Additional Context Anything else we should know? Logs, configs, problematic files, or other details. --- Thanks for helping us improve @dedwardstech ! 🚀
thenick775 commented 2025-11-30 20:09:42 -05:00 (Migrated from github.com)

Looks like this is a Unhandled Promise Rejection: InvalidStateError: Failed to start the audio device coming from this path on iOS when not installed as a PWA

Looks like this is a `Unhandled Promise Rejection: InvalidStateError: Failed to start the audio device` coming from [this](https://github.com/thenick775/gbajs3/blob/master/gbajs3/src/emulator/mgba/mgba-emulator.tsx#L288) path on iOS when not installed as a PWA
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
thenick775/gbajs3#388
No description provided.