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

Nx Console Generate (UI) tab displaying raw HTML instead of generator options UI in Webstorm #2160

Open
jschwarty opened this issue Jun 7, 2024 · 3 comments
Assignees
Labels
type: bug Something isn't working

Comments

@jschwarty
Copy link
Contributor

jschwarty commented Jun 7, 2024

Current Behavior

When selecting a Generator from the Generate (UI) panel the Generate tab opens up and just displays the following HTML:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Generate UI</title>
  <link href="output.css" rel="stylesheet">
</head>
<body class="intellij-scrollbar">
<script src="api.js"></script>

<script src="main.js" type="module"></script>
<root-element></root-element>
</body>
</html>
Screenshot 2024-06-07 at 7 36 45 AM

Expected Behavior

The Generate tab should display the UI for the Generator schema options.

Steps to Reproduce

Install any version of Webstorm.
Install the Nx Console plugin.
Open an Nx project and try to use the Generate (UI).

Failure Logs / Images / Videos

Unhandled exception in [ComponentManager(ProjectImpl@2120388552), CoroutineName(dev.nx.console.generate.ui.file.V2NxGenerateUiFileCoroutineHolder), StandaloneCoroutine{Cancelling}@78ba2b25, Dispatchers.Default]

com.intellij.ui.jcef.JBCefBrowserJsCallError: Failed to execute JavaScript expression in JCEF browser. TypeError: Cannot read properties of undefined (reading 'registerPostToIdeCallback')
	at com.intellij.ui.jcef.JBCefBrowserJsCall$createErrorHandlerQueryWithinScope$2$1.invoke(JBCefBrowserJsCall.kt:231)
	at com.intellij.ui.jcef.JBCefBrowserJsCall$createErrorHandlerQueryWithinScope$2$1.invoke(JBCefBrowserJsCall.kt:229)
	at com.intellij.ui.jcef.JBCefBrowserJsCall.createErrorHandlerQueryWithinScope$lambda$12$lambda$11(JBCefBrowserJsCall.kt:229)
	at com.intellij.ui.jcef.JBCefJSQuery$1.onQuery(JBCefJSQuery.java:123)
	Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [ComponentManager(ProjectImpl@2120388552), CoroutineName(dev.nx.console.generate.ui.file.V2NxGenerateUiFileCoroutineHolder), StandaloneCoroutine{Cancelled}@78ba2b25, Dispatchers.Default]

Environment

  • OS: MacOS Sonoma 14.5 (Apple M1 Pro)
  • Nx Console version: 1.25.0
  • Webstorm version: 2024.1.3
@jschwarty jschwarty added the type: bug Something isn't working label Jun 7, 2024
@MaxKless MaxKless self-assigned this Jun 7, 2024
@jschwarty
Copy link
Contributor Author

Hey @MaxKless 👋

It's super weird. Some devs on the same setup above do not see this issue, but I do. I have tried a complete fresh install (default settings) of Webstorm with no additional plugins but Nx Console and I still see this issue.

@MaxKless
Copy link
Collaborator

MaxKless commented Jun 7, 2024

Weird... I've only seen this once before, here: #1971

Maybe you can read through this and poke around in your environment a little bit more.
I couldn't reproduce on the first try on my machine but I'll try again first thing monday :)

@MaxKless
Copy link
Collaborator

Hey @jschwarty! Just checking in on whether you've had the chance to look at the other issue.
Something else that would be super useful for me:
If you could provide some logs from one machine where the error happens and one where the error doesn't happen in the same workspace. That way I can compare the logs and see if anything stands out.

Go to Help > Diagnostic Tools > Debug Log Settings... and then insert #dev.nx.console:trace. Then paste the idea.log or sections of it when the error happens.

Thank you!

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

2 participants