Undefined crash in web view triggered by emoji keyboard (React error #130) #14523
Description
I did a weird clicky thing on the emoji keyboard button by mistake, and it crashed the entire Mastodon web view.
Expected behaviour
It either opened the emoji keyboard or didn't open it.
Actual behaviour
The entire web UI was replaced by an error message.
Steps to reproduce the problem
I can't reproduce it. ☹ But somebody else might have the problem in future, and then my stack traces might help.
I've got a touchpad with left, middle and right clicks, and I think I dragged diagonally from top left to bottom right, in a way that either clicked the middle or right mouse button (but perhaps the left), such that I released the mouse with the emoji smiley face lit up. (I'm not certain what happened, because it was accidental.)
I suspect it might've ended up dragging the emoji smiley face onto the emoji picker before the emoji picker had initialised (I hadn't used the emoji picker since refreshing), in which case this is probably a React problem more than a Mastodon web view one.
Specifications
Mastodon v3.2.0
Firefox 68.11.0esr (64-bit) Debian build
Stack trace
Error: Minified React error #130; visit https://reactjs.org/docs/error-decoder.html?invariant=130&args[]=undefined&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
xu@https://fosstodon.org/packs/js/common-39e9643818a17b71163e.js:2:1043686
d@https://fosstodon.org/packs/js/common-39e9643818a17b71163e.js:2:986819
m@https://fosstodon.org/packs/js/common-39e9643818a17b71163e.js:2:988099
ko/<@https://fosstodon.org/packs/js/common-39e9643818a17b71163e.js:2:990182
Ni@https://fosstodon.org/packs/js/common-39e9643818a17b71163e.js:2:999668
gs@https://fosstodon.org/packs/js/common-39e9643818a17b71163e.js:2:1040039
cu@https://fosstodon.org/packs/js/common-39e9643818a17b71163e.js:2:1030580
su@https://fosstodon.org/packs/js/common-39e9643818a17b71163e.js:2:1030505
Zs@https://fosstodon.org/packs/js/common-39e9643818a17b71163e.js:2:1027535
Va/<@https://fosstodon.org/packs/js/common-39e9643818a17b71163e.js:2:979177
t.unstable_runWithPriority@https://fosstodon.org/packs/js/common-39e9643818a17b71163e.js:2:1054420
Ha@https://fosstodon.org/packs/js/common-39e9643818a17b71163e.js:2:978886
Va@https://fosstodon.org/packs/js/common-39e9643818a17b71163e.js:2:979122
Ka@https://fosstodon.org/packs/js/common-39e9643818a17b71163e.js:2:979057
Gs@https://fosstodon.org/packs/js/common-39e9643818a17b71163e.js:2:1024320
enqueueSetState@https://fosstodon.org/packs/js/common-39e9643818a17b71163e.js:2:982842
_.prototype.setState@https://fosstodon.org/packs/js/common-39e9643818a17b71163e.js:2:928967
t/</<@https://fosstodon.org/packs/js/common-39e9643818a17b71163e.js:2:920255
Error (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js:6960:12)
Tg (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js:3329:21)
c (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js:3402:12)
ca (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js:3533:22)
R (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js:4247:45)
Yg (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js:6722:305)
Qj (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js:6150:10)
Kj (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js:6139:8)
Ej (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js:5880:8)
cg (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js:2851:16)
unstable_runWithPriority (webpack:///node_modules/scheduler/cjs/scheduler.production.min.js:309:11)
cg (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js:2816:9)
cg (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js:2846:6)
gg (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js:2836:2)
xj (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js:5678:91)
enqueueSetState (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js:3137:4)
setState (webpack:///node_modules/react/cjs/react.production.min.js:55:15)
this.setState (webpack:///app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js:318:13)
Browser console error message:
Error: "Minified React error #130; visit https://reactjs.org/docs/error-decoder.html?invariant=130&args[]=undefined&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings."
React 10
xu
d
m
ko
Ni
gs
cu
su
Zs
Va
unstable_runWithPriority scheduler.production.min.js:309
React 6
Ha
Va
Ka
Gs
enqueueSetState
setState
t emoji_picker_dropdown.js:318
react-dom.production.min.js:5058:12
React 5
es
callback
fo
os
pu
unstable_runWithPriority scheduler.production.min.js:309
React 4
Ha
du
Zs
Va
unstable_runWithPriority scheduler.production.min.js:309
React 6
Ha
Va
Ka
Gs
enqueueSetState
setState
t emoji_picker_dropdown.js:318