23

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?

39

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

| improve this answer | |
  • 1
    Good one, disabling and re-enabling Better History worked for me – joshschreuder Aug 15 '17 at 3:11
  • indeed, this solved the problem for me too – Lucian Depold Aug 15 '17 at 12:28
  • 2
    I included sbmarwbth (which was part of the stack trace, as we see in the answer by Lucian Depold) in my google search and got this superuser page. I've been using Better History, and this disable/re-enable fix worked for me as well. – Purplejacket Aug 16 '17 at 2:08
  • Error reappears with this solution for me after some time (1-2 hours of work / web development) – Lucian Depold Aug 16 '17 at 8:08
  • @Purplejacket thanks for including sbmarwbth in your comment, that was also how I found this answer! – ndbroadbent Aug 25 '17 at 21:39
7

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:

enter image description here

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.

enter image description here

EDIT3: Seems that the solution of user gotoken is not a permanent one. Error reappears after some time. BetterHistory Extension needs to be patched.

| improve this answer | |
  • There's no such code in chromium/chrome: cs.chromium.org/search/… – wOxxOm Aug 12 '17 at 7:20
  • Same thing is happening here – wackychocolate Aug 14 '17 at 0:01
  • Could not repeat for me after 24+h use of dev tool. By the way, my apologies for possibly off topic, how can I write code which reports same error message on dev tool console and which gives link to a VM JS page same to the screenshot i.stack.imgur.com/y3bVm.png ? I could not find "ahref" or coincident of "document.body.addEventListener" and "auxclick" under my chrome profile folder. I wonder where the code come from. thanks. – gotoken Aug 17 '17 at 4:12
1

The answers are correct. However, I thought maybe a simple process answer would be helpful:

  1. In the address bar enter: chrome://extensions (Press enter to display your extensions.)
  2. The tab label should be "Extensions" and a list of your installed extensions should be on that page.
  3. Look for Better History. Should be near the top if your extensions are ordered by name.
  4. Click on the Enabled checkbox (the check mark should clear).
  5. 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!

| improve this answer | |
  • 1
    My experience is that disabling/enabling is only a temporary fix. I keep it disabled until I need to use it. – Shawn Aug 23 '17 at 16:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.