Wordpress-ios: Support: app crashes when attempting to send message to support using Contact Us screen

Created on 3 Apr 2019  ·  17Comments  ·  Source: wordpress-mobile/WordPress-iOS

From Fabric:

Cannot display a nested UINavigationController with zero viewControllers: <UIImagePickerController: 0x109a1fc00>

Fatal Exception: NSInvalidArgumentException
0  CoreFoundation                 0x1ba820ec4 __exceptionPreprocess
1  libobjc.A.dylib                0x1b99f1a40 objc_exception_throw
2  CoreFoundation                 0x1ba727594 -[NSCache init]
3  UIKitCore                      0x1e74aadd8 -[UINavigationController _prepareForNestedDisplayWithNavigationController:]
4  UIKitCore                      0x1e74abe0c -[UINavigationController pushViewController:transition:forceImmediate:]
5  UIKitCore                      0x1e74ab9e0 -[UINavigationController pushViewController:animated:]
6  UIKitCore                      0x1e74aac4c -[UINavigationController showViewController:sender:]
7  UIKitCore                      0x1e7555210 -[UIViewController _showViewController:withAction:sender:]
8  UIKitCore                      0x1e755530c -[UIViewController showViewController:sender:]
9  ZendeskSDK                     0x1078b2314 (Missing)
10 ZendeskSDK                     0x1078b2a9c (Missing)
11 ZendeskSDK                     0x1077768bc (Missing)
12 ZendeskSDK                     0x107776778 (Missing)
13 ZendeskSDK                     0x1078a9754 (Missing)
14 ZendeskSDK                     0x10777e410 (Missing)
15 ZendeskSDK                     0x10777e474 (Missing)
16 UIKitCore                      0x1e7b04454 -[UIApplication sendAction:to:from:forEvent:]
17 UIKitCore                      0x1e7591d0c -[UIControl sendAction:to:forEvent:]
18 UIKitCore                      0x1e759202c -[UIControl _sendActionsForEvents:withEvent:]
19 ZendeskSDK                     0x1078a48d4 (Missing)
20 ZendeskSDK                     0x1078a496c (Missing)
21 UIKitCore                      0x1e7b2f2a4 forwardTouchMethod
22 UIKitCore                      0x1e7b2f390 -[UIResponder touchesEnded:withEvent:]
23 UIKitCore                      0x1e7718aa8 _UIGestureEnvironmentSortAndSendDelayedTouches
24 UIKitCore                      0x1e77137a4 _UIGestureEnvironmentUpdate
25 UIKitCore                      0x1e7713284 -[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:]
26 UIKitCore                      0x1e7713054 -[UIGestureEnvironment _updateForEvent:window:]
27 UIKitCore                      0x1e7b3edf4 -[UIWindow sendEvent:]
28 UIKitCore                      0x1e7b1e10c -[UIApplication sendEvent:]
29 UIKitCore                      0x1e7becf68 __dispatchPreprocessedEventFromEventQueue
30 UIKitCore                      0x1e7bef960 __handleEventQueueInternal
31 UIKitCore                      0x1e7be8450 __handleHIDEventFetcherDrain
32 CoreFoundation                 0x1ba7b11f0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
33 CoreFoundation                 0x1ba7b1170 __CFRunLoopDoSource0
34 CoreFoundation                 0x1ba7b0a54 __CFRunLoopDoSources0
35 CoreFoundation                 0x1ba7ab920 __CFRunLoopRun
36 CoreFoundation                 0x1ba7ab1f0 CFRunLoopRunSpecific
37 GraphicsServices               0x1bca24584 GSEventRunModal
38 UIKitCore                      0x1e7b02d40 UIApplicationMain
39 WordPress                      0x104b1ba80 main (main.m:11)
40 libdyld.dylib                  0x1ba26abb4 start

First Seen In: 8.9.0.1
Users Affected: 528 in the last 90 days
Source: 5b8616836007d59fcd1a84aa-fabric
Notes:

This appears to be a bug in Zendesk's SDK. I've filed an issue over at https://github.com/zendesk/zendesk_sdk_ios/issues/498.

Support Zendesk [Type] Crash

Most helpful comment

Hey @designsimply . I don't suppose there have been any user reports of this? I'm unable to reproduce it, and I was hoping maybe someone contacted support about it somehow. Yes, I realize it's crashing on Zendesk. The irony of my question is not lost on me. 😄

All 17 comments

~7 crashes per day for the last 90 days.
(5b8616836007d59fcd1a84aa-fabric-ios)

Moving to the Prioritized iOS list since it is high priority because it's likely to be extra frustrating to have the app crash when trying to contact support when you already have a problem to work through.

Hey @designsimply . I don't suppose there have been any user reports of this? I'm unable to reproduce it, and I was hoping maybe someone contacted support about it somehow. Yes, I realize it's crashing on Zendesk. The irony of my question is not lost on me. 😄

For reference, found one user who reported it: 1984854-zen.

For the customer who submitted 1984854-zen (and the related crash), the problem originated with 1982471-zen, when the user sent some odd text, and a lot of it. I did the same, but I'm still unable to reproduce the crash. When I used the same text, Zendesk wouldn't even send the message; it just failed. When I viewed the failed message, it did not crash.

I did look at the issue @jkmassel files with ZD (as noted in the description).

Sounds like you're embedding a navigationController with no rootViewController inside a navigationController.

Nope. Not it. Verified nav controllers have roots.

Do you have permissions set up for camera and photo library access? We allow end-users to send attachments in the ticket screen, if you don't have permissions set up, this may cause the app to crash.

Nope. Not it either. I tested with various permission settings and had no problems.

For reference, here is a sample of the user's text. The full text can be found in the ZD ticket (it's huge, so I won't put it here).

` 2019-04-24 16:02:49:679 'Block validation: Expected token of type `%s` (%o), instead saw `%s` (%o).', 'StartTag', { type: 'StartTag', tagName: 'p', attributes: [], selfClosing: false }, 'Chars', { type: 'Chars', chars: '\\n' } 2019-04-24 16:02:49:781 'Block validation: Block validation failed for `%s` (%o).\n\nContent generated by `save` function:\n\n%s\n\nContent retrieved from post body:\n\n%s', 'core/paragraph', { name: 'core/paragraph', title: 'Paragraph', description: 'Start with the building block of all narrative.', icon: { src: { '$$typeof': {},

I was curious about this one so I took a peek at Fabric.

Is it just me, or is Fabric grouping a bunch of different feature crashes together just because they all have [NSCache init] as the last command executed before going 💥?

Just paging through the list I've seen:
Fatal Exception: NSInvalidArgumentException attempt to scroll to invalid index path: <NSIndexPath: 0xd9c9706c693a209b> {length = 2, path = 0 - 0}

Fatal Exception: NSInvalidArgumentException The index 9223372036854775807 is invalid

Fatal Exception: NSRangeException -[UIInputSwitcherTableView _contentOffsetForScrollingToRowAtIndexPath:atScrollPosition:usingPresentationValues:]: row (3) beyond bounds (3) for section (0).

Fatal Exception: NSRangeException *** -[NSBigMutableString substringWithRange:]: Range {0, 7792} out of bounds; string length 0

Fatal Exception: UIViewControllerHierarchyInconsistency child view controller:<WordPress.OptionsTableViewController: 0x102c3a3c0> should have parent view controller:<UICompatibilityInputViewController: 0x102a5bb20> but requested parent is:<UICompatibilityInputViewController: 0x10868c860>

Fatal Exception: UIViewControllerHierarchyInconsistencychild view controller:<WPInputMediaPickerViewController: 0x129be3400> should have parent view controller:<UICompatibilityInputViewController: 0x129d07cb0> but requested parent is:<UICompatibilityInputViewController: 0x127e75b00>

I can't see how that last one would be related to Zendesk at all 🤷‍♂️.

Also, on many of these reports there is very little free ram. Its not true for all of them, some have had over 30% free, but the majority seem to be less than 10% and some as little as 1%. I'm not too familiar with how NSCache does its thing but its in-memory storage, yeah? Seems like it would lead to OOMs if there was a lot of memory pressure.

Questions: For Zendesk, could the issue with the missing root navigation controller be because is its ejected due to memory pressure?
If the cause is indeed due to an OOM error could what we see in the stack trace be polluted or otherwise inaccurate?
If its an OOM, how to account for cases where ram appears plentiful? Misreported? Crazy big images in the image gallery? Hardware issue? Seems... sketchy.

Hey @designsimply . I don't suppose there have been any user reports of this?

I dug through the logs of several of the crash reports that were sent in to us (you probably did the same!) and didn't come up with anything past what you already found in 1984854-zen. (also p7cLQ7-Bw-p2)

fwiw, I noticed that _many_ of the crash report logs seemed to be for iPad and many were for Japanese sites (but I am not sure whether those thing are relevant here or not). @aerych's note about very little free ram is probably way more relevant.

@ScoutHarris would you also sync up with https://github.com/zendesk/zendesk_sdk_ios/issues/498 to note your findings there as well? Is there anything else we can ask on that issue that might help us move this forward or give us some more ideas for testing?

Is it just me, or is Fabric grouping a bunch of different feature crashes together

Thanks @aerych , I completely forgot to mention that. I found the same, and as a result we may be ranking the priority higher than is warranted. I had to scroll through several unrelated crashes to find one actually related to ZD.

@designsimply -

would you also sync up with zendesk/zendesk_sdk_ios#498 to note your findings there as well?

Sure. Since I didn't actually discover any leads, I can at least comment that their suggestions didn't pan out.

Is there anything else we can ask on that issue that might help us move this forward or give us some more ideas for testing?

I’m honestly at a loss on this one. There were so few crashes (I only found 3 recent) that there wasn’t a theme. I don’t even know where the issue could _possibly_ be. I tried everything I could think of.

Lowering in priority and noting we can circle back to this one for one more check before closing and will be looking for additional user reports of the problem in the mean time (internal reference: p7cLQ7-Bw-p2). Thank you so much @ScoutHarris and @aerych for looking into this one!

Found a case of a user not being able to contact us via the iOS app (they are either using 12.7.? or 12.8.?) at 2185450-zen and here are the descriptions of the problem that the user sent:

As I have mentioned several times I was unable to reach out to you via the app. Every time I tried the app locked up and quit on me.

Have you looked into why the app locks up and quits when I try to contact WP with it?

Spotted a Tweet where someone mentioned they were unable to send us a message using the Contact Us form in the iOS app:

Your Contact us function refuses to send and just keeps saying “retry.”

Source: https://twitter.com/thebiologyguy/status/1154861095653392389

(internal reference: p1564176579033300-slack-cellular-happiness)

[UPDATE: noting that we founds some steps to reproduce a crash but since the description from the Tweet noted here mentions a different behavior it may be a separate bug and we should keep an eye out for more reports of that and file a new issue if we see any.]

Noting some feedback from @frosty who helped me with some testing (thank you! ❤️).

It seems to be when I attempt access the phone’s photo library or camera to attach something to a new ticket. Otherwise, I can submit a new ticket just fine.

And I can also select a recent photo from the selection it gives you okay.

Tested and confirmed using the following steps to reproduce:

  1. Go to Profile > Help & Support > Contact Email and make sure an email is set.
  2. Go to Contact Us.
  3. Tap the paperclip to attach a file.
  4. Tap the more icon at bottom right.
  5. Swipe right to reveal the Camera and Library options at bottom left.
  6. Tap Camera.
  7. Repeat steps 1-5 and tap Library.

Result: the app crashes as soon as Library or Camera is tapped on the Profile > Help & Support > Contact Us screen. (33s)

Tested with WPiOS 12.8.2 (app store version) on iPhone 6S iOS 12.3.1.

Found another report of someone unable to use the Contact Us screen saying:

I am trying to send the logs but it keeps telling me "message failed to send tap to retry"

Source: https://ios.forums.wordpress.org/topic/strange-behavior-with-uploading-pics?replies=7#post-15440

It doesn't match exactly with the testing steps in my last comment though, so I'm making a note here with the understanding we may need to create a new issue for that case later once we have more information.

I spotted the error "Message failed to send. Tap to retry" when trying to send app logs saved as a .txt file then attached via the Contact Us screen:

IMG_2924
Tested with WPiOS 12.8.2 (app store version) on iPhone 6S iOS 12.3.1.

I noticed a mention of support_new_request_failed in the app logs from the interaction:

2019-07-30 14:14:26:407 🔵 Tracked: me_tab_accessed
2019-07-30 14:14:27:725 🔵 Tracked: support_opened
2019-07-30 14:14:27:740 Zendesk - read profile from User Defaults: ["name": design52797584, "email": **REDACTED**]
2019-07-30 14:14:27:741 Zendesk - read profile from User Defaults: ["email": **REDACTED**, "name": design52797584]
2019-07-30 14:14:27:749 Zendesk - read profile from User Defaults: ["email": **REDACTED**, "name": design52797584]
2019-07-30 14:14:30:216 Using existing Zendesk identity: **REDACTED**, design52797584
2019-07-30 14:14:30:216 🔵 Tracked: support_new_request_viewed
2019-07-30 14:14:37:290 TracksService sendQueuedEvents completed. Sent 7 events.
2019-07-30 14:15:03:454 🔵 Tracked: support_new_request_file_attached
2019-07-30 14:15:04:209 🔵 Tracked: support_new_request_failed
2019-07-30 14:15:07:408 TracksService sendQueuedEvents completed. Sent 2 events.
2019-07-30 14:20:02:671 <WordPress.WordPressAppDelegate: 0x282d1d180> applicationWillResignActive(_:)
2019-07-30 14:20:03:179 <WordPress.WordPressAppDelegate: 0x282d1d180> applicationDidEnterBackground(_:)
2019-07-30 14:20:03:192 🔵 Tracked: application_closed <last_visible_screen: Me, time_in_app: 341>

@frosty @jkmassel should I create a new issue for the "message failed to send" case or do you think that's related to this crash somehow?

I think the unable to send is an unrelated issue. Regarding the crash, I think I've tracked down the cause and should be able to share a fix soon.

Noting another report:

When sending via the app. The app crashes and closes.

The crashing situation. It just has the progress bar across the top then as it gets closer to the end. The app just crashes. The last time however it stayed open and instead I just got the “ message failed, please retry”

(internal reference: 2213448-zen)

FWIW I agree – there should be tickets for both items.

Aha! 😍😍😍 at the fix for the crashing part! As for the cases where users reported seeing "Message failed to send. Tap to retry" when attempting to contact support via the app, I've created a new issue for that at https://github.com/wordpress-mobile/WordPress-iOS/issues/12297.

Was this page helpful?
0 / 5 - 0 ratings