Appboy / appboy-ios-sdk

Public repo for the Braze iOS SDK
https://www.braze.com
Other
165 stars 142 forks source link

iOS 13 Crash - UIDocumentMenuViewController #235

Closed lucasanovaes closed 3 years ago

lucasanovaes commented 4 years ago

Report

We had a spike of crashes recently which probably has something related with appboy sdk.

Screen Shot 2020-06-08 at 15 53 08

It's happening 100% on iOS 13 devices.

Screen Shot 2020-06-08 at 15 50 46

Crash report from firebase with readable message: Screen Shot 2020-06-08 at 15 50 31

Full stack trace of the crash:

Fatal Exception: NSGenericException
0  CoreFoundation                 0x19292d5f0 __exceptionPreprocess
1  libobjc.A.dylib                0x19264fbcc objc_exception_throw
2  UIKitCore                      0x1962b3178 __66-[UIPopoverPresentationController presentationTransitionWillBegin]_block_invoke
3  UIKitCore                      0x1962bd300 __71-[UIPresentationController _initViewHierarchyForPresentationSuperview:]_block_invoke
4  UIKitCore                      0x1962bae98 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke.465
5  UIKitCore                      0x1969e194c _runAfterCACommitDeferredBlocks
6  UIKitCore                      0x1969d12f4 _cleanUpAfterCAFlushAndRunDeferredBlocks
7  UIKitCore                      0x196a01744 _afterCACommitHandler
8  CoreFoundation                 0x1928aafb8 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__
9  CoreFoundation                 0x1928a5eac __CFRunLoopDoObservers
10 CoreFoundation                 0x1928a6328 __CFRunLoopRun
11 CoreFoundation                 0x1928a5c34 CFRunLoopRunSpecific
12 GraphicsServices               0x19c9ef38c GSEventRunModal
13 UIKitCore                      0x1969d822c UIApplicationMain
14 CabifyRider                    0x100ef57a4 main (<compiler-generated>)
15 libdyld.dylib                  0x19272d800 start

Some important points that we observed:

Describe your environment.

Info Value
Platform Name iOS
Platform Version iOS 13 >
SDK Version 3.22.0 (last app version is using 3.22.0)
Integration Method carthage
Xcode Version Xcode 11.4
Repro rate sometimes

What did you do?

We were not able to reproduce it. We've checked which InApp campaigns we have activated and if we did any change close to spike date, but we can't find any info related to it.

What did you expect to happen?

Not crash 😅

What happened instead?

It should no crash

Steps to reproduce

We are not able to reproduce it

Are you doing any feature customizations that may relate to the issue? Can you share the code snippet?

No, we are not doing any kind of customization

hokstuff commented 4 years ago

Hi @lucasanovaes,

Looking at the stack trace you provided, we don't see indications that the crash is coming from our SDK. Can you explain why you think it is coming from us?

lucasanovaes commented 4 years ago

Hi @hokstuff ! Sure, I've missed a part of the logs in the original issue, sorry.

Screen Shot 2020-06-08 at 15 50 13

The crash is happening at the exactly point where the InApp message should appear, and in Firebase console we can see that firebase_screen_class is ABKInAppMessageWindowController

lucasanovaes commented 4 years ago

