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

Remote Extension host terminates unexpectedly with Nx extension 18.11+ #1978

Open
TheTiGuR opened this issue Jan 12, 2024 · 14 comments
Open
Labels
type: bug Something isn't working

Comments

@TheTiGuR
Copy link

When using the current (18.11, 18.11.1, 18.12) versions of the Nx Console in VS Code, this error pops up:
image

The remote extension host then fails to load any other extensions

With 18.10.1, this did not happen

Steps to Reproduce

I don't know how reproducible it is, but my setup:
Macbook Pro M3
Sonoma 14.2.1
VS Code 1.85.1
Running in a Dev Container with ~20 extensions installed, including Nx Console
On startup of the devcontainer with the latest Nx Console extension version installed, the error in the screenshot above will happen. If I downgrade to 18.10.1, it no longer happens.

Failure Logs / Images / Videos

Image above
Relevant snippet I think from the Extension Host Logs:
2024-01-12 10:54:14.747 [info] ExtensionService#_doActivateExtension nrwl.angular-console, startup: false, activationEvent: 'onStartupFinished'
2024-01-12 10:54:14.830 [info] ExtensionService#_doActivateExtension vscode.typescript-language-features, startup: false, activationEvent: 'api', root cause: nrwl.angular-console

I hope this is enough information, but if there is anything else I can provide, please let me know. Thanks!

@TheTiGuR TheTiGuR added the type: bug Something isn't working label Jan 12, 2024
@TheTiGuR TheTiGuR changed the title Remove Extension host terminates unexpectedly with Nx extension 18.11+ Remote Extension host terminates unexpectedly with Nx extension 18.11+ Jan 14, 2024
@MaxKless
Copy link
Collaborator

Hey thanks for the report! Can you look into the developer console (Help -> Toggle Developer Console) and let me know if there are any errors in there?

@TheTiGuR
Copy link
Author

I don't see anything special in there related to Nx, but I have include an old-version log to allow you to see the differences between current version of the console vs the old version (18.10.1) of the extension.

Current Extension Version (18.12.0):
vscode-app-1705336275639.log

Old (working) Extension Version (18.10.1):
vscode-app-1705336427840-Old-version.log

If there is anything else I can provide, I will see what I can do. Thanks for looking into it!

@TheTiGuR
Copy link
Author

TheTiGuR commented Jan 18, 2024

To update, continuing to happen in 18.13.0 of the NX Console extension. Also just updated VS Code to latest, so now at 1.85.2 and continuing to happen.

To echo mmaday below, this is happening with multiple other members of my team all using a devcontainer within vscode for a docker environment setup.

@mmaday
Copy link

mmaday commented Jan 19, 2024

Just want to echo that my team and I are encountering the same issue with a very similar runtime environment. We're also downgrading to 18.10.1 as a workaround.

@MaxKless
Copy link
Collaborator

Thanks for reporting this.

  • Do you have a repro you can provide?
  • Is it happening across diferent nx versions?
  • Could you both provide the results of your nx report?

Also if you could Help -> Toggle Developer Console and let me know any errors in there that would be super helpful

@TheTiGuR
Copy link
Author

devcontainer.json

Here is an empty devcontainer with most of my customizations stripped out other than extensions, in case there is some kind of conflict between them. I continue to get the REH errors with this, zero code loaded/running, just created in an empty folder, (well, technically I put this file in a .devcontainer folder), started vscode, let it detect that it exists, and have it build the devcontainer based on that definition. And, when done building, REH errors.

@interrobrian
Copy link

My team is also getting this. We are also on Apple Silicon Macs. I did some experimentation with a minimal repro, and this appears to be caused by having both the Nx extension >=18.11 and the Prettier extension (esbenp.prettier-vscode) enabled in a dev container.

Repro steps are:

  1. Open a folder in a container (I'm using mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye)
  2. Install both Nx Console and Prettier
  3. Reload the window

I've checked the remote extension logs and the vscode logs, but it's only showing an abrupt disconnect. I'm unable to find any specific cause. The actual contents of the workspace don't seem to matter - I can repro in a workspace with only the devcontainer.json.

@TheTiGuR
Copy link
Author

TheTiGuR commented Feb 13, 2024

We're up to 18.16 and this is still happening. Given @interrobrian 's finding, this really doesn't seem like an uncommon configuration. Would love to see it fixed.

@MaxKless
Copy link
Collaborator

Hey! Sorry for not responding here. I will look into reproducing this and seeing how I can fix it.

@kylebjordahl
Copy link

kylebjordahl commented Mar 13, 2024

Our team is hitting this same issue in a completely new devcontainer/repo we're setting up.

One interesting finding, if I disable the esbenp.prettier-vscode extension on startup, I can get Nx console working and then re-enable the prettier extension just fine. If I leave both enabled and restart the devcontainer, I get the error as originally posted.

Here's our nx report just for more data points:

Node   : 20.11.1
OS     : linux-arm64
npm    : 10.2.4

nx                 : 18.0.7
@nx/js             : 18.0.7
@nx/jest           : 18.0.7
@nx/linter         : 18.0.7
@nx/eslint         : 18.0.7
@nx/workspace      : 18.0.7
@nx/devkit         : 18.0.7
@nx/eslint-plugin  : 18.0.7
@nx/plugin         : 18.0.7
@nrwl/tao          : 18.0.7
typescript         : 5.3.3
---------------------------------------
Community plugins:
@nxlv/python : 18.0.0

And our installed extension list (I had pared it all the way back at one point and narrowed it down to Nx+Prettier being the crash culprit)

amazonwebservices.aws-toolkit-vscode
apollographql.vscode-apollo
atlassian.atlascode
christian-kohler.npm-intellisense
christian-kohler.path-intellisense
dbaeumer.vscode-eslint
eamodio.gitlens
esbenp.prettier-vscode
firsttris.vscode-jest-runner
github.vscode-github-actions
github.vscode-pull-request-github
graphql.vscode-graphql
graphql.vscode-graphql-syntax
mgmcdermott.vscode-language-babel
ms-python.autopep8
ms-python.debugpy
ms-python.flake8
ms-python.isort
ms-python.python
ms-python.vscode-pylance
naumovs.color-highlight
nrwl.angular-console
redhat.vscode-yaml
stylelint.vscode-stylelint
tamasfe.even-better-toml
visualstudioexptteam.intellicode-api-usage-examples
visualstudioexptteam.vscodeintellicode

@MrChrisRodriguez
Copy link

@MaxKless any updates? This plugin completely breaks devcontainers which, in our case, includes CodeSpaces, Gitpod, Devpod, etc.

@TheTiGuR
Copy link
Author

I see there was an update to the extension in the last couple of hours, and the other referenced ticket regarding this issue was marked completed, but initial testing this morning still has the same problems.

@MaxKless
Copy link
Collaborator

Yes it was closed because it's a duplicate of this one. I've set aside time this week to dive deeper into this issue and see what's going on :)
Thank you for your patience

@TheTiGuR
Copy link
Author

If more immediate feedback or testing can help, please ping me on discord, same name as here and I should be able to respond fairly quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants