Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON parsing errors #57045

Closed
qwertymodo opened this issue Aug 22, 2018 · 6 comments
Closed

JSON parsing errors #57045

qwertymodo opened this issue Aug 22, 2018 · 6 comments
Assignees

Comments

@qwertymodo
Copy link

Issue Type: Bug

One of the recent updates has caused several valid JSON files to begin displaying parsing errors. Many of these errors make no sense, sometimes the red syntax error indicator underlines a single character in a string (in that case, I confirmed the offending character to be a standard ASCII 'r', no weird Unicode going on or anything like that, the rest of the string was apparently fine).

Perhaps related, Intellisense doesn't seem to be properly updating, because the syntax highlighter still indicates errors even when the offending lines are removed, even to the point where I removed a line, saved the file, closed VS code, reopened, and the hovertext on the syntax error referenced the text which I had removed from the file (and which no longer existed anywhere else in the file).

First noticed the issue in v1.26.0, still exists in v1.26.1

Here is a short example file:

{
    "$schema": "https://raw.githubusercontent.com/qwertymodo/msupcmplusplus/master/configs/schema#",
    "pack": "Test Pack",
    "tracks": [
        {
            "track_number": 1
        }
    ]
}

And here is what I see in VS Code when I open it:
vscode_error3

Here's the mouseover text I get for the first "error" (the comma at the end of line 2), the others are similar.

Parse error on line 2:
.../configs/schema#",
}
----------------------^
Expecting 'STRING', got '}'
Parse error on line 2:
.../configs/schema#",
}
----------------------^
Expecting 'STRING', got '}'
Parse error on line 2:
...gs/schema#",

}
---------------------^
Expecting 'STRING', got '}'
Parse error on line 2:
...gs/schema#",

}
---------------------^
Expecting 'STRING', got '}'
Parse error on line 2:
...gs/schema#",

}
---------------------^
Expecting 'STRING', got '}'

VS Code version: Code 1.26.1 (493869e, 2018-08-16T18:38:57.434Z)
OS version: Windows_NT x64 10.0.17134

System Info
Item Value
CPUs Intel(R) Core(TM) i5-4670 CPU @ 3.40GHz (4 x 3392)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Memory (System) 31.70GB (15.76GB free)
Process Argv C:\Program Files\Microsoft VS Code\Code.exe
Screen Reader no
VM 0%
Extensions (15)
Extension Author (truncated) Version
vscode-css-formatter aes 1.0.1
pascal ale 6.3.0
vagrant bbe 0.5.0
lex-flex-yacc-bison fau 0.0.3
nsis idl 3.13.2
code-beautifier mic 2.1.0
prettify-json moh 0.0.3
cpptools ms- 0.18.1
csharp ms- 1.15.2
mono-debug ms- 0.15.8
vsliveshare ms- 0.3.577
veriloghdl msh 0.3.3
tmlanguage Tog 0.9.0
jinja who 0.0.8
html-css-class-completion Zig 1.17.1
@aeschli
Copy link
Contributor

aeschli commented Aug 23, 2018

@qwertymodo Can you check if this comes from a different extension?
Expecting 'STRING', got '}' is not an error that the JSON language service emmits.

@aeschli
Copy link
Contributor

aeschli commented Aug 23, 2018

Likely related to #56193

@qwertymodo
Copy link
Author

I didn't change any extensions between when it was working and when it started failing, the only change was a VS Code update. I just tested on my other computer running v1.25.1, and the problem does not occur. I will try updating this computer to v1.26.1 and see if I can reproduce, and if so I'll try with extensions disabled and report back.

@IronGeek
Copy link

IronGeek commented Sep 4, 2018

I'm not sure, but it's probably related to this issue: Togusa09/vscode-tmlanguage#14

@aeschli
Copy link
Contributor

aeschli commented Sep 4, 2018

Marking as duplicate of https://github.com/Togusa09/vscode-tmlanguage

@aeschli aeschli closed this as completed Sep 4, 2018
@qwertymodo
Copy link
Author

Agreed, that looks pretty much identical to what I'm dealing with here.

@vscodebot vscodebot bot locked and limited conversation to collaborators Oct 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants