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

Unexpected token } in JSON at position #5454

Closed
JarnDev opened this issue Apr 24, 2019 · 1 comment
Closed

Unexpected token } in JSON at position #5454

JarnDev opened this issue Apr 24, 2019 · 1 comment

Comments

@JarnDev
Copy link

JarnDev commented Apr 24, 2019

Environment data

  • VS Code version: 1.33.1
  • Extension version (available under the Extensions sidebar): 2019.4.11881
  • OS and version: Win 10
  • Python version : 3.6.6
  • Type of virtual environment used: virtualenv
  • Relevant/affected Python packages and their versions: pylint

Expected behaviour

Extension Activates, and work normally with codes and pylint
python: select Interpreter works

Actual behaviour

Activation of extension Fail, and nothing related with python works.
python: select Interpreter pops an error "command 'python.setInterpreter' not found"

Steps to reproduce:

I was working normally, then the lint stopped. When I tried to fix the problem I realized that the python extension was broken.
Probably the last commit, because the problem seems to be inside the extension's JSON as shown on console error.

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)


Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)

[Extension Host] debugger listening on port 20353
extensionService.ts:800 Activating extension 'ms-python.python' failed: Unexpected token } in JSON at position 2410.
_logMessageInConsole @ extensionService.ts:800
_logOrShowMessage @ extensionService.ts:814
(anonymous) @ mainThreadExtensionService.ts:65
(anonymous) @ errors.ts:184
n @ errors.ts:184
$onExtensionActivationError @ mainThreadExtensionService.ts:63
_doInvokeHandler @ rpcProtocol.ts:399
_invokeHandler @ rpcProtocol.ts:384
_receiveRequest @ rpcProtocol.ts:304
_receiveOneMessage @ rpcProtocol.ts:226
_protocol.onMessage.e @ rpcProtocol.ts:101
fire @ event.ts:584
a @ ipc.net.ts:392
e @ ipc.net.ts:399
fire @ event.ts:584
_receiveMessage @ ipc.net.ts:678
_socketDisposables.push._socketReader.onMessage.e @ ipc.net.ts:549
fire @ event.ts:584
acceptChunk @ ipc.net.ts:212
_register._socket.onData.e @ ipc.net.ts:173
t @ ipc.net.ts:24
emit @ events.js:182
addChunk @ _stream_readable.js:279
readableAddChunk @ _stream_readable.js:264
Readable.push @ _stream_readable.js:219
onread @ net.js:636

console.ts:134 [Extension Host] Activating extension `ms-python.python` failed:  Unexpected token } in JSON at position 2410
t.log @ console.ts:134
$logExtensionHostMessage @ mainThreadConsole.ts:39
_doInvokeHandler @ rpcProtocol.ts:399
_invokeHandler @ rpcProtocol.ts:384
_receiveRequest @ rpcProtocol.ts:304
_receiveOneMessage @ rpcProtocol.ts:226
_protocol.onMessage.e @ rpcProtocol.ts:101
fire @ event.ts:584
a @ ipc.net.ts:392
e @ ipc.net.ts:399
fire @ event.ts:584
_receiveMessage @ ipc.net.ts:678
_socketDisposables.push._socketReader.onMessage.e @ ipc.net.ts:549
fire @ event.ts:584
acceptChunk @ ipc.net.ts:212
_register._socket.onData.e @ ipc.net.ts:173
t @ ipc.net.ts:24
emit @ events.js:182
addChunk @ _stream_readable.js:279
readableAddChunk @ _stream_readable.js:264
Readable.push @ _stream_readable.js:219
onread @ net.js:636

