react-native-track-player
react-native-track-player copied to clipboard
[AVPlayerItem addOutput:] Cannot attach an output that is already attached or nil output
Describe the Bug *** [AVPlayeritem addOutput:] Cannot attach an output that is already attached or nil output.
Steps To Reproduce TBH it did not happen to me on debug, but it seems that is happening to my users in production. I have reports from Firebase Crashlytics.
OS: macOS 13.5.2 CPU: (8) arm64 Apple M1 react-native: ^0.68.0 => ^0.68.0 xCode: 15(15A240d)/usr/bin/xcodebuild
Using react-native-track-player@^4.0.1
This is happen on real devices, most of them iOS 16 and up.
My users are getting this in production off v4.0.1 as well (with an example today on iOS 17.4 using iPhone 15 Pro). @jspizziri : in #1818, you mentioned that the particular issue would be better handled/supported if people got off the RC's... I think it's now been seen by many folks on 4.0.1, so it feels like a legitimate/continued issue.
I'm happy to help make a PR here, but I'm not positive what the actual fix should be. For instance, should we try to detect an already-attached or nil output, and simply not try to startObserving
it? Or alternatively, does hitting this code path indicate a deeper problem that we need to fix upstream of this moment?
This issue is also affecting my app, I hope it gets fixed soon
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.