-
Notifications
You must be signed in to change notification settings - Fork 214
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
Generate UI not working for Jetbrains dev container #2318
Comments
Small piece of extra info, the output of nx report: Node : 22.9.0 nx (global) : 20.1.2
|
Thanks! I'll look into this when I find the time. |
So, when using a dev container you have both a host and a client so i did it for both. Here are the results after opening a generate tab host idea.log: https://gist.github.com/mligtenberg/cb21ed7c7e8ff8e4614b99b7df1a7e60 Some facts I discovered after some more exploring is that showing the graph does work. The difference I found between the generation UI and the graph UI is the way the html is loaded. in the graph UI it is loaded from HTML: It could very well be that I'm running into undefined behavior in the JetBrains dev container setup. |
I'm encountering the same issue while using JetBrains Gateway on a freshly installed Windows system with Ubuntu running under WSL2. When I click on "Generate," the UI opens, but nothing is displayed. Is there any update on this issue? |
I've been doing some debugging and searching and found the culprit. The issue is on the following lines: nx-console/apps/intellij/src/main/kotlin/dev/nx/console/generate/ui/file/NxGenerateUiFile.kt Lines 60 to 64 in de5fcb5
The issue is described in the following issue with Jetbrains including a work around: The lines above registers the Generate UI under a custom http://nxconsolev2/ address. The basic issue is that CefApp is the Chromium App in the current IDE. Container app make use of a remote IDE backend. Which means that the CefApp call above would register the call in the IDE in the container (the remote backend). The Jetbrains client has it's own CefApp that has no idea of the custom domain registered. The current workaround is to introduce a custom requestHandler via the |
Current Behavior
When running the NX console in a jetbrains dev container (Tested with Webstorm 2024.2 - 2024.3), the generate UI is blank.
Example devcontainer.json:
https://gist.github.com/mligtenberg/343d0e6eab64f1ccd2d9e10656c973de
Expected Behavior
I would expect to see the generation form as can been seen in a non dev container version of Webstorm.
Steps to Reproduce
Clone "https://github.com/nrwl/nx-examples" and create a folder called ".devcontainer" in it
Paste the following file in it (filename "devcontainer.json")
https://gist.github.com/mligtenberg/343d0e6eab64f1ccd2d9e10656c973de
(pull request with these changes will be added shortly)
Open Webstorm, in the welcome screen select dev container
select new dev container and then from local project
Select the devcontainer.json created from the gist, and press build
run
npm i --force
(currently some dependency is conflicting in nx-examples)right click on the
libs
folder and selectNx Generate
create a new library project (I used
@nx/angular - library
)the new tab opened will stay blank
This dev container can be started via "Webstorm" or "Gateway"
Failure Logs / Images / Videos
Environment
I'm running on MacOS
Nx Console version:
Local: v20.0.0-rc.0
Global: v20.1.2
Jetbrains version:
Webstorm: 2024.3
The text was updated successfully, but these errors were encountered: