Skip to content
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

App crash with 2.11.0 #536

Closed
thomassnielsen opened this issue Sep 23, 2019 · 2 comments · Fixed by #538
Closed

App crash with 2.11.0 #536

thomassnielsen opened this issue Sep 23, 2019 · 2 comments · Fixed by #538

Comments

@thomassnielsen
Copy link

Description:

We've started seeing crashes in our Fabric logs while testing in-app messages.

Unable to activate constraint with anchors <NSLayoutYAxisAnchor:0x281554f40 "OSInAppMessageView:0x10d7bede0.top"> and <NSLayoutYAxisAnchor:0x281556780 "UIView:0x103f51590.bottom"> because they have no common ancestor. Does the constraint or its anchors reference items in different view hierarchies? That's illegal.

Environment

SDK version 2.11.0
iOS 12
iPhone XS

Steps to Reproduce Issue:

It seems to happen when dismissing in app messages. Hopefully the crash message above is enough to track down the layout constraint issue.

Anything else:


Fatal Exception: NSGenericException
0  CoreFoundation                 0x1c422eab8 (Missing)
1  libobjc.A.dylib                0x1c3433d00 (Missing)
2  CoreFoundation                 0x1c41342f4 (Missing)
3  Foundation                     0x1c4bb8c5c (Missing)
4  AppName                         0x100df71f0 -[OSInAppMessageViewController dismissCurrentInAppMessage:withVelocity:]
5  AppName                         0x100dd8768 -[OSMessagingController presentInAppPreviewMessage:]
6  AppName                         0x100de1af4 +[OneSignalHelper handleIAMPreview:]
7  AppName                         0x100dd3e6c +[OneSignal handleNotificationOpened:isActive:actionType:displayType:]
8  AppName                         0x100dd3c90 +[OneSignal notificationReceived:isActive:wasOpened:]
9  AppName                         0x100debc30 +[OneSignalUNUserNotificationCenter processiOS10Open:]
10 AppName                         0x100deb7dc -[OneSignalUNUserNotificationCenter onesignalUserNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:]
11 AppName                         0x100c7d308 FCM_swizzle_didReceiveNotificationResponseWithHandler + 560 (FIRMessagingRemoteNotificationsProxy.m:560)
12 UIKitCore                      0x1f166fc00 (Missing)
13 UIKitCore                      0x1f0eea850 (Missing)
14 UIKitCore                      0x1f0ee85d0 (Missing)
15 UIKitCore                      0x1f0ee828c (Missing)
16 UIKitCore                      0x1f0eecfbc (Missing)
17 UIKitCore                      0x1f0eede14 (Missing)
18 UIKitCore                      0x1f0eece70 (Missing)
19 UIKitCore                      0x1f0ef1e60 (Missing)
20 UIKitCore                      0x1f1238b4c (Missing)
21 FrontBoardServices             0x1c6bf2c58 (Missing)
22 libdispatch.dylib              0x1c3c3d888 (Missing)
23 libdispatch.dylib              0x1c3c40e5c (Missing)
24 FrontBoardServices             0x1c6c2f18c (Missing)
25 FrontBoardServices             0x1c6c2ee08 (Missing)
26 FrontBoardServices             0x1c6c2f404 (Missing)
27 CoreFoundation                 0x1c41beb54 (Missing)
28 CoreFoundation                 0x1c41bead0 (Missing)
29 CoreFoundation                 0x1c41be38c (Missing)
30 CoreFoundation                 0x1c41b9060 (Missing)
31 CoreFoundation                 0x1c41b8964 (Missing)
32 GraphicsServices               0x1c63f9d8c (Missing)
33 UIKitCore                      0x1f1659758 (Missing)
@thomassnielsen
Copy link
Author

Got some more details from one of our testers: This seems to happen when app is opened (or launched) and the message is supposed to be shown immediately. To the user it looks like the app crashes on launch.

@mikechoch
Copy link
Contributor

mikechoch commented Sep 24, 2019

Some exact steps for reproducing this would be nice. Have not encountered this problem while testing before the feature was released.

I was able to reproduce this crash with the following steps:

  1. Send a In-App Message preview
  2. Dismiss the In-App Message preview
  3. Leave the app
  4. Send another In-App Message preview
  5. Click the notification for the In-App Message preview (this will enter the app)
  6. The In-App Message should not show now (no crash yet though)
  7. Send a third In-App Message preview
  8. Crash occurs

Error: Unable to activate constraint with anchors <NSLayoutYAxisAnchor:0x281554f40 "OSInAppMessageView:0x10d7bede0.top"> and <NSLayoutYAxisAnchor:0x281556780 "UIView:0x103f51590.bottom"> because they have no common ancestor. Does the constraint or its anchors reference items in different view hierarchies? That's illegal.

This will be fixed in release 2.11.1 and was fixed by removing all constraints for the OSInAppMessageView in the beginning of setup (adding constraints and showing In-App Message).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants