MudBlazor.Extensions icon indicating copy to clipboard operation
MudBlazor.Extensions copied to clipboard

.net maui Blazor hybrid - null object reference

Open whann0205 opened this issue 1 year ago • 1 comments

Contact Details

[email protected]

What happened?

System.NullReferenceException Message=Object reference not set to an instance of an object.

Expected Behavior

I hoped to use that extension with mudblazor.

Screenshots

grafik

Reproduction link

No response

What application type are you referring to?

MAUI

Custom Application Type

No response

MudBlazor.Extension Version

2.0.3

MudBlazor Version

7.5

What .net Version are you using?

.Net8

What browser are you using?

Firefox

Sample Solution

https://github.com/whann0205/MudblazorExt4Maui

Pull Request

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

whann0205 avatar Aug 26 '24 14:08 whann0205

Can you explain whats in that file, looks like a virus download?

whann0205 avatar Aug 26 '24 15:08 whann0205

sorry for late response. I will have a look asap at your bug. and for your other question I cant see a file post here, but I also received an email that looks like somebody posted a virus link in github here

fgilde avatar Sep 10 '24 08:09 fgilde

Now I've had a look into your provided demo, and I cant reproduce your bug.

https://github.com/user-attachments/assets/c63b90e9-b23c-4848-b753-a2e12cf6900e

fgilde avatar Sep 10 '24 10:09 fgilde

Sorry for my delay. Had been on holidays. Hmm. I can see that you do not get any exceptions. I upgraded all nugets to the latest version (as you can see in the attached csproj). Also i upgraded the visual studio to the latest version. Still ... grafik

MudblazorExt4Maui.csproj.zip

Please tell me what else i can provide to you in order to make this work.

whann0205 avatar Sep 12 '24 05:09 whann0205

Hard to say but maybe you can firstly paste the full callstack here

fgilde avatar Sep 16 '24 07:09 fgilde

Sorry i am fairly new in the .net c# world. What do you mean by saying "paste the full callstack"?

whann0205 avatar Sep 16 '24 08:09 whann0205

I fixed one reference issues that can cause the error. Can you maybe try it again with the preview package 2.0.6-prev-2410112222-main

<PackageReference Include="MudBlazor.Extensions" Version="2.0.6-prev-2410112222-main" />

fgilde avatar Oct 11 '24 22:10 fgilde

I have tried it again, but unfortunealy the error persists. Screenshot 2024-10-12 060227 Also cleared obj and bin first and rebuilt the whole solution to no avail. You can clone the updated solution from (https://github.com/whann0205/MudblazorExt4Maui)

whann0205 avatar Oct 12 '24 04:10 whann0205

Also did test the solution on my mac m1. I tried first to compile with maccatalyst it compiles and runs without any problem! Then i tried with android 20241012_062704 So the problem is definitely related to android not necessarily machine centric!

whann0205 avatar Oct 12 '24 04:10 whann0205

I still cant reproduce, can you please test this version?

<PackageReference Include="MudBlazor.Extensions" Version="2.0.6-prev-2410121210-main" />

fgilde avatar Oct 12 '24 12:10 fgilde

I am happy to tell you that it works with that version!!

whann0205 avatar Oct 12 '24 16:10 whann0205

That makes me happy. Great. I create a release later this day and close the issue then afterwards

fgilde avatar Oct 12 '24 18:10 fgilde

Fixed in MudBlazor.Extensions 2.0.6 Nuget

fgilde avatar Oct 12 '24 23:10 fgilde