Open mtostenson opened 5 years ago
We've surfed all the web and tried so many solutions. This finally worked for us!
Try to remove Up Arrows from all dependencies, i.e package.json.
As an example:
"react-native-unity-view": "^1.2.1"
to:
"react-native-unity-view": "1.2.1"
@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.
@alisherakb Interesting, so that fixed your release builds? I gave it a shot but it did not seem to change anything.
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?
@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. RN: 0.57.3 Unity: 2018.1.3f1 Node: v8.15 RN unity view: 1.2.1
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?
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? Do you generate main.jsbundle correctly and edit AppDelegate.m to use it in release mode before archiving the project?
react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios
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
COPY_PHASE_STRIP = YES;
ENABLE_BITCODE = NO;
STRIP_INSTALLED_PRODUCT = NO;
@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. "Strip Linked Product" to NO, still crashed.
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
just added it as a field in the ModuleRegistry class
@mtostenson Thanks for reply , could u give me more information for it ,or some code for
just added it as a field in the ModuleRegistry class
Sure. Add this to ModuleRegistry.h under private:
:
std::vector<std::string> moduleNamesVec_;
Then in ModuleRegistry.cpp in the getConfig function, change the line
moduleNames();
into moduleNamesVec_ = moduleNames();
@mtostenson okay,let me try ~ thank u for a million.
@mtostenson okay,let me try ~ thank u for a million.
No problem, please let me know if this does anything.
@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.
Crashed: com.facebook.react.JavaScript
0 ??? 0x238e390e4 (Missing)
1 ??? 0x238eb1afc (Missing)
2 ??? 0x63240238d8ffb0 (Missing)
3 ??? 0x66ca8238e8ec7c (Missing)
4 ??? 0x67bb8238e8ee48 (Missing)
5 ??? 0x7d8a8238e802c0 (Missing)
6 ??? 0xfa0238471980 (Missing)
7 ??? 0x4e858102c9f168 (Missing)
8 rnunitydemo 0x1039d8844 facebook::react::ModuleRegistry::getConfig(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
9 rnunitydemo 0x1039e70d4 facebook::react::JSCNativeModules::createModule(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, OpaqueJSContext const*)
10 rnunitydemo 0x1039e6c34 facebook::react::JSCNativeModules::getModule(OpaqueJSContext const*, OpaqueJSString*)
11 rnunitydemo 0x1039e1840 OpaqueJSValue const* (*facebook::react::(anonymous namespace)::exceptionWrapMethod<&(facebook::react::JSCExecutor::getNativeModule(OpaqueJSValue*, OpaqueJSString*))>())(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSString*, OpaqueJSValue const**)::funcWrapper::call(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSString*, OpaqueJSValue const**)
12 ??? 0x24074083c (Missing)
13 ??? 0x71618240e5ec24 (Missing)
14 ??? 0x210a8240716554 (Missing)
15 ??? 0x7dcf824071b39c (Missing)
16 ??? 0x7503824071b39c (Missing)
17 ??? 0x6047024071b39c (Missing)
18 ??? 0x979024071b39c (Missing)
19 ??? 0x14da824071b39c (Missing)
20 ??? 0x5171024071339c (Missing)
21 ??? 0x4d60240db4cc4 (Missing)
22 ??? 0x5f6b0240fa7ad0 (Missing)
23 ??? 0x885824073e73c (Missing)
24 ??? 0x781801039c1538 (Missing)
25 rnunitydemo 0x1039df8fc facebook::react::JSCExecutor::loadApplicationScript(std::__1::unique_ptr<facebook::react::JSBigString const, std::__1::default_delete<facebook::react::JSBigString const> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)
26 rnunitydemo 0x1039e5b70 std::__1::__function::__func<facebook::react::NativeToJsBridge::loadApplication(std::__1::unique_ptr<facebook::react::RAMBundleRegistry, std::__1::default_delete<facebook::react::RAMBundleRegistry> >, std::__1::unique_ptr<facebook::react::JSBigString const, std::__1::default_delete<facebook::react::JSBigString const> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)::$_0, std::__1::allocator<facebook::react::NativeToJsBridge::loadApplication(std::__1::unique_ptr<facebook::react::RAMBundleRegistry, std::__1::default_delete<facebook::react::RAMBundleRegistry> >, std::__1::unique_ptr<facebook::react::JSBigString const, std::__1::default_delete<facebook::react::JSBigString const> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)::$_0>, void (facebook::react::JSExecutor*)>::operator()(facebook::react::JSExecutor*&&)
27 rnunitydemo 0x1037ad298 std::__1::function<void (facebook::react::JSExecutor*)>::operator()(facebook::react::JSExecutor*) const (functional:1913)
28 rnunitydemo 0x1039607bc facebook::react::tryAndReturnError(std::__1::function<void ()> const&)
29 rnunitydemo 0x103956400 facebook::react::RCTMessageThread::tryFunc(std::__1::function<void ()> const&)
30 ??? 0x23923c354 (Missing)
31 ??? 0x1fa1823923bc38 (Missing)
32 ??? 0x185b0239236f14 (Missing)
33 ??? 0x4ea202392362e8 (Missing)
34 ??? 0x2b3e81039376c4 (Missing)
35 ??? 0x239c38fc0 (Missing)
36 ??? 0x4a270239d75c44 (Missing)
37 ??? 0x4cfb8238eb0974 (Missing)
38 ??? 0x591f8238eb08d0 (Missing)
39 ??? 0x3ffc0238eb8ddc (Missing)
Crashed: com.facebook.react.JavaScript
0 ??? 0x238e390e4 (Missing)
1 ??? 0x238eb1afc (Missing)
2 ??? 0x10d78238d8ffb0 (Missing)
3 ??? 0x68b58238e8ec7c (Missing)
4 ??? 0x15cb8238e8ee48 (Missing)
5 ??? 0x43980238e802c0 (Missing)
6 ??? 0x79468238471980 (Missing)
7 ??? 0x6426810307f168 (Missing)
8 rnunitydemo 0x103db8844 facebook::react::ModuleRegistry::getConfig(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
9 rnunitydemo 0x103dc70d4 facebook::react::JSCNativeModules::createModule(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, OpaqueJSContext const*)
10 rnunitydemo 0x103dc6c34 facebook::react::JSCNativeModules::getModule(OpaqueJSContext const*, OpaqueJSString*)
11 rnunitydemo 0x103dc1840 OpaqueJSValue const* (*facebook::react::(anonymous namespace)::exceptionWrapMethod<&(facebook::react::JSCExecutor::getNativeModule(OpaqueJSValue*, OpaqueJSString*))>())(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSString*, OpaqueJSValue const**)::funcWrapper::call(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSString*, OpaqueJSValue const**)
12 JavaScriptCore 0x24074083c JSC::JSCallbackObject<JSC::JSDestructibleObject>::getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&)
13 ??? 0x300c8240e5ec24 (Missing)
14 ??? 0x30c60240716554 (Missing)
15 ??? 0x57a7024071b39c (Missing)
16 ??? 0xa82024071b39c (Missing)
17 ??? 0x29c2824071b39c (Missing)
18 ??? 0x7aae024071b39c (Missing)
19 ??? 0xa7824071b39c (Missing)
20 ??? 0x78f9824071339c (Missing)
21 ??? 0x5cf18240db4cc4 (Missing)
22 ??? 0x43e80240fa7ad0 (Missing)
23 ??? 0x331e824073e73c (Missing)
24 ??? 0x38fa0103da1538 (Missing)
25 rnunitydemo 0x103dbf8fc facebook::react::JSCExecutor::loadApplicationScript(std::__1::unique_ptr<facebook::react::JSBigString const, std::__1::default_delete<facebook::react::JSBigString const> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)
26 rnunitydemo 0x103dc5b70 std::__1::__function::__func<facebook::react::NativeToJsBridge::loadApplication(std::__1::unique_ptr<facebook::react::RAMBundleRegistry, std::__1::default_delete<facebook::react::RAMBundleRegistry> >, std::__1::unique_ptr<facebook::react::JSBigString const, std::__1::default_delete<facebook::react::JSBigString const> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)::$_0, std::__1::allocator<facebook::react::NativeToJsBridge::loadApplication(std::__1::unique_ptr<facebook::react::RAMBundleRegistry, std::__1::default_delete<facebook::react::RAMBundleRegistry> >, std::__1::unique_ptr<facebook::react::JSBigString const, std::__1::default_delete<facebook::react::JSBigString const> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)::$_0>, void (facebook::react::JSExecutor*)>::operator()(facebook::react::JSExecutor*&&)
27 rnunitydemo 0x103b8d298 std::__1::function<void (facebook::react::JSExecutor*)>::operator()(facebook::react::JSExecutor*) const (functional:1913)
28 rnunitydemo 0x103d407bc facebook::react::tryAndReturnError(std::__1::function<void ()> const&)
29 rnunitydemo 0x103d36400 facebook::react::RCTMessageThread::tryFunc(std::__1::function<void ()> const&)
30 CoreFoundation 0x23923c354 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__
31 ??? 0xc7823923bc38 (Missing)
32 ??? 0x1ca18239236f14 (Missing)
33 ??? 0x63302392362e8 (Missing)
34 ??? 0x3a590103d176c4 (Missing)
35 Foundation 0x239c38fc0 -[NSThread main]
36 ??? 0x14e88239d75c44 (Missing)
37 ??? 0x37000238eb0974 (Missing)
38 ??? 0x11100238eb08d0 (Missing)
39 ??? 0x4a400238eb8ddc (Missing)
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 :(
@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
Crashed: com.facebook.react.JavaScript 0 ??? 0x238e390e4 (Missing) 1 ??? 0x238eb1afc (Missing) 2 ??? 0x63240238d8ffb0 (Missing) 3 ??? 0x66ca8238e8ec7c (Missing) 4 ??? 0x67bb8238e8ee48 (Missing) 5 ??? 0x7d8a8238e802c0 (Missing) 6 ??? 0xfa0238471980 (Missing) 7 ??? 0x4e858102c9f168 (Missing) 8 rnunitydemo 0x1039d8844 facebook::react::ModuleRegistry::getConfig(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) 9 rnunitydemo 0x1039e70d4 facebook::react::JSCNativeModules::createModule(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, OpaqueJSContext const*) 10 rnunitydemo 0x1039e6c34 facebook::react::JSCNativeModules::getModule(OpaqueJSContext const*, OpaqueJSString*) 11 rnunitydemo 0x1039e1840 OpaqueJSValue const* (*facebook::react::(anonymous namespace)::exceptionWrapMethod<&(facebook::react::JSCExecutor::getNativeModule(OpaqueJSValue*, OpaqueJSString*))>())(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSString*, OpaqueJSValue const**)::funcWrapper::call(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSString*, OpaqueJSValue const**) 12 ??? 0x24074083c (Missing) 13 ??? 0x71618240e5ec24 (Missing) 14 ??? 0x210a8240716554 (Missing) 15 ??? 0x7dcf824071b39c (Missing) 16 ??? 0x7503824071b39c (Missing) 17 ??? 0x6047024071b39c (Missing) 18 ??? 0x979024071b39c (Missing) 19 ??? 0x14da824071b39c (Missing) 20 ??? 0x5171024071339c (Missing) 21 ??? 0x4d60240db4cc4 (Missing) 22 ??? 0x5f6b0240fa7ad0 (Missing) 23 ??? 0x885824073e73c (Missing) 24 ??? 0x781801039c1538 (Missing) 25 rnunitydemo 0x1039df8fc facebook::react::JSCExecutor::loadApplicationScript(std::__1::unique_ptr<facebook::react::JSBigString const, std::__1::default_delete<facebook::react::JSBigString const> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) 26 rnunitydemo 0x1039e5b70 std::__1::__function::__func<facebook::react::NativeToJsBridge::loadApplication(std::__1::unique_ptr<facebook::react::RAMBundleRegistry, std::__1::default_delete<facebook::react::RAMBundleRegistry> >, std::__1::unique_ptr<facebook::react::JSBigString const, std::__1::default_delete<facebook::react::JSBigString const> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)::$_0, std::__1::allocator<facebook::react::NativeToJsBridge::loadApplication(std::__1::unique_ptr<facebook::react::RAMBundleRegistry, std::__1::default_delete<facebook::react::RAMBundleRegistry> >, std::__1::unique_ptr<facebook::react::JSBigString const, std::__1::default_delete<facebook::react::JSBigString const> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)::$_0>, void (facebook::react::JSExecutor*)>::operator()(facebook::react::JSExecutor*&&) 27 rnunitydemo 0x1037ad298 std::__1::function<void (facebook::react::JSExecutor*)>::operator()(facebook::react::JSExecutor*) const (functional:1913) 28 rnunitydemo 0x1039607bc facebook::react::tryAndReturnError(std::__1::function<void ()> const&) 29 rnunitydemo 0x103956400 facebook::react::RCTMessageThread::tryFunc(std::__1::function<void ()> const&) 30 ??? 0x23923c354 (Missing) 31 ??? 0x1fa1823923bc38 (Missing) 32 ??? 0x185b0239236f14 (Missing) 33 ??? 0x4ea202392362e8 (Missing) 34 ??? 0x2b3e81039376c4 (Missing) 35 ??? 0x239c38fc0 (Missing) 36 ??? 0x4a270239d75c44 (Missing) 37 ??? 0x4cfb8238eb0974 (Missing) 38 ??? 0x591f8238eb08d0 (Missing) 39 ??? 0x3ffc0238eb8ddc (Missing)
Crashlog B
Crashed: com.facebook.react.JavaScript 0 ??? 0x238e390e4 (Missing) 1 ??? 0x238eb1afc (Missing) 2 ??? 0x10d78238d8ffb0 (Missing) 3 ??? 0x68b58238e8ec7c (Missing) 4 ??? 0x15cb8238e8ee48 (Missing) 5 ??? 0x43980238e802c0 (Missing) 6 ??? 0x79468238471980 (Missing) 7 ??? 0x6426810307f168 (Missing) 8 rnunitydemo 0x103db8844 facebook::react::ModuleRegistry::getConfig(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) 9 rnunitydemo 0x103dc70d4 facebook::react::JSCNativeModules::createModule(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, OpaqueJSContext const*) 10 rnunitydemo 0x103dc6c34 facebook::react::JSCNativeModules::getModule(OpaqueJSContext const*, OpaqueJSString*) 11 rnunitydemo 0x103dc1840 OpaqueJSValue const* (*facebook::react::(anonymous namespace)::exceptionWrapMethod<&(facebook::react::JSCExecutor::getNativeModule(OpaqueJSValue*, OpaqueJSString*))>())(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSString*, OpaqueJSValue const**)::funcWrapper::call(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSString*, OpaqueJSValue const**) 12 JavaScriptCore 0x24074083c JSC::JSCallbackObject<JSC::JSDestructibleObject>::getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&) 13 ??? 0x300c8240e5ec24 (Missing) 14 ??? 0x30c60240716554 (Missing) 15 ??? 0x57a7024071b39c (Missing) 16 ??? 0xa82024071b39c (Missing) 17 ??? 0x29c2824071b39c (Missing) 18 ??? 0x7aae024071b39c (Missing) 19 ??? 0xa7824071b39c (Missing) 20 ??? 0x78f9824071339c (Missing) 21 ??? 0x5cf18240db4cc4 (Missing) 22 ??? 0x43e80240fa7ad0 (Missing) 23 ??? 0x331e824073e73c (Missing) 24 ??? 0x38fa0103da1538 (Missing) 25 rnunitydemo 0x103dbf8fc facebook::react::JSCExecutor::loadApplicationScript(std::__1::unique_ptr<facebook::react::JSBigString const, std::__1::default_delete<facebook::react::JSBigString const> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) 26 rnunitydemo 0x103dc5b70 std::__1::__function::__func<facebook::react::NativeToJsBridge::loadApplication(std::__1::unique_ptr<facebook::react::RAMBundleRegistry, std::__1::default_delete<facebook::react::RAMBundleRegistry> >, std::__1::unique_ptr<facebook::react::JSBigString const, std::__1::default_delete<facebook::react::JSBigString const> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)::$_0, std::__1::allocator<facebook::react::NativeToJsBridge::loadApplication(std::__1::unique_ptr<facebook::react::RAMBundleRegistry, std::__1::default_delete<facebook::react::RAMBundleRegistry> >, std::__1::unique_ptr<facebook::react::JSBigString const, std::__1::default_delete<facebook::react::JSBigString const> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)::$_0>, void (facebook::react::JSExecutor*)>::operator()(facebook::react::JSExecutor*&&) 27 rnunitydemo 0x103b8d298 std::__1::function<void (facebook::react::JSExecutor*)>::operator()(facebook::react::JSExecutor*) const (functional:1913) 28 rnunitydemo 0x103d407bc facebook::react::tryAndReturnError(std::__1::function<void ()> const&) 29 rnunitydemo 0x103d36400 facebook::react::RCTMessageThread::tryFunc(std::__1::function<void ()> const&) 30 CoreFoundation 0x23923c354 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ 31 ??? 0xc7823923bc38 (Missing) 32 ??? 0x1ca18239236f14 (Missing) 33 ??? 0x63302392362e8 (Missing) 34 ??? 0x3a590103d176c4 (Missing) 35 Foundation 0x239c38fc0 -[NSThread main] 36 ??? 0x14e88239d75c44 (Missing) 37 ??? 0x37000238eb0974 (Missing) 38 ??? 0x11100238eb08d0 (Missing) 39 ??? 0x4a400238eb8ddc (Missing)
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:
syslog(LOG_ERR, "TESTING: ModuleRegistry::getConfig 1");
and increment the number at the end with each line. This is how I was able to find our "fix." Just open up the device console and filter on TESTING when you run the production build. I hope this helps.
@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:
Vuforia Engine applications must be deployed to a device to run; they cannot be run in the iOS simulator. You must enroll in the iOS Developer program to deploy applications to an iOS device.
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.
Update
Firebase Test Lab does not include XS or XR models 🤦♂️
@mtostenson @JanOwiesniak now i could run it under iPhone XS Max iOS 12.1.4,which use react-native patch yesterday.
@peterfei which of these commits include the fix?
not found commits from issues, but u reply here like this:
This works for you? Could you tell me a bit more about your dependencies?
react-native info
and current react-native-unity-view
would be a great help
hello!
Onlookers !!!
Sure,
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
Android SDK:
API Levels: 23, 25, 26, 27
Build Tools: 23.0.1, 25.0.2, 25.0.3, 26.0.1, 26.0.2, 26.0.3, 27.0.2, 27.0.3
IDEs:
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.5.0 => 16.5.0
react-native: 0.57.0 => 0.57.0
npmGlobalPackages:
react-native-unity-view: 1.3.3
react-native-video: 4.3.1
react-native info
React Native Environment Info:
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
Android SDK:
Build Tools: 23.0.1, 26.0.2, 27.0.1, 27.0.3, 28.0.1, 28.0.3
API Levels: 21, 23, 24, 25, 26, 27, 28
IDEs:
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.5.0 => 16.5.0
react-native: 0.57.0 => 0.57.0
package.json
"react-native-unity-view": "^1.3.2"
I'm still on react-native-unity-view
v1.3.2, everything else looks pretty much the same. The only difference between 1.3.2 and 1.3.3 seems to be this android related commit so i guess this is not the issue here.
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
abort() called
crash_info_entry_1
rnunitydemo(7356,0x16b713000) malloc: *** error for object 0x10d82c460: pointer being freed was not allocated
stacktrace
iOS: 12.1.4 (16D57) Device: iPhone XS
Crashed: com.google.firebase.firestore
0 libsystem_kernel.dylib 0x238e390e4 __pthread_kill + 8
1 libsystem_pthread.dylib 0x238eb1afc pthread_kill + 300
2 ??? 0x4aaf0238d8ffb0 (Missing)
3 ??? 0x60cd8238e8ec7c (Missing)
4 ??? 0x9bd8238e8ee48 (Missing)
5 ??? 0x2b690238e802c0 (Missing)
6 ??? 0x5839823847208c (Missing)
7 ??? 0x37828105696b40 (Missing)
8 rnunitydemo 0x105696d2c firebase::firestore::local::LevelDbTransaction::Iterator::Seek(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) (leveldb_transaction.cc:83)
9 rnunitydemo 0x105634c38 -[FSTLevelDBMutationQueue allMutationBatchesAffectingDocumentKeys:] (memory:2567)
10 rnunitydemo 0x10563d360 -[FSTLocalDocumentsView documentsForKeys:] (FSTLocalDocumentsView.mm:84)
11 rnunitydemo 0x105642a2c -[FSTLocalStore applyRemoteEvent:] (FSTLocalStore.mm:307)
12 rnunitydemo 0x105678020 -[FSTSyncEngine applyRemoteEvent:] (FSTSyncEngine.mm:352)
13 rnunitydemo 0x1056693a8 -[FSTRemoteStore raiseWatchSnapshotWithSnapshotVersion:] (FSTRemoteStore.mm:416)
14 rnunitydemo 0x105668cb0 -[FSTRemoteStore watchStreamDidChange:snapshotVersion:] (FSTRemoteStore.mm:333)
15 rnunitydemo 0x10569c3d4 firebase::firestore::remote::bridge::WatchStreamDelegate::NotifyDelegateOnChange(FSTWatchChange*, firebase::firestore::model::SnapshotVersion const&) (remote_objc_bridge.mm:306)
16 rnunitydemo 0x1056a42d8 firebase::firestore::remote::WatchStream::NotifyStreamResponse(grpc::ByteBuffer const&) (watch_stream.mm:93)
17 rnunitydemo 0x1056a015c firebase::firestore::remote::Stream::OnStreamRead(grpc::ByteBuffer const&) (memory:2583)
18 rnunitydemo 0x105691238 std::__1::function<void (facebook::react::JSExecutor*)>::operator()(facebook::react::JSExecutor*) const (functional:1913)
19 rnunitydemo 0x10568bbdc std::__1::function<void (bool, firebase::firestore::remote::GrpcCompletion const*)>::operator()(bool, firebase::firestore::remote::GrpcCompletion const*) const (functional:1913)
20 rnunitydemo 0x10568bac8 std::__1::__function::__func<firebase::firestore::remote::GrpcCompletion::Complete(bool)::$_0, std::__1::allocator<firebase::firestore::remote::GrpcCompletion::Complete(bool)::$_0>, void ()>::operator()() (grpc_completion.cc:69)
21 rnunitydemo 0x1055f9118 firebase::firestore::util::AsyncQueue::ExecuteBlocking(std::__1::function<void ()> const&) (atomic:921)
22 rnunitydemo 0x10560014c firebase::firestore::util::internal::DispatchAsync(NSObject<OS_dispatch_queue>*, std::__1::function<void ()>&&)::$_0::__invoke(void*) (executor_libdispatch.mm:58)
23 libdispatch.dylib 0x238cb1134 _dispatch_client_callout + 20
24 ??? 0x75640238cb864c (Missing)
25 ??? 0x43e78238cb9194 (Missing)
26 ??? 0x1a6a8238cc1480 (Missing)
27 ??? 0x71b98238eb2b20 (Missing)
28 ??? 0x2358238eb8dd4 (Missing)
@peterfei @mtostenson three more questions which might help me to get closer to the problem:
@JanOwiesniak
2017.2.0f3
@JanOwiesniak
#include "Classes/Unity/UnitySharedDecls.h"
to #include "Unity/UnitySharedDecls.h"
You'll also need to remove references to DynamicLibEngineAPI-functions.h and DynamicLibEngineAPI.mm. More about that issue here.
If this helps you too I'll probably open a PR to fix those issues and add support for this Unity version. @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, show some error like
: "_OBJC_CLASS_$_AVPlayerViewController", referenced from:
: Objc-class-ref in FullScreenVideoPlayer.o
: Symbol(s) not found for architecture arm64
: Linker command failed with exit code 1 (use -v to see invocation)
any idea?
Mine fault,should add AVKit.framework ....
This is how i fixed it (in a nutshell)
moduleNames()
(https://github.com/f111fei/react-native-unity-view/issues/79#issuecomment-465110101)react-native info
React Native Environment Info:
System:
OS: macOS 10.14
CPU: (8) x64 Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz
Memory: 1.18 GB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 8.15.0 - /usr/local/opt/node@8/bin/node
Yarn: 1.13.0 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/opt/node@8/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
Android SDK:
API Levels: 21, 23, 24, 25, 26, 27, 28
Build Tools: 23.0.1, 26.0.2, 27.0.1, 27.0.3, 28.0.1, 28.0.3
System Images: android-21 | Google APIs ARM EABI v7a, android-26 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.3 AI-182.5107.16.33.5199772
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.5.0 => 16.5.0
react-native: 0.57.8 => 0.57.8
@peterfei @mtostenson thanks again for your support.
@JanOwiesniak
- Legacy build system
- High Sierra
- 2018.2.1f1 before, but today after I updating to 2018.3.6f1 I am no longer getting a crash on start. This might be a seperate issue to the one I was describing before, but I would suggest trying to this version along with 1.3.3 of this library. You'll probably run into a couple of issues: SplashScreen.mm you'll need to change
#include "Classes/Unity/UnitySharedDecls.h"
to#include "Unity/UnitySharedDecls.h"
You'll also need to remove references to DynamicLibEngineAPI-functions.h and DynamicLibEngineAPI.mm. More about that issue here. If this helps you too I'll probably open a PR to fix those issues and add support for this Unity version.
@mtostenson @JanOwiesniak Hey guys, I'm following your solutions but even not able to run the project in debug:
Have you ever experienced this issue?
Unity -v: 2018.3.2 "react-native": "0.58.6"
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.
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. Actually, I changed my xcconfig a bit, followed this commit https://github.com/jiulongw/swift-unity/pull/120/commits/55826261738d7adebe011a7474eec7aa5b898adc
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 std::move
function call around name
variable in ModuleRegistry::moduleNames()
function body.
Changing names.push_back(std::move(name));
to names.push_back(name);
solves the problem.
@alisherakb I am equally experiencing the same issue. Please, how did you fix yours?
@OgieBen Hi, can you provide more details about the issue? My last comments here were about the error on running Unity3D 2018.2+ and react-native-unity-view.
@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. react-native-unity-view: v1.3.3
I also made changes to the library's xcconfig file
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: