# Cocoa NSInternalInconsistencyException was not handled

**URL:** <https://forum.xojo.com/t/cocoa-nsinternalinconsistencyexception-was-not-handled/33596>\
**Category:** General\
**Created:** [September 24, 2016, 10:56pm UTC](https://forum.xojo.com/t/cocoa-nsinternalinconsistencyexception-was-not-handled/33596 "2016-09-24T22:56:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![James\_Pitchford](https://forum.xojo.com/user_avatar/forum.xojo.com/james_pitchford/32/4568_2.png) [@James\_Pitchford](https://forum.xojo.com/u/James_Pitchford)\
**Post date:** [September 24, 2016, 10:56pm UTC](https://forum.xojo.com/t/cocoa-nsinternalinconsistencyexception-was-not-handled/33596/1 "2016-09-24T22:56:39Z")

</div>

Apple just rejected my app based on an error that I’ve not seen in my testing.

> [@](#):
>
> A Cocoa NSInternalInconsistencyException was not handled: nsxpcsharedlistener unable to create endpoint for listener named com.apple.view-bridge. Please report to the application developer. The application will quit now. (use NSExceptionMBS class to catch this exception).

The app seems to run fine in my own clean development environment so I’ve not been able to recreate the error.

The app uses the following non-Xojo classes that  
MBS AppStore classes (which work fine in other apps)  
macFileOperationMBS (not tried before) - file move and copy commands - all related to opendialogs and security scoped bookmarks.  
MacOSLib security scoped bookmarks (not tried before)

Its nice that it tells me how to catch the exception - which implied that it is one of the MBS classes causing it - but where should I start to look?

---

<div class="post-metadata">

**Author:** ![Sam\_Rowlands](https://forum.xojo.com/user_avatar/forum.xojo.com/sam_rowlands/32/265_2.png) [@Sam\_Rowlands](https://forum.xojo.com/u/Sam_Rowlands)\
**Post date:** [September 25, 2016, 2:31am UTC](https://forum.xojo.com/t/cocoa-nsinternalinconsistencyexception-was-not-handled/33596/2 "2016-09-25T02:31:09Z")

</div>

This is going to be a tough one crack unless you can reproduce it. IMHO the exception is occurring within the Apple frameworks.

I’ve seen these in the past and normally restarting the machine makes it go away.

---

<div class="post-metadata">

**Author:** ![Eli\_Ott](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/5f8ce5/32.png) [@Eli\_Ott](https://forum.xojo.com/u/Eli_Ott)\
**Post date:** [September 25, 2016, 6:36am UTC](https://forum.xojo.com/t/cocoa-nsinternalinconsistencyexception-was-not-handled/33596/3 "2016-09-25T06:36:27Z")

</div>

This is most probably related to Open/Save dialogs in sandboxed apps. It seems to have started with OS X 10.10, when Apple made sandboxed apps follow more rigorous rules.

---

<div class="post-metadata">

**Author:** ![Christian\_Schmitz](https://forum.xojo.com/user_avatar/forum.xojo.com/christian_schmitz/32/158_2.png) [@Christian\_Schmitz](https://forum.xojo.com/u/Christian_Schmitz)\
**Post date:** [September 25, 2016, 6:56am UTC](https://forum.xojo.com/t/cocoa-nsinternalinconsistencyexception-was-not-handled/33596/4 "2016-09-25T06:56:05Z")

</div>

My plugin catches the unhandled NSException there.  
You may want to check the stack trace (written on console).

---

<div class="post-metadata">

**Author:** ![James\_Pitchford](https://forum.xojo.com/user_avatar/forum.xojo.com/james_pitchford/32/4568_2.png) [@James\_Pitchford](https://forum.xojo.com/u/James_Pitchford)\
**Post date:** [September 28, 2016, 2:08pm UTC](https://forum.xojo.com/t/cocoa-nsinternalinconsistencyexception-was-not-handled/33596/5 "2016-09-28T14:08:05Z")

</div>

Looks like you might have been right Sam. I didn’t change any code but did add exception error catches at the end of all methods and submitted it again. This time apparently no crash in the testers machine and it was accepted.

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 6:28pm UTC](https://forum.xojo.com/t/cocoa-nsinternalinconsistencyexception-was-not-handled/33596/6 "2020-10-29T18:28:44Z")

</div>


