chrome showing "Uncaught SyntaxError: Invalid shorthand property initializer" on all sites
Any site I visit in Chrome today, including Google.com, shows the following error in the console.log:
Uncaught SyntaxError: Invalid shorthand property initializer
The source shows as (unknown). I wonder if I have a bad extension or something. I'd rather not reset Chrome. Are there any other troubleshooting tips?
Solution 1:
It is reported that disabling the Better History extension fixed it and re-enabling does not relapse. https://bugs.chromium.org/p/chromium/issues/detail?id=754583#c6
Solution 2:
This is caused by a recent chrome update. Somewhere in the chrome JSVM code they use a "=" where a ":" should be used to assign a value to an object's property:
I think we have to wait for a patch or downgrade chrome.
EDIT: It seems to be something caused by the chrome developer tools: https://stackoverflow.com/questions/17367560/chrome-development-tool-vm-file-from-javascript
Altough searching the dev tools code does not give any match either.
EDIT2: The answer of user gotoken seems to resolve the issue.
EDIT3: Seems that the solution of user gotoken is not a permanent one. Error reappears after some time. BetterHistory Extension needs to be patched.
Solution 3:
The answers are correct. However, I thought maybe a simple process answer would be helpful:
- In the address bar enter: chrome://extensions (Press enter to display your extensions.)
- The tab label should be "Extensions" and a list of your installed extensions should be on that page.
- Look for Better History. Should be near the top if your extensions are ordered by name.
- Click on the Enabled checkbox (the check mark should clear).
- Click on the Enabled checkbox again and the check mark should reappear.
That's it. You will probably have to refresh the tab where you're getting the error.
If this was too simple then please let me know.
Further. I found that this didn't solve the problem once and for all. I'm using Vue and Webpack and found that the error eventually (generally after a few restarts) returns. Reset the enabled checkbox again and it goes away again. I guess we're just going to have to live with it until the bug is fixed!