@hokstuff Hey!! Do we have any updates on this issue? We are still being impacted :(

hokstuff commented 4 years ago

Hi @lucasanovaes,

We are tracking this internally and have not been able to reproduce this issue yet. We are currently still investigating - please let us know if you figure out any repro steps for this issue.

Thanks!

lucasanovaes commented 4 years ago

@hokstuff Thanks for the answer!

We are still not able to reproduce it. The number os cases are lower now, but we still have a few per day:

Screen Shot 2020-06-15 at 17 38 55

lowip commented 4 years ago

Hi @lucasanovaes

Would it be possible for your team to send the in-app message campaigns urls (from the Braze dashboard) running during the peak at support@braze.com

Thanks!

martacatala commented 4 years ago

Hi @lowip Here you have the url of the inapps both sent June, 5 in AR: Inapp 1- https://dashboard-01.braze.com/engagement/campaigns/5eda7a4626e78f7d539c5a0f/56428ca86461734ae3670000?page=-2&campaignName=105019_AR_ARSANITARIOS2_ENG_UTODO_YES_APLAUSOS

Inapp 2- https://dashboard-01.braze.com/engagement/campaigns/5eda7c548356684bdfc8b401/56428ca86461734ae3670000?campaignName=105019_AR_ARSANITARIOS2_ENG_UTODO_YES_APLAUSOS&page=-2

Bucimis commented 4 years ago

@martacatala @lucasanovaes

Hey, we ran these campaigns on our devices, including setting our device locales to Argentina and weren't able to repro. It looks like there's some templating going on in the deep links and we were wondering if that was what was causing the issue.

Could you reach out to support@braze.com with information on how we can repro or template in the correct values into the deep links for testing?

martacatala commented 4 years ago

Hi Jared, The deep links included in the inapp was this: cabify:///promotions?promocode={{custom_attribute.${105019_code2}}} That means a custom attribute is assigned to the users that receive the campaign. This custom attribute brings a promo code. But this is a common practice in our comms.

Let me know if this makes sense for you. Otherwise we can talk with the support team.

Thanks!

Marta

On Wed, Jun 24, 2020 at 9:35 PM Jared Poelman notifications@github.com wrote:

@martacatala https://github.com/martacatala @lucasanovaes https://github.com/lucasanovaes

Hey, we ran these campaigns on our devices, including setting our device locales to Argentina and weren't able to repro. It looks like there's some templating going on in the deep links and we were wondering if that was what was causing the issue.

Could you reach out to support@braze.com with information on how we can repro or template in the correct values into the deep links for testing?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Appboy/appboy-ios-sdk/issues/235#issuecomment-649024583, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP7TLSB4EEMDLCYVPX4GHA3RYJIPRANCNFSM4NYOKBQA .

-- [image: Cabify - Your private Driver] http://www.cabify.com/

Marta Catalá CRM/DRM Project Coordinator Spain

marta.catala@cabify.com

[image: Facebook] http://cbify.com/fb_ES[image: Twitter] http://cbify.com/tw_ES[image: Instagram] http://cbify.com/in_ES[image: Linkedin] https://www.linkedin.com/in/martacatalar/

--

Este mensaje y cualquier archivo adjunto va dirigido exclusivamente a su destinatario, pudiendo contener información confidencial sometida a secreto profesional. No está permitida su reproducción o distribución sin la autorización expresa de Cabify. Si usted no es el destinatario final por favor elimínelo *e infórmenos por esta vía.

*This message and any attached file are intended exclusively for the addressee, and it may be confidential. You are not allowed to copy or disclose it without Cabify's prior written authorization. If you are not the intended recipient please  delete it from your system and notify us by e-mail.

hokstuff commented 4 years ago

Hi @martacatala,

Thanks for the information - contacting support@braze.com would be a better avenue so we can investigate and attempt to repro this issue.

Within that email, can you add the background info from this post as well as answers to these questions:

Thank you!

martacatala commented 4 years ago

Hi Daniel,

We have already reported the issue to Braze Support Team. I will try to reply to your questions:

Thanks, Marta

On Tue, Jun 30, 2020 at 10:16 PM Daniel Hok notifications@github.com wrote:

Hi @martacatala https://github.com/martacatala,

Thanks for the information - contacting support@braze.com would be a better avenue so we can investigate and attempt to repro this issue.

Within that email, can you add the background info from this post as well as answers to these questions:

  • Are you still experiencing this issue now (and how often)? Do you have any new info on repro steps?
  • At a high level the deep links + templating make sense, but we'd need more info to confirm that the entire flow is working as expected. What are some example values that you'd expect would get returned from {{custom_attribute.${105019_code2}}}? What would you expect to happen if the user didn't have that custom attribute?
  • Does the deep link or any other part of your app use UIDocumentMenuViewController?

Thank you!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Appboy/appboy-ios-sdk/issues/235#issuecomment-652019719, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP7TLSGRUK3FFMSRCL7QYULRZJB2DANCNFSM4NYOKBQA .

-- [image: Cabify - Your private Driver] http://www.cabify.com/

Marta Catalá CRM/DRM Project Coordinator Spain

marta.catala@cabify.com

[image: Facebook] http://cbify.com/fb_ES[image: Twitter] http://cbify.com/tw_ES[image: Instagram] http://cbify.com/in_ES[image: Linkedin] https://www.linkedin.com/in/martacatalar/

--

Este mensaje y cualquier archivo adjunto va dirigido exclusivamente a su destinatario, pudiendo contener información confidencial sometida a secreto profesional. No está permitida su reproducción o distribución sin la autorización expresa de Cabify. Si usted no es el destinatario final por favor elimínelo *e infórmenos por esta vía.

*This message and any attached file are intended exclusively for the addressee, and it may be confidential. You are not allowed to copy or disclose it without Cabify's prior written authorization. If you are not the intended recipient please  delete it from your system and notify us by e-mail.

hokstuff commented 3 years ago

Closing out this thread due to age and inactivity. If you are still experiencing this issue, please ping the Braze Support thread you have already opened and we will investigate further into the issue.

Thank you!