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 open ipynb files in the Notebook editor #5860

Closed
tanhakabir opened this issue May 12, 2021 · 13 comments
Closed

unable to open ipynb files in the Notebook editor #5860

tanhakabir opened this issue May 12, 2021 · 13 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@tanhakabir
Copy link

Environment data

  • VS Code version: 1.57.0-insider (Universal)
  • Jupyter Extension version (available under the Extensions sidebar): v2021.6.834931520
  • Python Extension version (available under the Extensions sidebar): v2021.5.829140558
  • OS (Windows | Mac | Linux distro) and version: Mac Darwin x64 20.4.0
  • Python and/or Anaconda version: Python 3.9.1
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): none
  • Jupyter server running: n/a

Problem

On the latest release of Insiders I can't seem to open ipynb files in the Notebook editor. I can open other notebook files in the editor like REST Book and GitHub Issues just fine.

Expected behaviour

Opening and ipynb file or using the context menu to open an ipynb file in the Notebook editor should open the file in Notebook editors.

Actual behaviour

recording (38)

Steps to reproduce:

Not sure exact steps, just opening ipynb files on latest Insiders with latest extensions.

Logs

The logs section for Jupyter is completely empty.

image

@tanhakabir tanhakabir added the bug Issue identified by VS Code Team member as probable bug label May 12, 2021
@rchiodo
Copy link
Contributor

rchiodo commented May 12, 2021

That should mean the extension didn't load. Can you share the developer tools console? I believe this is another API breaking change that we haven't caught up with yet.

@tanhakabir
Copy link
Author

Seeing this:

TRACE [text file model] resolve() - enter file:///Users/tanha/Documents/Sandbox/fun.ipynb
workbench.desktop.main.js:627 TRACE [text file model] resolveFromFile() file:///Users/tanha/Documents/Sandbox/fun.ipynb
workbench.desktop.main.js:627 TRACE [text file model] resolveFromContent() - enter file:///Users/tanha/Documents/Sandbox/fun.ipynb
workbench.desktop.main.js:627 TRACE [text file model] doCreateTextModel() file:///Users/tanha/Documents/Sandbox/fun.ipynb
workbench.desktop.main.js:627   ERR Cannot read property 'visible' of undefined: TypeError: Cannot read property 'visible' of undefined
    at AcrolinxViewProvider.updateSidebarContainer (/Users/tanha/.vscode-insiders/extensions/acrolinx.vscode-sidebar-1.2.0/out/src/acrolinxViewProvider.js:108:23)
    at Function.updateEditor (/Users/tanha/.vscode-insiders/extensions/acrolinx.vscode-sidebar-1.2.0/out/src/util/activeEditorHandler.js:15:22)
    at /Users/tanha/.vscode-insiders/extensions/acrolinx.vscode-sidebar-1.2.0/out/src/extension.js:17:121
    at m.fire (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:57:1836)
    at /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:88:44985
    at m.fire (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:57:1836)
    at E.acceptDocumentsAndEditorsDelta (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:87:149680)
    at E.$acceptDocumentsAndEditorsDelta (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:87:147802)
    at l._doInvokeHandler (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:91:12860)
    at l._invokeHandler (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:91:12544)
    at l._receiveRequest (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:91:11205)
    at l._receiveOneMessage (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:91:9988)
    at /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:91:8089
    at m.fire (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:57:1836)
    at E.fire (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:65:15647)
    at /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:106:29932
    at m.fire (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:57:1836)
    at E.fire (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:65:15647)
    at t._receiveMessage (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:65:20905)
    at /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:65:17791
    at m.fire (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:57:1836)
    at acceptChunk (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:65:13012)
    at /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:65:12360
    at Socket._ (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:106:13356)
    at Socket.emit (events.js:315:20)
    at Socket.EventEmitter.emit (domain.js:467:12)
    at addChunk (internal/streams/readable.js:309:12)
    at readableAddChunk (internal/streams/readable.js:284:9)
    at Socket.Readable.push (internal/streams/readable.js:223:10)
    at Pipe.onStreamRead (internal/stream_base_commons.js:188:23)
2workbench.desktop.main.js:627 TRACE CommandService#executeCommand setContext
workbench.desktop.main.js:2725 Extension Host
workbench.desktop.main.js:2725 Sending schema for file:///Users/tanha/Documents/Sandbox/fun.ipynb https://ddtelvscode.kusto.windows.net/: VSCode
workbench.desktop.main.js:627 TRACE CommandService#executeCommand setContext

@rchiodo
Copy link
Contributor

rchiodo commented May 12, 2021

That looks like another extension is causing a problem. Acrolinx? Can you try again without it?

Or maybe try opening a .py file and add a cell to it?

