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

Unable to show file history #50

Closed
kokostek opened this issue Jul 2, 2018 · 3 comments
Closed

Unable to show file history #50

kokostek opened this issue Jul 2, 2018 · 3 comments
Labels

Comments

@kokostek
Copy link

kokostek commented Jul 2, 2018

  1. Command palette
  2. Hg: Show file history
  3. Select revision
  4. Get the error: Unable to open 'file.name (#574 vs. local)': Unexpected token e in JSON at position 0.

VS Code: 1.24.1
HG extension: 1.2.3
Mercurial: 4.4.2

@mrcrowl mrcrowl added the bug label Apr 26, 2019
@StructByLightning
Copy link

It appears that the JSON string that's being parsed should be something like {path:"somepath",query:"somequery"}. Instead, it's actually 40 alphanumerics, which I think are related to the version you selected to show. The bad JSON string comes from provideTextDocumentContent in contentProvider.js, but it appears that provideTextDocumentContent is getting the data from somewhere else. I wasn't able to track that down.

Here's the error message:

notificationsAlerts.ts:40 Unable to open 'BLL.cs (#106 vs. local)': Unexpected token d in JSON at position 0.
onDidNotificationChange @ notificationsAlerts.ts:40
_register.model.onDidNotificationChange.e @ notificationsAlerts.ts:26
fire @ event.ts:558
addNotification @ notifications.ts:156
notify @ notificationService.ts:55
doHandleOpenEditorError @ editorGroupView.ts:879
(anonymous) @ editorGroupView.ts:854
a @ errors.ts:184
_tickCallback @ internal/process/next_tick.js:68
Promise.then (async)
l @ errors.ts:184
(anonymous) @ errors.ts:184
n @ errors.ts:184
t @ editorGroupView.ts:841
(anonymous) @ editorGroupView.ts:841
(anonymous) @ errors.ts:184
n @ errors.ts:184
doShowEditor @ editorGroupView.ts:836
doOpenEditor @ editorGroupView.ts:833
openEditor @ editorGroupView.ts:792
doOpenEditor @ editorService.ts:247
openEditor @ editorService.ts:240
(anonymous) @ mainThreadEditors.ts:305
invokeFunction @ instantiationService.ts:60
_tryExecuteCommand @ commandService.ts:81
r.then.i @ commandService.ts:70
_tickCallback @ internal/process/next_tick.js:68
Promise.then (async)
executeCommand @ commandService.ts:70
$executeCommand @ mainThreadCommands.ts:78
_doInvokeHandler @ rpcProtocol.ts:394
_invokeHandler @ rpcProtocol.ts:379
_receiveRequest @ rpcProtocol.ts:299
_receiveOneMessage @ rpcProtocol.ts:226
_protocol.onMessage.e @ rpcProtocol.ts:101
fire @ event.ts:558
a @ ipc.net.ts:421
e @ ipc.net.ts:428
fire @ event.ts:558
_receiveMessage @ ipc.net.ts:715
S._socketDisposables.push._socketReader.onMessage.e @ ipc.net.ts:578
fire @ event.ts:558
acceptChunk @ ipc.net.ts:236
_register._socket.onData.e @ ipc.net.ts:197
t @ ipc.net.ts:28
emit @ events.js:182
addChunk @ _stream_readable.js:283
readableAddChunk @ _stream_readable.js:264
Readable.push @ _stream_readable.js:219
onStreamRead @ internal/stream_base_commons.js:94
log.ts:173   ERR Unexpected token d in JSON at position 0: SyntaxError: Unexpected token d in JSON at position 0
    at JSON.parse (<anonymous>:null:null)
    at Object.fromHgUri (C:\Users\zbjrdc\.vscode\extensions\kristjantammekivi.hg-1.3.1\out\src\uri.js:11:29)
    at HgContentProvider.<anonymous> (C:\Users\zbjrdc\.vscode\extensions\kristjantammekivi.hg-1.3.1\out\src\contentProvider.js:90:39)
    at Generator.next (<anonymous>:null:null)
    at __awaiter (C:\Users\zbjrdc\.vscode\extensions\kristjantammekivi.hg-1.3.1\out\src\contentProvider.js:18:71)
    at new Promise (<anonymous>:null:null)
    at __awaiter (C:\Users\zbjrdc\.vscode\extensions\kristjantammekivi.hg-1.3.1\out\src\contentProvider.js:14:12)
    at HgContentProvider.provideTextDocumentContent (C:\Users\zbjrdc\.vscode\extensions\kristjantammekivi.hg-1.3.1\out\src\contentProvider.js:74:16)
    at c.$provideTextDocumentContent (c:\Users\zbjrdc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:529:664)
    at d._doInvokeHandler (c:\Users\zbjrdc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:653:1006)
    at d._invokeHandler (c:\Users\zbjrdc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:653:698)
    at d._receiveRequest (c:\Users\zbjrdc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:652:346)
    at d._receiveOneMessage (c:\Users\zbjrdc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:651:141)
    at define.constructor._protocol.onMessage.e (c:\Users\zbjrdc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:649:400)
    at u.fire (c:\Users\zbjrdc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:48:468)
    at a (c:\Users\zbjrdc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:177:627)
    at e (c:\Users\zbjrdc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:177:673)
    at u.fire (c:\Users\zbjrdc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:48:468)
    at n.constructor.e.onMessage.e (c:\Users\zbjrdc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:758:621)
    at u.fire (c:\Users\zbjrdc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:48:468)
    at a (c:\Users\zbjrdc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:177:627)
    at e (c:\Users\zbjrdc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:177:673)
    at u.fire (c:\Users\zbjrdc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:48:468)
    at y._receiveMessage (c:\Users\zbjrdc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:186:545)
    at define.constructor._socketDisposables.push._socketReader.onMessage.e (c:\Users\zbjrdc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:183:860)
    at u.fire (c:\Users\zbjrdc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:48:468)
    at f.acceptChunk (c:\Users\zbjrdc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:180:393)
    at define.constructor._register._socket.onData.e (c:\Users\zbjrdc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:179:731)
    at Socket.t (c:\Users\zbjrdc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:188:22)
    at Socket.emit (events.js:182:13)
    at addChunk (_stream_readable.js:283:12)
    at readableAddChunk (_stream_readable.js:264:11)
    at Socket.Readable.push (_stream_readable.js:219:10)
    at Pipe.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)

@LeonAlvarez
Copy link

Any info on that?

incidentist added a commit to incidentist/vscode-hg that referenced this issue Jun 1, 2020
mrcrowl added a commit that referenced this issue Jun 3, 2020
@mrcrowl
Copy link
Owner

mrcrowl commented Jun 3, 2020

Released in v1.5.1. Thanks @incidentist!

@mrcrowl mrcrowl closed this as completed Jun 3, 2020
incidentist added a commit to incidentist/vscode-hg that referenced this issue Jun 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants