Closed LeCyberDucky closed 3 years ago
Thanks for the issue and for providing your logs @LeCyberDucky.
The issue template doesn't include a field for additional information, but I thought the following might be interesting:
I'm using evcxr to get Rust running in my notebook. Executing an existing cell works as expected. It's only the creation of new cells that results in the error. An example notebook looks like this:
{
"cells": [
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Olloo!\n"
]
}
],
"source": [
"let big_brain_greeting = \"Olloo!\";\n",
"println!(\"{}\", big_brain_greeting);"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Rust",
"language": "rust",
"name": "rust"
},
"language_info": {
"codemirror_mode": "rust",
"file_extension": ".rs",
"mimetype": "text/rust",
"name": "Rust",
"pygment_lexer": "rust",
"version": ""
}
},
"nbformat": 4,
"nbformat_minor": 2
}
this issue also exist in C# notebook and R notebook C# kernel:
[2020-07-22 02:20:02.177] [exthost] [info] extension host started
[2020-07-22 02:20:02.320] [exthost] [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch {"startup":true,"extensionId":{"value":"vscode.debug-auto-launch","_lower":"vscode.debug-auto-launch"},"activationEvent":"*"}
[2020-07-22 02:20:02.320] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/vwazho/AppData/Local/Programs/Microsoft VS Code/resources/app/extensions/debug-auto-launch/dist/extension
[2020-07-22 02:20:02.348] [exthost] [info] ExtensionService#_doActivateExtension vscode.emmet {"startup":true,"extensionId":{"value":"vscode.emmet","_lower":"vscode.emmet"},"activationEvent":"*"}
[2020-07-22 02:20:02.348] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/vwazho/AppData/Local/Programs/Microsoft VS Code/resources/app/extensions/emmet/dist/extension
[2020-07-22 02:20:02.371] [exthost] [info] ExtensionService#_doActivateExtension vscode.git {"startup":true,"extensionId":{"value":"vscode.github","_lower":"vscode.github"},"activationEvent":"*"}
[2020-07-22 02:20:02.372] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/vwazho/AppData/Local/Programs/Microsoft VS Code/resources/app/extensions/git/dist/main
[2020-07-22 02:20:02.414] [exthost] [info] ExtensionService#_doActivateExtension vscode.github-authentication {"startup":true,"extensionId":{"value":"vscode.github-authentication","_lower":"vscode.github-authentication"},"activationEvent":"*"}
[2020-07-22 02:20:02.414] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/vwazho/AppData/Local/Programs/Microsoft VS Code/resources/app/extensions/github-authentication/dist/extension.js
[2020-07-22 02:20:02.430] [exthost] [info] ExtensionService#_doActivateExtension vscode.merge-conflict {"startup":true,"extensionId":{"value":"vscode.merge-conflict","_lower":"vscode.merge-conflict"},"activationEvent":"*"}
[2020-07-22 02:20:02.430] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/vwazho/AppData/Local/Programs/Microsoft VS Code/resources/app/extensions/merge-conflict/dist/mergeConflictMain
[2020-07-22 02:20:02.437] [exthost] [info] ExtensionService#_doActivateExtension vscode.microsoft-authentication {"startup":true,"extensionId":{"value":"vscode.microsoft-authentication","_lower":"vscode.microsoft-authentication"},"activationEvent":"*"}
[2020-07-22 02:20:02.438] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/vwazho/AppData/Local/Programs/Microsoft VS Code/resources/app/extensions/microsoft-authentication/dist/extension.js
[2020-07-22 02:20:02.451] [exthost] [info] ExtensionService#_doActivateExtension vscode.search-result {"startup":true,"extensionId":{"value":"vscode.search-result","_lower":"vscode.search-result"},"activationEvent":"*"}
[2020-07-22 02:20:02.451] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/vwazho/AppData/Local/Programs/Microsoft VS Code/resources/app/extensions/search-result/dist/extension.js
[2020-07-22 02:20:02.658] [exthost] [info] ExtensionService#_doActivateExtension vscode.github {"startup":true,"extensionId":{"value":"vscode.github","_lower":"vscode.github"},"activationEvent":"*"}
[2020-07-22 02:20:02.658] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/vwazho/AppData/Local/Programs/Microsoft VS Code/resources/app/extensions/github/dist/extension.js
[2020-07-22 02:20:02.886] [exthost] [info] eager extensions activated
[2020-07-22 02:20:35.625] [exthost] [info] ExtensionService#_doActivateExtension ms-python.python {"startup":false,"extensionId":{"value":"ms-python.python","_lower":"ms-python.python"},"activationEvent":"onLanguage:jupyter"}
[2020-07-22 02:20:35.625] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/vwazho/.vscode/extensions/ms-python.python-2020.7.94776/out/client/extension
[2020-07-22 02:40:08.221] [exthost] [info] ExtensionService#_doActivateExtension vscode.configuration-editing {"startup":false,"extensionId":{"value":"vscode.configuration-editing","_lower":"vscode.configuration-editing"},"activationEvent":"onLanguage:json"}
[2020-07-22 02:40:08.222] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/vwazho/AppData/Local/Programs/Microsoft VS Code/resources/app/extensions/configuration-editing/dist/configurationEditingMain
[2020-07-22 02:40:08.235] [exthost] [info] ExtensionService#_doActivateExtension vscode.extension-editing {"startup":false,"extensionId":{"value":"vscode.extension-editing","_lower":"vscode.extension-editing"},"activationEvent":"onLanguage:json"}
[2020-07-22 02:40:08.235] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/vwazho/AppData/Local/Programs/Microsoft VS Code/resources/app/extensions/extension-editing/dist/extension
[2020-07-22 02:40:08.266] [exthost] [info] ExtensionService#_doActivateExtension vscode.json-language-features {"startup":false,"extensionId":{"value":"vscode.json-language-features","_lower":"vscode.json-language-features"},"activationEvent":"onLanguage:json"}
[2020-07-22 02:40:08.266] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/vwazho/AppData/Local/Programs/Microsoft VS Code/resources/app/extensions/json-language-features/client/dist/node/jsonClientMain
[2020-07-22 02:40:08.374] [exthost] [info] ExtensionService#_doActivateExtension ms-vscode.js-debug {"startup":false,"extensionId":{"value":"ms-vscode.js-debug","_lower":"ms-vscode.js-debug"},"activationEvent":"onLanguage:json"}
[2020-07-22 02:40:08.374] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/vwazho/AppData/Local/Programs/Microsoft VS Code/resources/app/extensions/ms-vscode.js-debug/src/extension.js
[2020-07-22 02:40:08.647] [exthost] [info] ExtensionService#_doActivateExtension vscode.npm {"startup":false,"extensionId":{"value":"vscode.npm","_lower":"vscode.npm"},"activationEvent":"onLanguage:json"}
[2020-07-22 02:40:08.647] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/vwazho/AppData/Local/Programs/Microsoft VS Code/resources/app/extensions/npm/dist/npmMain
[Embedded Page] Uncaught Error: Cannot read property 'charAt' of undefined
TypeError: Cannot read property 'charAt' of undefined
at new e (vscode-webview-resource://bdfff789-d19a-48b9-bc2b-7f0a9a4ea11a/file///c%3A/Users/vwazho/.vscode/extensions/ms-python.python-2020.7.94776/out/datascience-ui/notebook/monaco.bundle.js:1:785523)
at new e (vscode-webview-resource://bdfff789-d19a-48b9-bc2b-7f0a9a4ea11a/file///c%3A/Users/vwazho/.vscode/extensions/ms-python.python-2020.7.94776/out/datascience-ui/notebook/monaco.bundle.js:1:788262)
at r (vscode-webview-resource://bdfff789-d19a-48b9-bc2b-7f0a9a4ea11a/file///c%3A/Users/vwazho/.vscode/extensions/ms-python.python-2020.7.94776/out/datascience-ui/notebook/monaco.bundle.js:1:1982236)
at vscode-webview-resource://bdfff789-d19a-48b9-bc2b-7f0a9a4ea11a/file///c%3A/Users/vwazho/.vscode/extensions/ms-python.python-2020.7.94776/out/datascience-ui/notebook/monaco.bundle.js:1:1982603
at e.fire (vscode-webview-resource://bdfff789-d19a-48b9-bc2b-7f0a9a4ea11a/file///c%3A/Users/vwazho/.vscode/extensions/ms-python.python-2020.7.94776/out/datascience-ui/notebook/monaco.bundle.js:1:823295)
at t._recomputeOptions (vscode-webview-resource://bdfff789-d19a-48b9-bc2b-7f0a9a4ea11a/file///c%3A/Users/vwazho/.vscode/extensions/ms-python.python-2020.7.94776/out/datascience-ui/notebook/monaco.bundle.js:1:1583498)
at t._onReferenceDomElementSizeChanged (vscode-webview-resource://bdfff789-d19a-48b9-bc2b-7f0a9a4ea11a/file///c%3A/Users/vwazho/.vscode/extensions/ms-python.python-2020.7.94776/out/datascience-ui/notebook/monaco.bundle.js:1:699802)
at t.changeCallback (vscode-webview-resource://bdfff789-d19a-48b9-bc2b-7f0a9a4ea11a/file///c%3A/Users/vwazho/.vscode/extensions/ms-python.python-2020.7.94776/out/datascience-ui/notebook/monaco.bundle.js:1:698896)
at t.measureReferenceDomElement (vscode-webview-resource://bdfff789-d19a-48b9-bc2b-7f0a9a4ea11a/file///c%3A/Users/vwazho/.vscode/extensions/ms-python.python-2020.7.94776/out/datascience-ui/notebook/monaco.bundle.js:1:694158)
at t.observe (vscode-webview-resource://bdfff789-d19a-48b9-bc2b-7f0a9a4ea11a/file///c%3A/Users/vwazho/.vscode/extensions/ms-python.python-2020.7.94776/out/datascience-ui/notebook/monaco.bundle.js:1:693826)
webviewElement.ts:160 [Embedded Page] TypeError: Cannot read property 'charAt' of undefined
R kernel:
[Extension Host] Starting WebSocket: ws://localhost:8888/api/kernels/868aff48-01d4-4d01-a061-6cefe8005952
console.ts:137 [Extension Host] Kernel: connected (868aff48-01d4-4d01-a061-6cefe8005952)
webviewElement.ts:160 [Embedded Page] Starting WebSocket: BOGUS_PVSC/api/kernels/868aff48-01d4-4d01-a061-6cefe8005952
webviewElement.ts:160 [Embedded Page] Kernel: connected (868aff48-01d4-4d01-a061-6cefe8005952)
webviewElement.ts:160 [Embedded Page] Failed to construct 'Worker': Script at 'vscode-webview-resource://bdfff789-d19a-48b9-bc2b-7f0a9a4ea11a/file///c%3A/Users/vwazho/Downloads/Test2/editor.worker.js' cannot be accessed from origin 'vscode-webview://bdfff789-d19a-48b9-bc2b-7f0a9a4ea11a'.
console.ts:137 [Extension Host] Starting WebSocket: ws://localhost:8888/api/kernels/1d6eca41-0292-4257-9e35-5e8dabd0ea1d
2webviewElement.ts:160 [Embedded Page] Uncaught Error: Cannot read property 'charAt' of undefined
TypeError: Cannot read property 'charAt' of undefined
at new e (vscode-webview-resource://bdfff789-d19a-48b9-bc2b-7f0a9a4ea11a/file///c%3A/Users/vwazho/.vscode/extensions/ms-python.python-2020.7.94776/out/datascience-ui/notebook/monaco.bundle.js:1:785523)
at new e (vscode-webview-resource://bdfff789-d19a-48b9-bc2b-7f0a9a4ea11a/file///c%3A/Users/vwazho/.vscode/extensions/ms-python.python-2020.7.94776/out/datascience-ui/notebook/monaco.bundle.js:1:788262)
at r (vscode-webview-resource://bdfff789-d19a-48b9-bc2b-7f0a9a4ea11a/file///c%3A/Users/vwazho/.vscode/extensions/ms-python.python-2020.7.94776/out/datascience-ui/notebook/monaco.bundle.js:1:1982236)
at vscode-webview-resource://bdfff789-d19a-48b9-bc2b-7f0a9a4ea11a/file///c%3A/Users/vwazho/.vscode/extensions/ms-python.python-2020.7.94776/out/datascience-ui/notebook/monaco.bundle.js:1:1982457
at e.fire (vscode-webview-resource://bdfff789-d19a-48b9-bc2b-7f0a9a4ea11a/file///c%3A/Users/vwazho/.vscode/extensions/ms-python.python-2020.7.94776/out/datascience-ui/notebook/monaco.bundle.js:1:823295)
at vscode-webview-resource://bdfff789-d19a-48b9-bc2b-7f0a9a4ea11a/file///c%3A/Users/vwazho/.vscode/extensions/ms-python.python-2020.7.94776/out/datascience-ui/notebook/monaco.bundle.js:1:2447330
at e.fire (vscode-webview-resource://bdfff789-d19a-48b9-bc2b-7f0a9a4ea11a/file///c%3A/Users/vwazho/.vscode/extensions/ms-python.python-2020.7.94776/out/datascience-ui/notebook/monaco.bundle.js:1:823295)
at e.register (vscode-webview-resource://bdfff789-d19a-48b9-bc2b-7f0a9a4ea11a/file///c%3A/Users/vwazho/.vscode/extensions/ms-python.python-2020.7.94776/out/datascience-ui/notebook/monaco.bundle.js:1:1248941)
at Object.oa [as setLanguageConfiguration] (vscode-webview-resource://bdfff789-d19a-48b9-bc2b-7f0a9a4ea11a/file///c%3A/Users/vwazho/.vscode/extensions/ms-python.python-2020.7.94776/out/datascience-ui/notebook/monaco.bundle.js:1:537215)
at Object.<anonymous> (vscode-webview-resource://bdfff789-d19a-48b9-bc2b-7f0a9a4ea11a/file///c%3A/Users/vwazho/.vscode/extensions/ms-python.python-2020.7.94776/out/datascience-ui/notebook/commons.initial.bundle.js:2:1771045)
console.ts:137 [Extension Host] Kernel: connected (1d6eca41-0292-4257-9e35-5e8dabd0ea1d)
webviewElement.ts:160 [Embedded Page] TypeError: Cannot read property 'charAt' of undefined
Just to add to @zhouwangyang 's comment it happens in the PowerShell kernel, so it's a full house for the .NET Interactive kernels.
Is it fair to say it affects any non-python kernel ?
Having the same issue with gophernotes kernel as well
same issue with .ipynb and R kernel
Having the same issue with java kernel from ijava. However I've noticed that the cells are actually created successfully when you save and reopen the notebook after the TypeError occurs.
Anyway I typically switch to Python kernel to create cells.
having same issue with R notebook(ipynb) with IRkernel
Same issue running plotly (with vscode/notebook/etc renderer backend):
import plotly.express as px
fig = px.scatter(x=[0, 1, 2, 3, 4], y=[0, 1, 4, 9, 16])
fig.show()
Error loading preloads:
Cannot read property 'src' of null
Thanks everyone for bringing it up. I can also repro de issue, I'm able to run cells but not add them.
I think this should be solved when we roll out native notebooks (which you can try right now: https://devblogs.microsoft.com/python/notebooks-are-getting-revamped/).
I'll bring it up on our next meeting.
Please use the new native notebook support that David mentions above to run non-python kernels.
Now is March 2021, I also run into error
TypeError: Cannot read property 'charAt' of undefined at
when I open ipynb file with R script and R kernel. Vscode, python and jupyter extension are all up-to-date.
The old webview based notebook doesn't support other kernels, please install vscode insiders for now. We have support for other kernels in that version, soon it will be made available in vscode stable
Thanks a lot.
Same error with Julia kernel.
@Xinyu-Wu-0000 Are you using VS code insiders? It's the only version that supports other languages besides python.
@rchiodo I have just switched to the insider version. After changing the "shift enter" keybinding of julia extension, it worked fine.
same issue with .ipynb and R kernel
It April 2021 now, and this issue still remain unsolved.
The 'fix' for this issue is to use the insiders version. We don't support other language kernels except for in the insiders version.
The 'fix' for this issue is to use the insiders version. We don't support other language kernels except for in the insiders version.
Thank you for the notice. The issue has been resolved.
Thank you for the notice. The issue has been resolved.
You mean it works in the normal version too?
o
Unfortunately, it does not. So far, it seems only works for the VScode insider version. However, that's all you need to do :) . Just downloading the insider version and everything else works exactly the same as the normal stable version. I assume that stable version will support other kernels soon (See previous comments from @DonJayamanne )
@DonJayamanne commented on 19 Mar : The old webview based notebook doesn't support other kernels, please install vscode insiders for now. We have support for other kernels in that version, soon it will be made available in vscode stable
Bug: Notebook Editor, Interactive Window, Editor cells
Steps to cause the bug to occur
Actual behavior
Instead of creating a new cell, an issue occurs. See this screenshot:
Expected behavior
A new cell should be added.
Your Jupyter and/or Python environment
Please provide as much info as you readily know
Developer Tools Console Output
Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer, @joyceerhl