Google Chrome Extension Javascript Unexpected Token Illegal?

I often get this error when I've included a file that does not exist. Have you checked that jquery. Js and background.

Js are indeed present?

Yes, they are very present. – CMC Oct 15 '10 at 14:37.

I figured out what it was: I was using the localStorage functionality, and had originally used my update function to initialize it, though once the update function required it to be previously defined, this error occurred...in the end, it seems I was passing null to JSON. Parse, which somehow fails.

I know this is months old, but I just had the exact same issue with an extension, and it was killing me as I struggled to fix it as quickly as possible. I tried messing with the encoding, replacing all the linebreaks, etc. Until just running window.location.reload() in the Chrome console. This time, instead of returning a reference to the beginning of the HTML file, the debugger pointed to a line in an external JavaScript file.

Weird! The bottom line was that in an old version of the extension, I had a text value stored without using JSON.stringify.So when attempting to JSON. Parse that value, everything failed.

Here's what it looks like in the console: > localStorage. Good = JSON. Stringify("good"); localStorage.

Bad = "bad"; console. Log(JSON. Parse(localStorage.

Good)); console. Log(JSON. Parse(localStorage.

Bad)); > good > SyntaxError: Unexpected token ILLEGAL If that occurs while a page is loading, the page won't appear to render past the declaration.In reality, it does, but it gets hung up. Eeevil.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions