How to solve Ionic error "Error acquiring assertion"

I’m stack on ios deployment for the ionic project. On the project, we have used for video. if I deployed android build not any issue was found but if I build the ios build and run in emulator then the video did not play and I got error “assertion] Error acquiring assertion: <NSError: 0x600001586a00; domain: RBSAssertionErrorDomain; code: 2; reason: “Required client entitlement is missing”>” on Xcode console.

Below mentioned full console response

2022-02-14 11:53:16.338444+0530 American Classes[43395:351318] Apache Cordova native platform version 4.5.5 is starting.
2022-02-14 11:53:16.338588+0530 American Classes[43395:351318] Multi-tasking → Device: YES, App: YES
2022-02-14 11:53:16.368872+0530 American Classes[43395:351318] CDVWKWebViewEngine: trying to inject XHR polyfill
2022-02-14 11:53:16.599649+0530 American Classes[43395:351318] CDVWKWebViewEngine will reload WKWebView if required on resume
2022-02-14 11:53:16.599885+0530 American Classes[43395:351318] Using Ionic WKWebView
2022-02-14 11:53:16.600189+0530 American Classes[43395:351318] [CDVTimer][console] 0.046968ms
2022-02-14 11:53:16.600361+0530 American Classes[43395:351318] [CDVTimer][handleopenurl] 0.064969ms
2022-02-14 11:53:16.601862+0530 American Classes[43395:351318] Unlimited access to network resources
2022-02-14 11:53:16.602018+0530 American Classes[43395:351318] [CDVTimer][intentandnavigationfilter] 1.571059ms
2022-02-14 11:53:16.602167+0530 American Classes[43395:351318] [CDVTimer][gesturehandler] 0.056982ms
2022-02-14 11:53:16.602371+0530 American Classes[43395:351318] CDVIonicKeyboard: resize mode 1
2022-02-14 11:53:16.602959+0530 American Classes[43395:351318] [CDVTimer][cdvionickeyboard] 0.687957ms
2022-02-14 11:53:16.608063+0530 American Classes[43395:351318] [CDVTimer][splashscreen] 4.987955ms
2022-02-14 11:53:16.609402+0530 American Classes[43395:351318] [CDVTimer][statusbar] 1.162052ms
2022-02-14 11:53:16.609517+0530 American Classes[43395:351318] [CDVTimer][TotalPluginStartup] 9.400964ms
2022-02-14 11:53:20.972123+0530 American Classes[43395:351318] Ionic Native: deviceready event fired after 1797 ms
2022-02-14 11:53:33.370209+0530 American Classes[43395:351318] [IPC] Connection::waitForSyncReply: Timed-out while waiting for reply, id = 7
2022-02-14 11:53:46.404165+0530 American Classes[43395:354469] [assertion] Error acquiring assertion: <NSError: 0x600001586a00; domain: RBSAssertionErrorDomain; code: 2; reason: “Required client entitlement is missing”> {
userInfo = {
RBSAssertionAttribute = <RBSLegacyAttribute: 0x7f83f2435a50; requestedReason: MediaPlayback; reason: MediaPlayback; flags: PreventTaskSuspend | PreventTaskThrottleDown | WantsForegroundResourcePriority>;
}
}
2022-02-14 11:53:46.404321+0530 American Classes[43395:354469] [ProcessSuspension] 0x10e3de5f0 - ProcessAssertion() PID 43395 Unable to acquire assertion for process with PID 43395
2022-02-14 11:53:46.405126+0530 American Classes[43395:351318] [ProcessSuspension] 0x10e3de5f0 - ProcessAssertion::processAssertionWasInvalidated()
2022-02-14 11:53:46.408109+0530 American Classes[43395:354469] [assertion] Error acquiring assertion: <NSError: 0x6000015968b0; domain: RBSAssertionErrorDomain; code: 2; reason: “Required client entitlement is missing”> {
userInfo = {
RBSAssertionAttribute = <RBSLegacyAttribute: 0x7f83f242cf10; requestedReason: MediaPlayback; reason: MediaPlayback; flags: PreventTaskSuspend | PreventTaskThrottleDown | WantsForegroundResourcePriority>;
}
}
2022-02-14 11:53:46.410572+0530 American Classes[43395:354469] [ProcessSuspension] 0x10e3de640 - ProcessAssertion() PID 43395 Unable to acquire assertion for process with PID 43410
2022-02-14 11:53:46.412241+0530 American Classes[43395:351318] [ProcessSuspension] 0x10e3de640 - ProcessAssertion::processAssertionWasInvalidated()
2022-02-14 11:53:46.988429+0530 American Classes[43395:354479] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x600001b68cc0> F8BB1C28-BAE8-11D6-9C31-00039315CD46

Sorry for my English and Advance thanks for your help…

1 Like

Hello,

I have a similar error when I try to play a video or a sound using the HTML tag <audio>or <video>.
After the click, the error appears in the console of xCode and the sound start but 1 second after, the sound stops. I don’t have this issue with Android.

Note: If I use the plugin @ionic-native/media/ngx to manage the sound by using the method create() and then the method play() the sound plays correctly and without error. So it seems to be related to the default HTML tag.

Could someone help us find a solution?

Thanks,
Loïc