Closed wkirby closed 1 week ago
Reverting my project back to an earlier commit, where we are running React Native 0.72.4 works as expected. Something appears to have changed between 0.72 and 0.73 which causes this issue.
I went back and walked through each patch update form 0.72.4 to 0.73.1, changing nothing else about the project, and the problem does not appear. I'm currently working through updates on other packages 1 at a time to establish what causes this error to start happening.
I am doing so on 0.72.7, as 0.73.1 has some incompatibilities with other libraries in use by our app.
Ok, on RN 0.72.7 with react-native-iap 12.10.8 everything is working, react-native-iap 12.12.1 throws the above EXC_BAD_ACCESS
error
I also get bad_access crashes a lot on ios
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x8000000000000010 -> 0x0000000000000010 (possible pointer authentication failure)
Exception Codes: 0x0000000000000001, 0x8000000000000010
VM Region Info: 0x10 is not in any region. Bytes before following region: 68719476720
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
commpage (reserved) 1000000000-7000000000 [384.0G] ---/--- SM=NUL ...(unallocated)
Termination Reason: SIGNAL 11 Segmentation fault: 11
Terminating Process: exc handler [21763]
Triggered by Thread: 0
Thread 0 name:
Thread 0 Crashed:
0 AppName 0x0000000102f0faa4 specialized Dictionary.subscript.getter + 0 (
Coming back to this, as we now need to update the IAP library for android. I've tracked the problem to this PR: https://github.com/dooboolab-community/react-native-iap/pull/2518
Version 12.10.8 works just fine, 12.11.0 is broken before the application finishes launching. I am not a Swift expert by any stretch, but I suspect that there's something about our XCode project and the storekit configuration.
@arthurgeron any chance you have insight on this?
I have stripped out my entire storekit configuration, and removed every piece of javascript related to react-native-iap
and I am still encountering this error, just by virtue of having the react-native-iap
pod installed in our project.
I took some time to delve into the EXC_BAD_ACCESS
error in Swift, and it appears to be something related to concurrency. My new guess, since this library appears to work for other people, is that there is something about the configuration of our application that is causing the issue, but I'm at a total loss on how to continue debugging.
I'm giving up. What finally resolved this issue was to initialize a new, empty React Native project and copy my configuration and JS code over to the new project. Nothing about my dependencies or JS source changed, and now it works.
Here's my assumption: somewhere in the long road of upgrades from ~0.62 to 0.74, something deep within the internals of the XCode project either didn't migrate correctly, or wasn't included in the migration process, and only surfaced with the Swift changes identified in #2518.
Anyway, I'm closing this issue – if someone else finds this, try just starting over.
Description
App errors on iOS startup with
EXC_BAD_ACCESS
onproductStore
inRNIapIosSk2iOS15
.Expected Behavior
App starts up without exception.
Screenshots
Environment:
To Reproduce Steps to reproduce the behavior:
Behavior appears on application launch.
Additional Context
Problem started happening after upgrading React Native from 0.72.4 to 0.73.1.