-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
The generated sample Electron app crashes on startup #14804
Comments
Fix typo: extra brackets in `application-manager`'s backend code generator
There is a typo in backend-generator.ts#L44. Because of it, extra braces are generated on rebuild every time, like so:
|
I'm not sure what's wrong here exactly, as the I'll take a look at this on Monday. |
I could imagine that the |
@rodat-dev Thank you, but as outlined in my comment above #14804 (comment), just removing the parenthesis (or for that matter, the whole call) breaks the environment variable support on various operating systems. I'll try to reproduce this once I'm back at work to see what the root cause is. |
@msujew This might be related to an issue we discovered when building the Theia IDE with the new 1.58 release and it might be related to #14781 |
@JonasHelming I see, I wasn't aware of #14781 getting merged. |
See #14812 for a fix. We probably want to create a patch release for that. |
I’ll do a patch release once the PR is merged. This is the same issue we saw in the Theia IDE. |
The provided fix only works when the back-end is webpacked. I don't think we want to force this as the side-effect of a simple dependency update. @msujew can we use the async import function to load the module? |
Bug Description:
Starting a new project based on the yeoman templates and building and running the electron app produces an error and the app does not start. Tracing the error to a generated file in
/lib
, it seems a non-function object is being called as a function, and removing that line, or the extra()
to call the object seemingly fixes the issue.Steps to Reproduce:
Following the guide at:
https://theia-ide.org/docs/composing_applications/
Prerequisites installed as per:
https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#prerequisites
NPM version 10.9.2
Yarn version 1.22.22
Yeoman version 5.1.0
yo theia-extension
in an empty directory. SelectHello World
as the option to be generated.yarn build:browser
in the directory root, completes successfully.yarn start:browser
in the directory root, the app starts successfully and is accessible on localhost.yarn build:electron
in the directory root, completes successfully.yarn start:electron
in the directory root, this produces the following output:Navigating to
./src-gen/backend/electron-main.js
, finding line 54:Can be worked around by commenting the line out like such:
Or removing the final parenthesis:
They both result in the app starting up normally with no errors and the window appearing.
Additional Information
I am not a seasoned JS dev, my primary dev language has never been JS, and I'm unfamiliar with the ecosystem, so I might be doing something wrong.
Any help is really appreciated!
The text was updated successfully, but these errors were encountered: