WordPress-Android icon indicating copy to clipboard operation
WordPress-Android copied to clipboard

NumberFormatException: s == null

Open AliSoftware opened this issue 3 years ago • 3 comments

Sentry Url: https://sentry.io/share/issue/8d8f044f0819433bab99b2d313e22937/ User Count: 54 Count: 2134 First Release: [email protected]+885 First Seen: 2020-07-10T14:51:41.331000Z Last Seen: 2022-08-09T10:11:54Z 24 Hours: 4 30 Days: 261

NumberFormatException: s == null
     at org.wordpress.android.ui.posts.mediauploadcompletionprocessors.ImageBlockProcessor.processBlockJsonAttributes(ImageBlockProcessor.java:37)
     at org.wordpress.android.ui.posts.mediauploadcompletionprocessors.BlockProcessor.processBlock(BlockProcessor.java:91)
     at org.wordpress.android.ui.posts.mediauploadcompletionprocessors.MediaUploadCompletionProcessor.processBlock(MediaUploadCompletionProcessor.java:78)
     at org.wordpress.android.ui.posts.mediauploadcompletionprocessors.MediaUploadCompletionProcessor.processContent(MediaUploadCompletionProcessor.java:59)
     at org.wordpress.android.ui.posts.mediauploadcompletionprocessors.MediaUploadCompletionProcessor.processContent(MediaUploadCompletionProcessor.java:60)
     at org.wordpress.android.ui.posts.mediauploadcompletionprocessors.MediaUploadCompletionProcessor.processContent(MediaUploadCompletionProcessor.java:60)
     at org.wordpress.android.ui.posts.mediauploadcompletionprocessors.MediaUploadCompletionProcessor.processContent(MediaUploadCompletionProcessor.java:60)
     at org.wordpress.android.ui.posts.mediauploadcompletionprocessors.MediaUploadCompletionProcessor.processContent(MediaUploadCompletionProcessor.java:60)
     at org.wordpress.android.ui.posts.mediauploadcompletionprocessors.MediaUploadCompletionProcessor.processContent(MediaUploadCompletionProcessor.java:60)
     at org.wordpress.android.ui.posts.mediauploadcompletionprocessors.MediaUploadCompletionProcessor.processContent(MediaUploadCompletionProcessor.java:60)
...
(54 additional frame(s) were not displayed)

Not new (first seen 2y ago) but seing what looks like a peak recently (261 in last 30 days), so might be worth investigating further: image

AliSoftware avatar Aug 09 '22 12:08 AliSoftware

Since it's a crash on the editing screen with a low impact, the priority is medium.

irfano avatar Aug 23 '22 14:08 irfano

  • The crash is probably caused by the null remote media id.
  • It's worth to see @mkevins's comment in a possible dupe issue.
  • A common error log on issues i/WordPress-STATS: 🔵 Tracked: notification_shown, Properties: {"notification_type":"post_upload_error","default_tab_experiment":"dashboard"} shows the crash may occur after the post upload error.
  • This PR handles possible remote mediaId case. If solving the root problem is challenging, handling the crash in a similar way could be considered.

irfano avatar Aug 23 '22 14:08 irfano

I have not been able to reproduce this, but I think this:

A common error log on issues i/WordPress-STATS: 🔵 Tracked: notification_shown, Properties: {"notification_type":"post_upload_error","default_tab_experiment":"dashboard"} shows the crash may occur after the post upload error.

is a good hint. Also, I have flipped through a few of the events (but not an exhaustive search), and out of the the ones I observed, the crash occurs with Image blocks. That could simply be because those are most often used (gallery also using Image blocks internally), or possibly the steps to reproduce may require the use of one or more image blocks. If there are cases where this crash occurs with other media containing blocks, it might point to something more general.

I have drafted a PR here: https://github.com/wordpress-mobile/WordPress-Android/pull/17089 which follows the same approach in this PR: https://github.com/wordpress-mobile/WordPress-Android/pull/13661.

mkevins avatar Aug 24 '22 21:08 mkevins

Sentry issue: WORDPRESS-ANDROID-D0N

sentry-io[bot] avatar May 23 '23 14:05 sentry-io[bot]

Sentry issue: WORDPRESS-ANDROID-21NC

The crash is happening in the Upload service but the stack trace blames the same function: ImageBlockProcessor.processBlockJsonAttributes.

sentry-io[bot] avatar Sep 08 '23 11:09 sentry-io[bot]

Sentry issue: JETPACK-ANDROID-8AX

sentry-io[bot] avatar Oct 27 '23 06:10 sentry-io[bot]