# %%
print('foo')

@rchiodo
Copy link
Contributor

rchiodo commented May 12, 2021

Oh now after the latest update, I'm getting this:

console.ts:137 [Extension Host] extension activation failed TypeError: s.notebook.onDidChangeNotebookCellExecutionState is not a function
	at new d (c:\Users\aku91\.vscode-insiders\extensions\ms-toolsai.jupyter-2021.6.834931520\out\client\extension.js:90:450992)
	at Object.t.resolveInstance (c:\Users\aku91\.vscode-insiders\extensions\ms-toolsai.jupyter-2021.6.834931520\out\client\extension.js:52:263462)
	at c:\Users\aku91\.vscode-insiders\extensions\ms-toolsa

@rchiodo
Copy link
Contributor

rchiodo commented May 12, 2021

Sounds like APIs are out of sync again.

@tanhakabir
Copy link
Author

Hmm seeing this in console after disabling Acrolinx:

Extension Host
workbench.desktop.main.js:2725 Sending schema for file:///Users/tanha/Documents/Sandbox/fun.ipynb https://ddtelvscode.kusto.windows.net/: VSCode
workbench.desktop.main.js:2725 Extension Host
workbench.desktop.main.js:2725 Sending schema for file:///Users/tanha/Documents/Sandbox/fun.ipynb https://ddtelvscode.kusto.windows.net/: VSCode
DevTools failed to load SourceMap: Could not load content for https://ticino.blob.core.windows.net/sourcemaps/37a12c9b0846167b2f68e9e1f276149d2d8b9b27/core/vs/workbench/workbench.desktop.main.js.map: Load canceled due to load timeout
workbench.desktop.main.js:2725 Extension Host
workbench.desktop.main.js:2725 Sending schema for output:extension-output-%233 https://ddtelvscode.kusto.windows.net/: VSCode
workbench.desktop.main.js:627   ERR Cannot have two contributions with the same id editor.contrib.acceptChangesButton: Error: Cannot have two contributions with the same id editor.contrib.acceptChangesButton
    at new ln (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:652:76088)
    at h._createInstance (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:625:1374)
    at h.createInstance (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:625:793)
    at qo.createEditorControl (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2252:27036)
    at qo.createEditorControl (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2252:92123)
    at qo.createEditor (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2252:26647)
    at qo.create (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1440:57758)
    at v.doCreateEditorPane (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1808:13198)
    at v.doShowEditorPane (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1808:12773)
    at v.openEditor (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1808:12527)
    at file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2462:15892
    at vi.doShowEditor (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2462:16071)
    at vi.openEditor (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2462:15663)
    at P.openEditor (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2300:17483)
workbench.desktop.main.js:2725 Extension Host
workbench.desktop.main.js:2725 Sending schema for untitled:Untitled-1.ipynb https://ddtelvscode.kusto.windows.net/: VSCode

@rchiodo
Copy link
Contributor

rchiodo commented May 12, 2021

Spoke too soon. I had to update VS code insiders. Now it works.

This is what I have that's working for me:

image

Jupyter Extension: 2021.6.834931520
Python Extension: 2021.6.834355108-dev

@tanhakabir
Copy link
Author

Hmm the only out of date thing I see is in the the package.json it's this currently:

 "notebookProvider": [
            {
                "viewType": "jupyter-notebook",
                "displayName": "Jupyter Notebook (preview)",
                "selector": [
                    {
                        "filenamePattern": "*.ipynb"
                    }
                ],
                "priority": "option"
            }
        ],

but notebookProvider is now named notebooks but this was only a warning for me and shouldn't be breaking?

@tanhakabir
Copy link
Author

This is my version:

Version: 1.57.0-insider (Universal)
Commit: 37a12c9b0846167b2f68e9e1f276149d2d8b9b27
Date: 2021-05-12T14:19:31.224Z
Electron: 12.0.4
Chrome: 89.0.4389.114
Node.js: 14.16.0
V8: 8.9.255.24-electron.0
OS: Darwin x64 20.4.0

@rchiodo
Copy link
Contributor

rchiodo commented May 12, 2021

Did you try disabling acrolinx?

@tanhakabir
Copy link
Author

yep

@rchiodo
Copy link
Contributor

rchiodo commented May 12, 2021

And there's no console output about Jupyter extension at all?

What happens if you create a python file with a cell in it?

# %%
print('foo')

Do you get code lenses on top?

image

@rchiodo
Copy link
Contributor

rchiodo commented May 12, 2021

For some reason this extension is the root cause:
https://marketplace.visualstudio.com/items?itemName=tanhakabir.rest-book

@rchiodo rchiodo closed this as completed May 12, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

2 participants