console.ts:134 [Extension Host] Here is the error stack:  SyntaxError: Unexpected token } in JSON at position 2410
	at JSON.parse (<anonymous>)
	at d (c:\Users\Alfredo\.vscode\extensions\ms-python.python-2019.4.11881\out\client\extension.js:1:39446)
	at Object.module.exports.Object.defineProperty.value (c:\Users\Alfredo\.vscode\extensions\ms-python.python-2019.4.11881\out\client\extension.js:1:39801)
	at n (c:\Users\Alfredo\.vscode\extensions\ms-python.python-2019.4.11881\out\client\extension.js:1:279)
	at Object.module.exports.r.__decorate.o (c:\Users\Alfredo\.vscode\extensions\ms-python.python-2019.4.11881\out\client\extension.js:24:39416)
	at n (c:\Users\Alfredo\.vscode\extensions\ms-python.python-2019.4.11881\out\client\extension.js:1:279)
	at Object.module.exports.r.__decorate.o (c:\Users\Alfredo\.vscode\extensions\ms-python.python-2019.4.11881\out\client\extension.js:24:36365)
	at n (c:\Users\Alfredo\.vscode\extensions\ms-python.python-2019.4.11881\out\client\extension.js:1:279)
	at Object.<anonymous> (c:\Users\Alfredo\.vscode\extensions\ms-python.python-2019.4.11881\out\client\extension.js:9:89881)
	at n (c:\Users\Alfredo\.vscode\extensions\ms-python.python-2019.4.11881\out\client\extension.js:1:279)
	at module.exports.Object.defineProperty.value (c:\Users\Alfredo\.vscode\extensions\ms-python.python-2019.4.11881\out\client\extension.js:1:1078)
	at Object.<anonymous> (c:\Users\Alfredo\.vscode\extensions\ms-python.python-2019.4.11881\out\client\extension.js:1:1089)
	at Object.<anonymous> (c:\Users\Alfredo\.vscode\extensions\ms-python.python-2019.4.11881\out\client\extension.js:85:3)
	at Module.t._initNodeRequire.r._compile (c:\Users\Alfredo\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\loader.js:16:90)
	at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10)
	at Module.load (internal/modules/cjs/loader.js:620:32)
	at tryModuleLoad (internal/modules/cjs/loader.js:559:12)
	at Function.Module._load (internal/modules/cjs/loader.js:551:3)
	at Function.t._load (c:\Users\Alfredo\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:729:537)
	at Function.t.getExtensionPathIndex.then.a._load (c:\Users\Alfredo\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:691:639)
	at Function.t.getExtensionPathIndex.then.r._load (c:\Users\Alfredo\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:655:197)
	at Module.require (internal/modules/cjs/loader.js:658:17)
	at require (internal/modules/cjs/helpers.js:20:18)
	at Function.i [as __$__nodeRequire] (c:\Users\Alfredo\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\loader.js:31:542)
	at c:\Users\Alfredo\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:717:918
	at E._doActivateExtension (c:\Users\Alfredo\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:718:2)
	at E._activateExtension (c:\Users\Alfredo\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:716:772)
	at E.<anonymous> (c:\Users\Alfredo\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:714:224)
	at Generator.next (<anonymous>)
	at n (c:\Users\Alfredo\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:11:176)
	at new Promise (<anonymous>)
	at n (c:\Users\Alfredo\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:10:975)
	at Object.actualActivateExtension (c:\Users\Alfredo\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:713:946)
	at p._activateExtension (c:\Users\Alfredo\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:457:765)
	at define._activateExtensions.i.length.Promise.all.o.map.e (c:\Users\Alfredo\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:457:449)
	at Array.map (<anonymous>)
	at p._activateExtensions (c:\Users\Alfredo\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:457:437)
	at p.activateById (c:\Users\Alfredo\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:455:604)
	at E._activateById (c:\Users\Alfredo\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:715:497)
	at E.<anonymous> (c:\Users\Alfredo\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:723:542)
	at Generator.next (<anonymous>)
	at s (c:\Users\Alfredo\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:11:9)
webviewElement.ts:392 [Embedded Page] Uncaught TypeError: Cannot read property 'body' of null
@ghost ghost added the triage-needed Needs assignment to the proper sub-team label Apr 24, 2019
@DonJayamanne
Copy link

This has been resolved in the latest update, please update your extension.
Duplicate of #5437

@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Apr 24, 2019
@lock lock bot locked as resolved and limited conversation to collaborators May 22, 2019
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

2 participants