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

[WORDPRESS-ANDROID-M]: JavascriptException: TypeError: null is not an object (evaluating 'n.name') #10876

Closed
2 of 3 tasks
sentry-io bot opened this issue Nov 29, 2019 · 12 comments
Closed
2 of 3 tasks
Labels
Gutenberg Editing and display of Gutenberg blocks. Posting/Editing [Pri] High [Type] Crash

Comments

@sentry-io
Copy link

sentry-io bot commented Nov 29, 2019

Sentry Issue: [WORDPRESS-ANDROID-M]

Updated by @cameronvoell (2/16/20)

  • TypeError: (0,u.imageFillStyles) is not a function. - Fix Released and Verified
  • TypeError: null is not an object (evaluating 'n.name') - Fix Merged, not yet verified
  • JavascriptException undefined is not an object (evaluating 'n.classList.contains')') - Not Fixed, and No Recreation Steps

Sentry merged several unrelated issues into one. We've fixed one NPE in #9768 but it seems it's still failing on two different exceptions at least.

(https://sentry.io/share/issue/a3007e9a92e6418e95a05f5eff074cc6/)

JavascriptException: TypeError: null is not an object (evaluating 'n.name')

This error is located at:
    in p
    in WithPreferredColorScheme(p)
    in WithInstanceId(WithPreferredColorScheme(p))
    in WithDispatch(WithInstanceId(WithPreferredColorScheme(p)))
    in Unknown
    in WithSelect(WithDispatch(WithInstanceId(WithPreferredColorScheme(p))))
    in c
    in v
    in WithPreferredColorScheme(v)
    in Unknown
    in WithSelect(WithPreferredColorScheme(v))
    in RCTView
    in Unknown
    in WithPreferredColorScheme(Component)
    in p
    in AndroidHorizontalScrollContentView
    in AndroidHorizontalScrollView
    in h
    in RCTView
    in Unknown
    in WithPreferredColorScheme(Component)
    in Unknown
    in WithViewportMatch(WithPreferredColorScheme(Component))
    in WithDispatch(WithViewportMatch(WithPreferredColorScheme(Component)))
    in Unknown
    in WithSelect(WithDispatch(WithViewportMatch(WithPreferredColorScheme(Component))))
   ...
TypeError: (0,u.imageFillStyles) is not a function. (In '(0,u.imageFillStyles)(N,B)', '(0,u.imageFillStyles)' is undefined)

This error is located at:
    in c
    in WithDispatch(c)
    in Unknown
    in WithSelect(WithDispatch(c))
    in p
    in RCTView
    in RCTView
    in c, stack:
default@1585:828

cc @mkevins I'm not sure how much critical it is, could you please check it out. Feel free to keep it for groundskeeping if it's not critical of course.

@malinajirka malinajirka added Gutenberg Editing and display of Gutenberg blocks. gutenberg-mobile Posting/Editing labels Nov 29, 2019
@malinajirka
Copy link
Contributor

malinajirka commented Nov 29, 2019

@designsimply I've added this to the prioritized column as it seems quite common - 7.4k crashes in the last 90 days (~82 per day).

@mkevins
Copy link
Contributor

mkevins commented Dec 2, 2019

cc: @geriux 👋

I suspect this crash is coming from the save.js function, since we don't export imageFillStyles from the native variant of media-container.js. At a first glance, this looks like a pure function: https://github.com/WordPress/gutenberg/blob/master/packages/block-library/src/media-text/media-container.js#L26 so we may be able to re-export this web implementation directly from our native variant as a potential solution.

@geriux

This comment has been minimized.

@geriux
Copy link
Member

geriux commented Dec 4, 2019

I created a separate issue for the imageFillStyles crash wordpress-mobile/gutenberg-mobile#1650 and also created a PR to fix that one.

For the TypeError: null is not an object (evaluating 'n.name') crash, here are the steps to reproduce:

  1. Create a new post
  2. Select the first block “Start writing”
  3. Tap on the undo button in the toolbar
  4. Tap on the + button to add a new block
  5. The app crashes.

@geriux geriux removed their assignment Dec 4, 2019
@designsimply
Copy link
Contributor

Users affected in the last 90 days: 4200
https://sentry.io/share/issue/a3007e9a92e6418e95a05f5eff074cc6/

@designsimply
Copy link
Contributor

Users affected in the last 90 days: 4400
https://sentry.io/share/issue/a3007e9a92e6418e95a05f5eff074cc6/

@designsimply
Copy link
Contributor

Users affected in the last 90 days: 5200
https://sentry.io/share/issue/a3007e9a92e6418e95a05f5eff074cc6/

@cameronvoell
Copy link
Contributor

It looks like this issue could be totally solved already thanks to some nice work from @geriux @mkevins and @lukewalczak .

One instance from this sentry issue [WORDPRESS-ANDROID-M]:TypeError: (0,u.imageFillStyles) is not a function. looks like it was indeed fixed with this change WordPress/gutenberg#18907 which made it into gb-mobile release 1.19 and WPAndroid release 13.9 which landed in the Play Store on December 30th. See graph below of events containing imageFillStyles
image

For the second Error log JavascriptException: TypeError: null is not an object (evaluating 'n.name'), the fix wordpress-mobile/gutenberg-mobile#1701 was merged on December 19th, and will be included in the current WPAndroid 14.0 release that is only out to about 1% of users as of today, January 27th, and will likely get pushed to 10% of users tomorrow. I think if we keep an eye on number of instances of https://sentry.io/organizations/a8c/issues/1007908883/?project=1438088&query=is%3Aunresolved as the current WPAndroid release rolls out, and we see a good dropoff, this issue can likely be closed.

@cameronvoell cameronvoell self-assigned this Jan 30, 2020
@cameronvoell cameronvoell changed the title JavascriptException: TypeError: null is not an object (evaluating 'n.name') Sentry Issue: [WORDPRESS-ANDROID-M] JavascriptException: TypeError: null is not an object (evaluating 'n.name') Feb 17, 2020
@cameronvoell cameronvoell changed the title Sentry Issue: [WORDPRESS-ANDROID-M] JavascriptException: TypeError: null is not an object (evaluating 'n.name') [WORDPRESS-ANDROID-M]: JavascriptException: TypeError: null is not an object (evaluating 'n.name') Feb 17, 2020
@designsimply
Copy link
Contributor

Events in the last 90 days: 26,000
Users affected in the last 90 days: 7,600
https://sentry.io/share/issue/a3007e9a92e6418e95a05f5eff074cc6/

It looks like there was an uptick in the undefined is not an object (evaluating 'n.classList.contains') one starting around Jan 30, which is just a few days after the 14.0 release happened on Jan 28.

Screen Shot 2020-02-18 at Feb 18 11 54 58 AM

@designsimply
Copy link
Contributor

Events in the last 90 days: 35,000
Users affected in the last 90 days: 8,500
https://sentry.io/share/issue/a3007e9a92e6418e95a05f5eff074cc6/

Detected a slowdown in March but incoming crash reports may still be as high or higher than the uptick from the 14.0 release (maybe that's just because of more 14.0 usage compared to before?):

Screen Shot 2020-03-09 at Mar 9 2 47 27 AM

Let's keep an eye on this one because 14.2 was released 14 days ago and I'm not seeing any instances of it while there were 10,000 events captured in 14.0 and 9,700 for 14.2 in the last 90 days.

@malinajirka
Copy link
Contributor

Is this crash related or should we create a new issue? It seems quite common - 22k events and 6.3k users in the last 90 days.

@designsimply
Copy link
Contributor

Regarding the original issue noted, v14.1 is the latest version of the app where Sentry Issue: WORDPRESS-ANDROID-M was recorded in the last 90d, although it's still affecting many users:

Events in the last 90 days: 36,000
Users affected in the last 90 days: 5,500
https://sentry.io/share/issue/a3007e9a92e6418e95a05f5eff074cc6/

In regard to the new issue raised:

Is this crash related or should we create a new issue? It seems quite common - 22k events and 6.3k users in the last 90 days.

There's a new issue at #11803.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Gutenberg Editing and display of Gutenberg blocks. Posting/Editing [Pri] High [Type] Crash
Projects
None yet
5 participants