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

Application crashes on start #864

Open
boroneaionut opened this issue Aug 1, 2024 · 1 comment
Open

Application crashes on start #864

boroneaionut opened this issue Aug 1, 2024 · 1 comment
Labels

Comments

@boroneaionut
Copy link

  • Version: 23.6.2

.NET 8, Node.js 20.13.0

  • Target: win

I am using Azure DevOps pipelines to build and deploy the application to a VM. When I start the application on the VM, it almost instantly crashes. I can see the CPU usage jumping to 100% and then the process stops. The same application built on my local machine and then copied to the VM works correctly. The pipeline is configured to use the exact configuration as my local machine (except for the Windows version).

The crash is likely related to electron because the application is configured to run DB migrations before creating the Electron window, which are successfully applied.

I figure the issue might be related to environment differences. Could it be an issue with building the application on Windows Server?
Any help is appreciated.

Thanks!

Here is the log from the Event Viewer:

Faulting application name: app.exe, version: 1.0.0.0, time stamp: 0x6402a76f
Faulting module name: app.exe, version: 1.0.0.0, time stamp: 0x6402a76f
Exception code: 0x80000003
Fault offset: 0x00000000018d4e14
Faulting process id: 0x1454

Program.cs

builder.Services.AddElectron();
builder.WebHost.UseElectron(args);

var app = builder.Build();

await app.Services.InitializeDatabaseAsync();

app.MapRazorComponents<UI.Components.App>()
	.AddInteractiveServerRenderMode();

await app.StartAsync();

var window = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions
{
	Width = 1600,
	MinWidth = 800,
	Height = 1100,
	MinHeight = 500,
	HasShadow = false,
	Center = true,
	AutoHideMenuBar = true,
	Frame = false
});

window.OnClosed += Electron.App.Quit;

await Electron.IpcMain.On("minimize-window", (e) =>
{
	window.Minimize();
});

await Electron.IpcMain.On("toggle-fullscreen", (e) =>
{
	var isMaximized = window.IsMaximizedAsync().Result;
	if (isMaximized)
	{
		window.Unmaximize();
	}
	else
	{
		window.Maximize();
	}
});

await Electron.IpcMain.On("close-window", (e) =>
{
	window.Close();
});

app.WaitForShutdown();

Steps to Reproduce:

@Fibsi90
Copy link

Fibsi90 commented Oct 19, 2024

Can you show us your pre build steps of your devops pipeline?

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

2 participants