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

Uncaught Exception: A Javascript error occurred in the main process in (version 11.5.1) #536

Closed
rambabu-paluru-tfs opened this issue Feb 6, 2021 · 14 comments
Assignees
Labels

Comments

@rambabu-paluru-tfs
Copy link

rambabu-paluru-tfs commented Feb 6, 2021

Hi,

ElectronNET.API version - 11.5.1.0
.NET 5
NodeJS version - v12.16.3
Blazor Serverside project is running using the ElectronNET framework.

Steps to Reproduce:

  1. Packaged the application using the ElectronNET.CLI (ElectronNET.CLI Version: 9.31.2.0)
  2. Installed the application in Win 7 OS PC (Remote dekstop)
  3. Application is running successfully after installation.
  4. Close remote session by leave the application running for some time like 1 day.
  5. Connect to the remote desktop and perform an action in the application which gets the GetContentSizeAsync() to get the size of the content from the BrowserWindow instance.
  6. Unhandled Exception: A Javascript error occurred in the main process. After this application goes to non-responsive mode.
  7. Attached the screenshot for reference.
    image

Please let me know if there is any fix or workaround for the issue.
Any help?

Thanks,
Ram.

@rambabu-paluru-tfs rambabu-paluru-tfs changed the title Unhandled Exception: A Javascript error occurred in the main process in (version 11.5.1) Uncaught Exception: A Javascript error occurred in the main process in (version 11.5.1) Feb 6, 2021
@peerem
Copy link

peerem commented Feb 28, 2021

We have the same problem with version 11.5.1 and a Blazor Server App (.NET 5).

We would like to continue using Electron.Net in the future because it looks like the new WebWindow in .NET 6 has too many requirements for the user (installed browser).

Uncaught Exception:
Error: spawn
C:...exe
ENOENT
at Process.ChildProcess.handle.onexit (internal/child_process,js:267:19)
at onErrorNT (internal/child_process,js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)

@FancyFurret
Copy link

I have the exact same issue as @peerem, using 11.5.1 and Blazor in .NET 5. I'm on macOS if that changes anything.

Anyone figure out a workaround yet? I would like to get my project started

@miggat
Copy link

miggat commented Jul 8, 2021

Issue still happening. I'm totally unable to run my app.

@peerem
Copy link

peerem commented Jul 8, 2021

I switched to Chromely and I am happy.

@GregorBiswanger
Copy link
Member

Please manually remove the host folder from the Obj directory. Then the problem should be fixed.

@GregorBiswanger GregorBiswanger self-assigned this Jul 8, 2021
@GregorBiswanger
Copy link
Member

And please use the latest version of Electron.NET + Electron.NET CLI! (Version 13.5.1)

@ReinaldoAssis
Copy link

image

Hi there, I've been having the same problem as mentioned above. I've deleted the Obj folder as recommended by @GregorBiswanger , but it didn't solve the problem. The strange thing is: when I run the project with electronize start /watch, it works just fine... It only throws this bug when trying to build or using electronize start. I'd really appreciate any help with this issue, best regards.

@AndyMedtronic
Copy link

AndyMedtronic commented Dec 1, 2021

I am having exactly the same problem as Reinaldo. Is there any fix to this, or are there ways round it. When it works with the /watch however I get a browser window appearing, and then the app window

@AndyMedtronic
Copy link

Had a revelation with this. My electron.manifest.json had empty strings in executable and productName. Populating these caused it to run up succesfully without the /watch

{
"executable": "ElectronServer",
"splashscreen": {
"imageFile": ""
},
"name": "",
"author": "",
"singleInstance": false,
"environment": "Production",z
"build": {
"appId": "com..app",
"productName": "ElectronServer",
.....

@ReinaldoAssis
Copy link

@AndyMedtronic You are an angel! Thanks a lot for sharing your experience, with your help I was able to figure out what I was doing wrong. I will share it here for anyone having this problem. Basically, I had changed the name of my project from OpenManga to Lexi. So my configuration was looking like this:

"executable": "Lexi",
"splashscreen": {
"imageFile": ""
},
"name": "Lexi",
"author": "Reinaldo Miranda de Assis",
"singleInstance": false,
"environment": "Production",
"build": {
"appId": "com.Lexi.app",
"productName": "Lexi",

As soon as I changed the names back to the original "OpenManga", everything worked fine! You have to be careful when renaming these kinds of things haha.

@teremy
Copy link

teremy commented Aug 3, 2022

Since this issue is still open. I had renamed my Visual Studio Solution and the electronize build failed afterwards. I rerun electronize init and it recreated the electron.manifest.json with a different executable and name. Then the build worked again.

@GregorBiswanger
Copy link
Member

🎉🚀 New Electron.NET version 23.6.1 released 🚀🎉

With native Electron 23 and .NET 6 support. Your problem should be fixed here. If you continue to have the problem, please let us know. Please note the correct updating of your API & CLI. Info in the README. Have fun!

@J0J0008
Copy link

J0J0008 commented Sep 18, 2023

@GregorBiswanger I still got that problem on Electron.CLI 23.6.1 with .NET 6 and i got no clue why

@amigax
Copy link

amigax commented May 16, 2024

same issue here. such a shame electron doesnt work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants