New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 820275 link

Starred by 3 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: 2018-03-24
OS: Mac
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Updated to Chrome v65 and started getting this error: Expected onClick listener to be a function, instead got type string

Reported by bruce.w...@l2inc.com, Mar 8 2018

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.146 Safari/537.36

Steps to reproduce the problem:
1. Open a React app with minified code (version >= 15.0.0)
2. onClick listener errors out and all onClick events on the page do nothing)

What is the expected behavior?
There should be no strings being passed into onClick event listener callbacks but instead functions, thereby not giving an error.

What went wrong?
minified React code claims there is a string being passed into an onClick listener but our code contains none of that behavior. The error prevents any button/dropdown from working properly/

Did this work before? Yes Chrome 64

Chrome version: 65.0.3325.146  Channel: stable
OS Version: OS X 10.13.3
Flash Version:
 
Screen Shot 2018-03-08 at 4.35.24 PM.png
220 KB View Download
Labels: Needs-Triage-M65
 bruce.wang@ if possible can you please provide a testpage for further triage of the bug.


Labels: Needs-Feedback
Hi! Unfortunately we can't send a testpage because the software is proprietary, however this error is the full extend of our knowledge of the bug. The webpage that this bug occurs on has simple bootstrap buttons, clickable <div>'s, and react-router-bootstrap links.

We tried removing every onClick listener and button from our page but the error still says a string is being passed into an onClick listener.

We think there is a bug with Chrome v65's Javascript minification changes because our codebase works on localhost but this bug appears after the code is compiled and minified.
Project Member

Comment 4 by sheriffbot@chromium.org, Mar 9 2018

Cc: pbomm...@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 5 by kochi@chromium.org, Mar 10 2018

Labels: Needs-Feedback
NextAction: 2018-03-24
If this is a React-specific issue, please contact React team first, unless
you can create a minimal reproduction case which is not proprietary.
Bruce did you get this figured out? It most certainly isn't an issue in Chrome. Does it reproduce in Firefox as well?
Hi! Yes I figured out the bug was a minification error however I think the fault laid with the react-bootstrap library we used. We removed their React components for rendering tooltips and routing buttons and the bug went away. I posted a thread on Stackoverflow and other people seems to get this error and the common denominator is incompatibility between certain React builds and Chrome v65 minification.

https://stackoverflow.com/questions/49182801/updated-to-chrome-v65-and-started-getting-this-error-expected-onclick-listener/49200665#49200665
Project Member

Comment 8 by sheriffbot@chromium.org, Mar 20 2018

Cc: kochi@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: susan.boorgula@chromium.org
Labels: Needs-Feedback Triaged-ET
bruce.wang@ Thanks for the issue.

As per comment #7, can you please confirm if this issue can be closed ?

Thanks..
Yes, it can be closed.
Status: WontFix (was: Unconfirmed)
Closing as per 10.
The NextAction date has arrived: 2018-03-24

Sign in to add a comment