question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] .NET MAUI Blazor App crashed on physical device

See original GitHub issue

Description

If I build empty .NET MAUI Blazor App (Preview) VS template with command dotnet build -f net6.0-android -c Release and then install .apk file into one of the physical Android 10 Phone and then run it, it always crash after startup.

So the point is that I want to create .apk for my Blazor MAUI project, which could be send to some phones to test it.

If I try same process with empty .NET MAUI App (Preview) and same command dotnet build -f net6.0-android -c Release it works well on physical Android Phone.

I think there is a problem with some Blazor component or something. Because of that I try to clear all blazor stuff (script include blazor.webview.js etc.) inside index.html file and leave only this inside it:

<!DOCTYPE html>
<html>
<head>
</head>

<body>
    Živjo!
</body>

</html>

But this doesn’t help. Screen attached below is shown just for one second and then app crashed. Screenshot_20211021_130820_com huawei android launcher

Steps to Reproduce

  1. Create default .NET MAUI Blazor App Visual Studio template
  2. run command dotnet build -f net6.0-android -c Release
  3. Copy .apk from “bin/Release/net6.0-android” folder
  4. install it into some physical Android phone
  5. run it

Expected Behavior

Run without problem like .NET MAUI App template.

Actual Behavior

App is crashing all time.

Basic Information

  • Version with issue: MAUI P9
  • Last known good version:
  • IDE: VS 2022 P6
  • Platform Target Frameworks:
    • Android: API 29

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
RaspeR87commented, Oct 22, 2021

Hello #2246 (comment)

@aokocax you save my day!!! 😃

I also added just <AndroidLinkMode>None</AndroidLinkMode> and it works like a charm on release mode on physical Android phone 😃

So that case could be closed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Net Maui Balzor App crashes during startup on local ios ...
We tried to put everything in a .net maui class library, but if we do so. All other projects are not function correctly....
Read more >
.NET MAUI android application crashes immediately after ...
Implement logging in your application, and log every step on the startup. After crash find the log file on the device filesystem and...
Read more >
Blazor Hybrid (MAUI) app works in iOS simulator, but not ...
As far as I can tell it is not crashing in my code. What's interesting is that it works on Debug mode on...
Read more >
Mauisplashscreen
And it crashes only on physical devices.net Maui app crashes on iOS device on splash screen when deployed via Hot Restart.One thing I...
Read more >
Application crashes if appearance properties are set from a ...
The first one is a serious application crash bug, the second is more of a nuisance. If I apply appearance propert.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found