-
Notifications
You must be signed in to change notification settings - Fork 326
Native crash on iOS when specifying deploymentKey without config.xml entry #108
Comments
I'm seeing this also. |
Hey guys! We can repro this bug, and as you mentioned, the workaround in the meantime is to simply add a deployment key to your In parallel, we'll investigate a fix for this issue and try to get it out ASAP! Thanks for reporting this. |
After looking at the code a little more, it appears that the two areas that use the hardcoded deployment key from Using the workaround, I've done some testing and I was able to deploy updates to staging and have the app receive them without any further issues. If anyone ends up using this workaround just remember that the usage status may not be updated correctly until this is fixed. Thanks for the quick response! |
You are correct :) we've got a fix for this right now and am just running through the tests. |
This has been resolved with |
Thanks for the fix! It looks like #110 is what you are referring to. While this fixes the crash by returning early, it means that reporting does not work. Please correct me if I'm wrong about that. If not, I would like to create an issue for it, as the reporting feature is desirable. |
@Justin-Credible Sorry for the late reply! You are definitely right. We corrected the crash, but the reporting feature still needs to be adjusted to accommodate apps not specifying their deployment keys in the |
I'm using the
codePush.sync(...)
method withSyncOptions
to pass mydeploymentKey
. I do not have a deployment key in myconfig.xml
file.This causes a crash on iOS the first time the app is launched. The crash occurs in
CodePushReportingManager.m
line 33 when it attempts to insert a nil entry (the deployment key) into a dictionary:Walking up the call stack to
-[CodePush updateSuccess:]
inCodePush.m
we can see, on line 64, that the deployment key is pulled fromconfig.xml
directly (which is null in my case). I would expect this to use the value I passed into the sync method.This is similar to #89, but instead of errors in the console, a native code crash occurs. I can use the workaround listed there to bypass the crash, but the deployment key would still be incorrect (it would be empty string instead of nil).
Version: v1.7.0-beta
Steps to reproduce:
config.xml
codePush.sync(...)
that passedSyncOptions
with adeploymentKey
setExpected Results: No crash and the
updateSuccess
method uses the deployment key I specified.Actual Results: Native code crash because the deployment key is not present in
config.xml
The text was updated successfully, but these errors were encountered: