Description:
So I'm testing the new in app messaging feature, and its hard crashing on iOS at the moment, it works fine on Android

using the "Preview on test device" in Onesignal website, I send the message to my iphone and it just crashes the application, is there any other settings I need to setup first? I receive notifications correctly, set trigger correctly, etc
Environment
1.- latest version 3.4.1 react-native-onesignal and sdk 2.11.0, react native 0.60.4
2.- using cocoapods
Steps to Reproduce Issue:
Anything else:
(crash stacktraces, as well as any other information here)
2019-09-18 16:13:34:261 NewApp[6153:1697302] CRASH: Unable to activate constraint with anchors <NSLayoutYAxisAnchor:0x280d76300 "OSInAppMessageView:0x117d24330.top"> and <NSLayoutYAxisAnchor:0x280d75cc0 "UIView:0x117d24150.bottom"> because they have no common ancestor. Does the constraint or its anchors reference items in different view hierarchies? That's illegal. Stack Trace: (
0 CoreFoundation 0x000000023398a9a4 <redacted> + 252
1 libobjc.A.dylib 0x0000000232b639f8 objc_exception_throw + 56
2 CoreFoundation 0x0000000233894bc0 <redacted> + 0
3 Foundation 0x0000000234303160 <redacted> + 300
4 NewApp 0x00000001012f8a3c -[OSInAppMessageViewController dismissCurrentInAppMessage:withVelocity:] + 688
5 NewApp 0x00000001012d9f48 -[OSMessagingController presentInAppPreviewMessage:] + 180
6 NewApp 0x00000001012e32d4 +[OneSignalHelper handleIAMPreview:] + 180
7 NewApp 0x00000001012d564c +[OneSignal handleNotificationOpened:isActive:actionType:displayType:] + 148
8 NewApp 0x00000001012d5470 +[OneSignal notificationReceived:isActive:wasOpened:] + 936
9 NewApp 0x00000001012ece08 -[OneSignalUNUserNotificationCenter onesignalUserNotificationCenter:willPresentNotification:withCompletionHandler:] + 816
10 UIKitCore 0x00000002603fd3c8 <redacted> + 4596
11 UIKitCore 0x000000025fca7b08 <redacted> + 652
12 UIKitCore 0x000000025fca782c <redacted> + 428
13 UIKitCore 0x000000025fcac36c <redacted> + 220
14 UIKitCore 0x000000025fcad150 _performActionsWithDelayForTransitionContext + 112
15 UIKitCore 0x000000025fcac224 <redacted> + 244
16 UIKitCore 0x000000025fcb0f24 <redacted> + 360
17 UIKitCore 0x000000025ffe12b0 <redacted> + 464
18 FrontBoardServices 0x00000002363075d8 <redacted> + 224
19 libdispatch.dylib 0x00000001024dcc78 _dispatch_client_callout + 16
20 libdispatch.dylib 0x00000001024e0840 _dispatch_block_invoke_direct + 232
21 FrontBoardServices 0x0000000236341040 <redacted> + 40
22 FrontBoardServices 0x0000000236340cdc <redacted> + 408
23 FrontBoardServices 0x0000000236341294 <redacted> + 52
24 CoreFoundation 0x000000023391c728 <redacted> + 24
25 CoreFoundation 0x000000023391c6a8 <redacted> + 88
26 CoreFoundation 0x000000023391bf90 <redacted> + 176
27 CoreFoundation 0x0000000233916ecc <redacted> + 1004
28 CoreFoundation 0x00000002339167c0 CFRunLoopRunSpecific + 436
29 GraphicsServices 0x0000000235b1779c GSEventRunModal + 104
30 UIKitCore 0x00000002603e7c38 UIApplicationMain + 212
31 NewApp 0x0000000100e4bbec main + 124
32 libdyld.dylib 0x00000002333da8e0 <redacted> + 4
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Howdy,
Thanks for reporting this. Unfortunately, your repro steps are not enough to help us solve the issue. Would you please contact our support channel at OneSignal.com? Ask for Rodrigo and if possible, include a zip of your project or a project that reproduces the issue. Would really appreciate it!
Hi, I too have a crash issue while receiving in-app notification in a particular Android device.
Android 6.0.1 Samsung phone SM-J700F API 23.
But It works perfectly in all other devices. Need a solution for this.
@ReneMarquez,
For iOS, this seems to be related to the webView not being added as a subview to the instance before the constraints are added. I'm not sure how that his happening though, as this is done in setupWebviewWithMessageHandler which is called in the initializer for OSInAppMessageView. We will continue investigating. If you have any other info, please provide as your reproduction steps aren't really enough to help reproduce the issue.
@thisisbalaG ,
Please provide a stack trace
Oops, I missed the same issue in the iOS repo. This has been solved and will be included in the next release: https://github.com/OneSignal/OneSignal-iOS-SDK/issues/536
Yay 馃帀 ! The iOS SDK released the version that fixes this issue: https://github.com/OneSignal/OneSignal-iOS-SDK/releases/tag/2.11.1
Now react-native-onesignal has to release a new version that uses the 2.11.1 sdk
We will be releasing soon
Hi @rgomezp, I'm getting the same issue as @thisisbalaG, running on Android 6.0.1 (ASUS_Z010D) and "react-native-onesignal": "^3.5.0".
I can confirmed the crash is caused by in-app messaging because app no longer crash when I stopped in-app messaging activity.
2019-11-06 14:42:21.451 28881-29050/com.app E/libEGL: validate_display:255 error 3008 (EGL_BAD_DISPLAY)
2019-11-06 14:42:21.713 28881-29037/com.app E/OpenGLRenderer: resultIndex is -1, the polygon must be invalid!
@anniewey ,
Could you please open a new issue and include full logs & relevant details?