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

[electron][Windows] Error on app startup in a bundled electron application #2992

Closed
kittaakos opened this issue Sep 27, 2018 · 5 comments
Closed
Labels
electron issues related to the electron target OS/Windows issues related to the Windows OS

Comments

@kittaakos
Copy link
Contributor

kittaakos commented Sep 27, 2018

It happens on Windows, I do not know if it affects other platforms or not.

Error: @postConstruct error in class TypeScriptContribution: EPERM: operation not permitted, open 'c:\Program Files\typefox2\.application-module-loader.js'
    at _postConstruct (c:\Program Files\typefox2\resources\app\node_modules\inversify\lib\resolution\instantiation.js:30:19)
    at Object.resolveInstance (c:\Program Files\typefox2\resources\app\node_modules\inversify\lib\resolution\instantiation.js:47:5)
    at c:\Program Files\typefox2\resources\app\node_modules\inversify\lib\resolution\resolver.js:72:42
    at c:\Program Files\typefox2\resources\app\node_modules\inversify\lib\resolution\resolver.js:34:24
    at Array.map (native)
    at c:\Program Files\typefox2\resources\app\node_modules\inversify\lib\resolution\resolver.js:32:34
    at Object.resolve (c:\Program Files\typefox2\resources\app\node_modules\inversify\lib\resolution\resolver.js:96:12)
    at c:\Program Files\typefox2\resources\app\node_modules\inversify\lib\container\container.js:320:37
    at Container._get (c:\Program Files\typefox2\resources\app\node_modules\inversify\lib\container\container.js:311:44)
    at Container.getAll (c:\Program Files\typefox2\resources\app\node_modules\inversify\lib\container\container.js:239:21)

Update:

Update2:

Related code:
https://github.com/theia-ide/theia/blob/1e747c97ec092ad0cdb73f718cee8c353c0cf240/packages/typescript/src/node/typescript-contribution.ts#L33-L49

@kittaakos kittaakos added the electron issues related to the electron target label Sep 27, 2018
@paul-marechal
Copy link
Member

On my end, it crashes with the following error:

root ERROR [nsfw-watcher: 27103] /meh/projects/electron-bundle/node_modules/electron/dist/electron: symbol lookup error: /meh/projects/electron-bundle/node_modules/vscode-nsfw/build/Release/nsfw.node: undefined symbol: _ZN4node19GetCurrentEventLoopEPN2v87IsolateE

(Ubuntu 16.04)

@kittaakos
Copy link
Contributor Author

On my end, it crashes with the following error:

@marechal-p, please file a separate issue. We can close it as a duplicate later.

@kittaakos kittaakos changed the title [electron] Error on app startup in a bundled electron application [TS][electron][Windows] Error on app startup in a bundled electron application Sep 27, 2018
@kittaakos kittaakos added the typescript issues related to the typescript language label Sep 27, 2018
kittaakos pushed a commit that referenced this issue Oct 4, 2018
Adjusted the `appProjectPath` for the backend when running from electron.
Replaced the on the fly created application module loader with a function.

Closes: #3072.
Closes: #2624.
Closes: #2992.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
@kittaakos kittaakos changed the title [TS][electron][Windows] Error on app startup in a bundled electron application [electron][Windows] Error on app startup in a bundled electron application Oct 4, 2018
@kittaakos kittaakos removed the typescript issues related to the typescript language label Oct 4, 2018
@kittaakos
Copy link
Contributor Author

https://github.com/theia-ide/theia/blob/e0ccd3ac7b182251aa5321004ab2f4387de0385f/dev-packages/application-package/src/application-package.ts#L248-L251

On Windows, we cannot create modules on the fly, the application is sitting in the Program Files which cannot be modified by the user. It ends in an EPERM.

kittaakos pushed a commit that referenced this issue Oct 4, 2018
Adjusted the `appProjectPath` for the backend when running from electron.
Replaced the on the fly created application module loader with a function.

Closes: #3072.
Closes: #2624.
Closes: #2992.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
kittaakos pushed a commit that referenced this issue Oct 4, 2018
Adjusted the `appProjectPath` for the backend when running from electron.
Replaced the on the fly created application module loader with a function.

Closes: #3072.
Closes: #2624.
Closes: #2992.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
kittaakos pushed a commit that referenced this issue Oct 5, 2018
Adjusted the `appProjectPath` for the backend when running from electron.
Replaced the on the fly created application module loader with a function.

Closes: #3072.
Closes: #2624.
Closes: #2992.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
marcdumais-work pushed a commit to marcdumais-work/theia that referenced this issue Oct 15, 2018
Adjusted the `appProjectPath` for the backend when running from electron.
Replaced the on the fly created application module loader with a function.

Closes: eclipse-theia#3072.
Closes: eclipse-theia#2624.
Closes: eclipse-theia#2992.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
@kittaakos kittaakos reopened this Oct 17, 2018
@kittaakos kittaakos removed the electron issues related to the electron target label Apr 23, 2019
@kittaakos
Copy link
Contributor Author

This is an issue for the binary Theia (#4541)

@kittaakos kittaakos reopened this Apr 23, 2019
kittaakos pushed a commit that referenced this issue Apr 24, 2019
Instead of creating a new file on the fly with the corresponding resolve
code, we use `require.resolve`'s
`paths` option.

It was introduced in Node.js `v8.9.0`.
https://nodejs.org/api/modules.html#modules_require_resolve_paths_request

Closes #2992.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
kittaakos pushed a commit that referenced this issue Apr 24, 2019
Instead of creating a new file on the fly with the corresponding resolve
code, we use `require.resolve`'s
`paths` option.

It was introduced in Node.js `v8.9.0`.
https://nodejs.org/api/modules.html#modules_require_resolve_paths_request

Closes #2992.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
@vince-fugnitto vince-fugnitto added electron issues related to the electron target OS/Windows issues related to the Windows OS labels Jan 30, 2020
@msujew
Copy link
Member

msujew commented Mar 15, 2024

Since we now offer the Theia IDE for download and we haven't heard anyone experience this issue, I'm closing this. It's probably quite outdated after mutliple Electron uplifts.

@msujew msujew closed this as not planned Won't fix, can't repro, duplicate, stale Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
electron issues related to the electron target OS/Windows issues related to the Windows OS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants