-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS crashes on launch in release builds only #79
Comments
We've surfed all the web and tried so many solutions. This finally worked for us! |
@alisherakb Interesting, so that fixed your release builds? I gave it a shot but it did not seem to change anything. |
@mtostenson Yes, it solved the issue. Whenever we archive and install .ipa app it was crashing. |
Have you tried to archive .ipa file directly from XCode without Fastlane? |
@alisherakb Yes, that is how I tested the empty test project, archived into IPA. May I ask what versions of React Native, Unity, Node, and this library are you using? |
Sure. P.S. This issue was reproduced and fixed by following above-mentioned solution on Node v10.14.2 |
Thank you for the help. I'm still not able to get an IPA that doesn't crash. Have you tried using the current version of RN unity view? |
No. Have you tried to downgrade?
Also, try to set Optimization level in Build Settings to None. |
I had problems with iOS Ad-Hoc / App Store Builds too. The app crashed immediately without any useful logs. Setting some compiler flags in XCode worked for me. You could give it a try. ios/rnunitydemo.xcodeproj/project.pbxproj
|
@JanOwiesniak I think you solved it. Thank you, I've been trying to fix this for quite a while. |
This may point to an underlying issue. @f111fei do you have any idea why this library would require setting "Strip Linked Product" to NO in order to avoid this crash? As far as I understand, all this does is removes the debug symbols from the app. |
@JanOwiesniak We found the problem has reappeared in iOS 12.1 even with the workaround. Is your app working on this version? |
@mtostenson Have you solved in iOS12.1.4 ?I have the same issue at iphone XS MAX in ios 12.1.4. |
We also have the same issue at iphone XS MAX in ios 12.1.4 also ,still crashed, any idea? |
@richardlinxj @peterfei I was able to narrow down where the crash happens in the React Native c++ code. Here's the issue on the React Native Repo. I included a description of how to avoid the crash. In short, you need to hold a reference to the vector that is returned from ModuleRegistry::moduleNames, I just added it as a field in the ModuleRegistry class and that seemed to work. Please join in on the discussion over there. |
@mtostenson Thanks for reply , could u give me more information for it ,or some code for
|
Sure. Add this to ModuleRegistry.h under Then in ModuleRegistry.cpp in the getConfig function, change the line |
@mtostenson okay,let me try ~ |
No problem, please let me know if this does anything. |
@mtostenson this workaround worked quite well until iPhone XS Max iOS 12.1.4 @mtostenson thanks for the approach, i will give it a try. |
@mtostenson i changed following lines in react native (is this correct?) These are crash logs without the above patch. For whatever reasons i don't receive crashlogs anymore. App still does not boot on iPhone XS. Crashlog A
Crashlog B
Has anyone any idea what's the issue here and how to solve it? We are already using this in production so this discovery is really painful for us right now :( |
I feel your pain on that, our releases have been blocked as well. Your hot fix looks correct, I'm surprised it didn't have the same result for you. I have another suggestion for you, it's not pretty but it can be effective. Looking at your crash log, we should focus on ModuleRegistry::GetConfig. Try putting in a logging line after each statement in that function to find the exact line that result in the crash. Example: |
@mtostenson thanks for the debugging approach. Sadly i can't run the app on a simulator because we are using a 3rd party library which can not run on the simulator:
And i don't have access to this particular device in any physical way. Do you have any other idea how to pin that bug down without access to a physical device or the simulator :) "puts debugging" would mean:
|
Sidenote I just stumbled across Firebase Test Lab and will give it a try. I seems to remove a lot of time consuming steps mentioned earlier. |
@mtostenson @JanOwiesniak now i could run it under iPhone XS Max iOS 12.1.4,which use react-native patch yesterday. |
This works for you? Could you tell me a bit more about your dependencies?
|
hello! |
Onlookers !!! |
Sure,
|
react-native info
package.json
I'm still on |
Strange,i'm sure only change the code by this patch...... |
I just received a fresh crash report from Crashlytics. This one look different to me than the previous crashes. Am i still hunting the same bug here or is this something new? I'm a bit lost here right now. Any feedback highly appreciated. crash_info_entry_0
crash_info_entry_1
stacktrace iOS: 12.1.4 (16D57)
|
@peterfei @mtostenson three more questions which might help me to get closer to the problem:
|
|
|
@peterfei @mtostenson thanks for your help. I will update react-native-unity-view to 1.3.3. and Unity to 2018.3.6. Let's see if this fixes the issue. @mtostenson special thanks for the hotfixes for upcoming issue i will run into :) |
@mtostenson when i used Unity to 2018.3.6,
any idea? |
Mine fault,should add AVKit.framework .... |
This is how i fixed it (in a nutshell)
@peterfei @mtostenson thanks again for your support. |
@mtostenson @JanOwiesniak Have you ever experienced this issue? Unity -v: 2018.3.2 |
Did you set up the xcconfig correctly as it shows in the integration guide? It could be that your header search paths aren't set up right. |
Thanks for the reply. Otherwise, I'm getting a different error on following this library's xcconfig: What could cause an error? |
I fixed the same crash issue by remove |
Changing |
@alisherakb I am equally experiencing the same issue. Please, how did you fix yours? |
@OgieBen Hi, can you provide more details about the issue? |
@alisherakb I was only able to build after downgrading to an older version of Unity 2018.1f2. However, my initial version of Unity was v2018.3.13 when I encountered the error. I also made changes to the library's xcconfig file |
In my case downgrading |
same isuue. "Undefined symbols for architecture arm64: OBJC_CLASS$_AVPlayerViewController" Unable to use '@Try' with Objective-C exceptions disabled react-native info info |
yes i have the same issue at xs max and ipad pro |
i have try it ,but still crash in xs max & ipad pro ,but no crash in iphone x & iphone 8plus |
Thread 6 name: com.facebook.react.JavaScript |
@JanOwiesniak Hi, have you managed it work with Unity 2018.3.+? |
Unity version: 2018.2.1f1
React native version: 0.57.8
When running straight out of XCode, it works fine. However, creating a release IPA file results in an immediate crash on launch. We use fastlane to generate an IPA for beta testing, so we don't usually see this problem until then. I tested this using a blank react native project, and a blank unity project, and the crash is there. There are no useful crash logs unfortunately. Has anyone been able to publish an iOS release using this library?
Thanks
UPDATE: Setting "Strip Linked Product" to NO prevents this crash. However, this means the debug symbols are not removed and causes the app size to increase by 30-50%
FURTHER UPDATE The "Strip Linked Product" workaround does not appear to work for iOS 12.1.
Here is an issue I created in the react native repo that describes a possible solution.
Here's the crash report:
The text was updated successfully, but these errors were encountered: