Error '_BSMachError: port 1607; (os/kern) invalid capability (0x14) “Unable to insert COPY_SEND” in Cordova app on iOS 10

眉间皱痕 提交于 2019-11-27 17:47:55

I was getting the "invalid capability (0x14) "Unable to insert COPY_SEND" message in the debugger which would prevent the app from launching for about 10 seconds.

I had breakpoints set in files that I had since removed from the project but were still showing up in the Breakpoint navigator (file names in red).

I removed ALL breakpoints and haven't seen the error message since.

I ran into the same problem during iOS10.0 beta phases, and it seems to still be present in Xcode v8.1.

There are actually 2 separate errors :


1. First of all, as Avaan commented, you have to set all the privacy usage in the info.plist. I believe it is the cause of your crash.

Since iOS10.0, it is mandatory to explicitly tell the user what features of the phone you will use, and for what reasons.


2. Regarding the error :

BSMachError: port 1607; (os/kern) invalid capability (0x14) "Unable to insert COPY_SEND"

I resolved the error with this little workaround :

  1. Go in Project Settings/General -> Deployment info, check all orientations.

  1. Build and run, the interface should rotate according to the device orientation.
  2. Undo what you just did (uncheck orientations you don't need). Build and run again, the errors should not appear anymore.

I hope this helped

I received precisely this error carrying out reset of Core Data but none of the above solutions worked or was relevant in my case. Turned out to be result of code taking place inside action of UIAlert which needed to be pushed into main thread. Solution found through here - Error _BSMachError: (os/kern) invalid capability (20) after receiving remote notification on CloudKit record addition - and updated below for Swift 4:

alert.addAction(UIAlertAction(title: "Reset Now", style: UIAlertAction.Style.default, handler: { action in
            DispatchQueue.main.async {
                // Core Data reset code goes here...
            }
}))

For me the cause was [myTextField becomeFirstResponder]; placed after the initial viewWillAppear thread ended.

Turns out - the app will crash if you call EventKit, ContactsKit, Microphone, Camera etc etc that requires permissions without Info.plist keys like
Privacy - Location When In Use Usage Description
Privacy - Media Library Usage Description

i got this answer from https://forums.developer.apple.com/thread/48959 thread

also check whether you forgot to disable zombies.

Johan Tingbacke

I had a similar problem (check out my question on SO) and found out that my UI had created another instance of itself, presenting both at the same time.

If you have not found a solution to your problem yet I advice you to use the Debug View Hierarchy-tool... maybe you have got the same kind of problem as I had.

Good luck!

I got this when adding a Info.plist key without a matching string. In my instance I added NSLocationAlwaysAndWhenInUseUsageDescription without a description. Accessing the permission dialog cause this error to occur. Adding a string value resolved the issue. iOs11.

I was getting this error, tried every solution in this thread, and nothing worked. I had a seemingly unrelated UIColor (color out of range) error that I fixed and this COPY_SEND issue went away, too.

The specific UIColor error was UIColorBreakForOutOfRangeColorComponents.

For me was the translations on my plist. Double check that if your plist is localized has the proper privacy texts translated.

Took me hours until found it... I Was getting a SFSafariView layout issue all the time.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!