Some of my users are experiencing crashes in the app. And going through the records it seems to be at playerdata.java. The reports show this
at abi26_0_0.host.exp.exponent.modules.api.av.player.PlayerData.progressUpdateLoop (PlayerData.java:146) at abi26_0_0.host.exp.exponent.modules.api.av.player.PlayerData.access$000 (PlayerData.java:19) at abi26_0_0.host.exp.exponent.modules.api.av.player.PlayerData$1.run (PlayerData.java:151)
So I use audio as background music for the game which is continuously looped and there is audio played when user interacts with app.
Note: No crashes in iOS yet
Here is a snack on how my audio is set up: https://snack.expo.io/Bk4M1J6hf
After a while of redirecting and mounting the components a few times due to the redirect or just by pressing the button a few times continuously all audio stops
This is the error I get when I add a catch statement to playbgSound();
Encountered an error while setting status!
- node_modules\react-native\Libraries\BatchedBridge\NativeModules.js:80:57 in <unknown> - node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:400:4 in __invokeCallback - node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:139:28 in <unknown> - node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:316:6 in __guardSafe - node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:138:17 in invokeCallbackAndReturnFlushedQueue