Hot code push worked on Android, not on iOS


#1

I just did another hot code push of our app. It worked on Android but not on iOS. The cordovaCompatibilityVersion values have not changed, I confirmed that first thing, but of course Android wouldn’t have worked if the compatversion had changed.

Anyone have any idea why it would work on Android and not on iOS?

Thanks!

Andy


Hot Code Push not working
#2

Have the same Issue.
Have you find a solution for that?


#3

Nope. I’m gonna try some rebuilds, but I have no other ideas at the moment, since it works on Android.


#4

I just tried updating to 1.7.0.5 and re-pushing to see if that would fix it. It didn’t.


#5

Ha! I’ve made this discovery: adding a couple of seemingly innocent png files to my /public/images directory has caused HCP to stop working on iOS. In the log of my iPhone (viewing it using xCode to open a console) that failed to get HCP after the latest update, I got this:

Download failure: Could not link to cached asset: Error Domain=NSCocoaErrorDomain Code=516 ““circle_green.png” couldn’t be linked to “images” because an item with the same name already exists.” UserInfo={NSSourceFilePathErrorKey=/var/mobile/Containers/Data/Application/2DCB2EF6-0F63-4394-944E-6827262A0849/Library/NoCloud/meteor/PartialDownload/app/images/circle_green.png, NSUserStringVariant=(
Link
), NSDestinationFilePath=/var/mobile/Containers/Data/Application/2DCB2EF6-0F63-4394-944E-6827262A0849/Library/NoCloud/meteor/Downloading/app/images/circle_green.png, NSFilePath=/var/mobile/Containers/Data/Application/2DCB2EF6-0F63-4394-944E-6827262A0849/Library/NoCloud/meteor/PartialDownload/app/images/circle_green.png, NSUnderlyingError=0x1c02445f0 {Error Domain=NSPOSIXErrorDomain Code=17 “File exists”}}

All I did to get HCP to work again for this version of code was to remove circle_green.png from my project and redeploy my app to Galaxy. Voila! HCP works again! Of course, this means my app isn’t displaying the now-missing png, but it solved HCP failure. And this png thing also doesn’t impact Android HCP, only iOS. I’m not sure what’s going on here, but this is the second problem I’ve encountered related to iOS and this error message. See also https://stackoverflow.com/questions/51573513/meteor-cordova-ios-file-already-exists-error-message-doesnt-make-sense for another problem caused by this same error message.


#6

Did you try deleting .meteor/local before creating your build?


#7

No — is that supposed to be something you have to do when doing a build?

Andy


#8

Supposedly, no. But there can be stagnant cache in there resulting to the error. It doesn’t hurt to try clearing .meteor/local


#9

HCP on iOS is quite broken at the moment. Sometimes it works, but most of the time the connection between the app and the server gets lost and the app breaks. It even shows other weird effects, like missing images and fonts. This seems to be (another?) problem with the connection to the local server on the device.


#10

I don’t know about the connection breaking, that hasn’t been a problem I’ve seen. But there’s definitely a thing going on with the above error message and meteor cordova on iOS. I hope someone from Meteor is seeing this. I’ve opened a bug: https://github.com/meteor/meteor/issues/10181


#11

Any news on that one? I have the exact same issue.


#12

No news. As mentioned here (lots more detail): https://github.com/meteor/meteor/issues/10181,
The manifest contains two lines for each asset, which the code misinterprets because the code isn’t expecting that.


#13

I’m experiencing the same issue on Meteor 1.8. If I leave ‘public’ folder untouched HCP seems to work alright.


#14

In this issue in Meteor, I’ve posted the 3 different PR’s meant to solve this HCP problem in iOS