After upgrade to 1.4.2 can't run from device in Xcode

Iā€™ve been having some issues with stability of my meteor/cordova app since upgrading my test phone (iPhone 5S) to iOS 10.1.1. So I decided to upgrade to Meteor 1.4.2 and see if it helps. Since doing that I canā€™t get the app to run on my phone using meteor run ios-device or using meteor build.

Here is where Iā€™m at:

  • Meteor 1.4.2
  • iOS 10.1.1
  • Xcode 8.1
  • macOS Sierra 10.12

When I run from Xcode I get the following error as the app is starting up:

guessum(318,0x1b4c69c40) malloc: *** error for object 0x1700a5c40: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug

I saw this topic #7772 on github which seems to be related but is closed and was pre 1.4.2 so I didnā€™t post there (but I can if people think I should).

I checked the CSP based on the conversation in that topic and mine appears fine - this is what I see in Web Inspector:

<meta http-equiv="Content-Security-Policy" content="default-src * gap: data: blob: 'unsafe-inline' 'unsafe-eval' ws: wss:;">

There is only one instance of the CSP in the HTML file.

I also checked the files in Xcode www/application/index.html and staging/www/application/index.html and both are correct.

I saw that I may need to use cordova-plugin-meteor-webapp@1.4.1 but Iā€™m assuming this isnā€™t needed with 1.4.2. So I am not using it at the moment.

Any help anyone can provide to get running on the device in Xcode to work is much appreciated!

1 Like

An update - I installed cordova-plugin-meteor-webapp@1.4.1 and now I can run my app on my other iOS test phone (5C) that is on iOS 10.1 (unlike my 5S which is on iOS 10.1.1).

Iā€™m not going to update my 5C to iOS 10.1.1, but will reset my 5S to see if that fixes the problem.

Anyone else seeing issues with iOS 10.1.1?

@carpmike, were you able to make it run finnaly ? we have been successfull to run it as you can see in this post : "<App Name> May Slow Down your iPhone" message on iOS 10.1

But we ve got another error :frowning:

I am having this same issue. Works on my iPad running 10.0.1, but not on my iPhone running 10.1.1. I have updated all my packages, this is very frustrating.

By sheer dumb luck, I figured out what was causing this issue for me. I was using Safari to inspect the meteor app when running it from Xcode. I had selected to ā€œAutomatically Show Web Inspector for JSContextsā€. Bad idea.

When this is selected is when I get the error. Turn it off and it goes away. Incredibly frustrating - I spent hours moving code out of my app to find what was causing the error. Turned out to be this setting in Safari the whole time.

So if you get an error in Xcode that says set a breakpoint in malloc_error_break to debug when your app is starting up and you have Safari open with the ā€œAutomatically Show Web Inspector for JSContextsā€ checked, uncheck it and see if the error goes away.

Hopefully this helps someone else who runs into this.

4 Likes

had this today as well. I restarted xcode and the issue was gone :no_mouth:

aaaah now, @carpmike is right! That is the reason!