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

Runs in Windows Emulator, Throws System.NullReferenceException error in Android Emulator. Don't know where to start. #10249

Closed
tradegear opened this issue Sep 21, 2022 · 9 comments
Labels
p/0 Work that we can't release without platform/android 🤖 s/needs-repro Attach a solution or code which reproduces the issue s/no-recent-activity Issue has had no recent activity t/bug Something isn't working

Comments

@tradegear
Copy link

Description

I have a Maui app that runs fine in Windows mode. When I run it in an android emulator, I get a System.NullReferenceException. It does not break on any of my code. It just stops running and the Android emulator screen stays blue.
My app is pretty big and is already pointing to a webapi in Azure. Unless you specifically ask me, I'm not going to initially try to create a scrubbed version without credentials to upload for repro. Hopefully the info I am including here is sufficient, but you'll let me know.
Since it doesn't appear to be my code that is specifically in error, I don't know where to begin and I don't know what code to display for your review.
This reproduces every time, even after a fresh reboot of my dev PC or fresh launch of VS. I am on latest Windows 11 and VisualStudio 2022 17.3.4

I last attempted running in Android a couple weeks ago when I stopped due to problems (still unresolved, but hopefully sidestepped by publishing my webapi on Azure where there is a non local IP and ssl port 443 in place.) In fact, the new availability of this webapi in Azure is why I was once again going to run Android.

In lieu of source code, here is the call stack. The Android emulator window opens, but it never completes the load of my maui app. It blows up before the first page of my maui app appears. It doesn't indicate any line of my code, so this is a "black box" to me...

The Call Stack shows:
0xFFFFFFFFFFFFFFFF in Android.Runtime.JNIEnv.monodroid_debugger_unhandled_exception
0x1A in Android.Runtime.JNINativeWrapper.unhandled_exception at /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:12,5
0x1E in Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PPL_V at /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:122,26
0x4E in Microsoft.Maui.MauiAppCompatActivity.OnCreate at D:\a_work\1\s\src\Core\src\Platform\Android\MauiAppCompatActivity.cs:32,4
0x11 in Android.App.Activity.n_OnCreate_Landroid_os_Bundle
at /Users/runner/work/1/s/xamarin-android/src/Mono.Android/obj/Release/net6.0/android-31/mcw/Android.App.Activity.cs:2781,4
0x9 in Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PPL_V at /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:121,5

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

Here is my VisualStudio "Installed Products" info:
Microsoft Visual Studio Community 2022
Version 17.3.4
VisualStudio.17.Release/17.3.4+32901.215
Microsoft .NET Framework
Version 4.8.09032

Installed Version: Community

Visual C++ 2022 00476-80000-00000-AA531
Microsoft Visual C++ 2022

ADL Tools Service Provider 1.0
This package contains services used by Data Lake tools

ASA Service Provider 1.0

ASP.NET and Web Tools 17.3.376.3011
ASP.NET and Web Tools

Azure App Service Tools v3.0.0 17.3.376.3011
Azure App Service Tools v3.0.0

Azure Data Lake Tools for Visual Studio 2.6.5000.0
Microsoft Azure Data Lake Tools for Visual Studio

Azure Functions and Web Jobs Tools 17.3.376.3011
Azure Functions and Web Jobs Tools

Azure Stream Analytics Tools for Visual Studio 2.6.5000.0
Microsoft Azure Stream Analytics Tools for Visual Studio

C# Tools 4.3.0-3.22423.10+b35bb0baca1071d50cc4f8cf5a1a89e7cc112461
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Extensibility Message Bus 1.2.6 (master@34d6af2)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.

Microsoft Azure Hive Query Language Service 2.6.5000.0
Language service for Hive query

Microsoft Azure Stream Analytics Language Service 2.6.5000.0
Language service for Azure Stream Analytics

Microsoft Azure Tools for Visual Studio 2.9
Support for Azure Cloud Services projects

Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Mono Debugging for Visual Studio 17.3.20 (3f4cb00)
Support for debugging Mono processes with Visual Studio.

Node.js Tools 1.5.40629.1 Commit Hash:3f5cc0329815af3ffb948f08857446d206a9af36
Adds support for developing and debugging Node.js apps in Visual Studio

NuGet Package Manager 6.3.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

Razor (ASP.NET Core) 17.0.0.2232702+e1d654e792aa2fe6646a6935bcca80ff0aff4387
Provides languages services for ASP.NET Core Razor.

SQL Server Data Tools 17.0.62207.04100
Microsoft SQL Server Data Tools

ToolWindowHostedEditor 1.0
Hosting json editor into a tool window

TypeScript Tools 17.0.10701.2001
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools 4.3.0-3.22423.10+b35bb0baca1071d50cc4f8cf5a1a89e7cc112461
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools 17.1.0-beta.22363.4+1b94f89d4d1f41f20f9be73c76f4b229d4e49078
Microsoft Visual F# Tools

Visual Studio IntelliCode 2.2
AI-assisted development for Visual Studio.

VisualStudio.DeviceLog 1.0
Information about my package

VisualStudio.Mac 1.0
Mac Extension for Visual Studio

VSPackage Extension 1.0
VSPackage Visual Studio Extension Detailed Info

Xamarin 17.3.0.296 (d17-3@a0ff24b)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer 17.3.0.208 (remotes/origin/d17-3@e4f67afef)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin Templates 17.2.28 (9b3d244)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.

Xamarin.Android SDK 13.0.0.0 (d17-3/030cd63)
Xamarin.Android Reference Assemblies and MSBuild support.
Mono: dffa5ab
Java.Interop: xamarin/java.interop/d17-3@7716ae53
SQLite: xamarin/sqlite@df4deab
Xamarin.Android Tools: xamarin/xamarin-android-tools/main@14076a6

Xamarin.iOS and Xamarin.Mac SDK 15.12.0.2 (87f98a75e)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

Here are some Xamarin logs:

2022-09-21_16-56-08.4992.monodroid.log
2022-09-21_16-56-08.4992.Ide.log
2022-09-21_17-20-59.22024.devicemanager.log
2022-09-21_17-20-49.22024.Ide.log
2022-09-21_17-20-49.22024.monodroid.log
2022-09-21_16-56-08.4992.monodroiddevices.log
2022-09-21_16-56-08.4992.HotReload.log

Steps to Reproduce

Run app in Windows. Runs fine.
Change emulator target from Windows to "Pixel 5 - API 32 (Android 12.1 - API 32)"
(note - I also tried a "fresh" Pixel 4 - API 32... emulator, and the error occurs the same way at the same time.)
The error occurs.

Running it without debug causes this output:

am start -a "android.intent.action.MAIN" -c "android.intent.category.LAUNCHER" -n "com.companyname.mtrmauiclient/crc64edb95fd3532a0100.MainActivity"
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.companyname.mtrmauiclient/crc64edb95fd3532a0100.MainActivity }
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/MTRMauiClient.dll
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/Mono.Android.dll [External]
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/System.Runtime.dll [External]
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/Java.Interop.dll [External]
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/System.Collections.dll [External]
Resolved pending breakpoint for 'Android.Runtime.JNIEnv.RegisterJniNatives(System.IntPtr, System.Int32, System.IntPtr, System.IntPtr, System.Int32)' to /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNIEnv.cs:124 [0x00000].
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/System.Threading.dll [External]
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/System.Runtime.InteropServices.dll [External]
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/System.Threading.Thread.dll [External]
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/System.Diagnostics.StackTrace.dll [External]
Loaded assembly: data-0x736a2ae93010 [External]
Loaded assembly: data-0x736a2aed3050 [External]
Loaded assembly: data-0x736ac19b3650 [External]
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/netstandard.dll [External]
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/System.Linq.dll [External]
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/System.Collections.Concurrent.dll [External]
Resolved pending breakpoint for 'Xamarin.HotReload.HotReloadAgent.BreakpointSendToIde(System.String)' to D:\a_work\1\s\HotReload\Source\Xamarin.HotReload.Agent\HotReloadAgent.cs:419 [0x00000].
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/System.Text.Json.dll [External]
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/System.Text.Encodings.Web.dll [External]
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/System.ComponentModel.dll [External]
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/Microsoft.Maui.Controls.dll [External]
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/System.ObjectModel.dll [External]
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/Microsoft.Maui.dll [External]
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/Microsoft.Maui.Graphics.dll [External]
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/Microsoft.Maui.Essentials.dll [External]
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/Microsoft.Extensions.Logging.Abstractions.dll [External]
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/System.ComponentModel.TypeConverter.dll [External]
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/System.Private.Uri.dll [External]
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/System.Runtime.Loader.dll [External]
Resolved pending breakpoint for 'Xamarin.HotReload.HotReloadAgent.BreakpointCheckpoint()' to D:\a_work\1\s\HotReload\Source\Xamarin.HotReload.Agent\HotReloadAgent.cs:414 [0x00000].
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/System.Memory.dll [External]
[e.mtrmauiclien] Late-enabling -Xcheck:jni
[e.mtrmauiclien] Unexpected CPU variant for X86 using defaults: x86_64
[CompatibilityChangeReporter] Compat change id reported: 171979766; UID 10150; state: ENABLED
[GraphicsEnvironment] ANGLE Developer option for 'com.companyname.mtrmauiclient' set to: 'default'
[GraphicsEnvironment] ANGLE GameManagerService for com.companyname.mtrmauiclient: false
[GraphicsEnvironment] Neither updatable production driver nor prerelease driver is supported.
[NetworkSecurityConfig] No Network Security Config specified, using platform default
[NetworkSecurityConfig] No Network Security Config specified, using platform default
[debug-app-helper] Checking if libmonodroid was unpacked to /data/app/~~Il-c4UXMrn-3MZ1EG3mCQg==/com.companyname.mtrmauiclient-mFmbvkXZ4pyDPqfglzg-Qw==/lib/x86_64/libmonodroid.so
[debug-app-helper] Native libs extracted to /data/app/~~Il-c4UXMrn-3MZ1EG3mCQg==/com.companyname.mtrmauiclient-mFmbvkXZ4pyDPqfglzg-Qw==/lib/x86_64, assuming application/android:extractNativeLibs == true
[debug-app-helper] Setting up for DSO lookup in app data directories
[debug-app-helper] Added filesystem DSO lookup location: /data/app/~~Il-c4UXMrn-3MZ1EG3mCQg==/com.companyname.mtrmauiclient-mFmbvkXZ4pyDPqfglzg-Qw==/lib/x86_64
[debug-app-helper] Using runtime path: /data/app/~~Il-c4UXMrn-3MZ1EG3mCQg==/com.companyname.mtrmauiclient-mFmbvkXZ4pyDPqfglzg-Qw==/lib/x86_64
[debug-app-helper] checking directory: /data/user/0/com.companyname.mtrmauiclient/files/.__override__/lib
[debug-app-helper] directory does not exist: /data/user/0/com.companyname.mtrmauiclient/files/.__override__/lib
[debug-app-helper] Checking whether Mono runtime exists at: /data/user/0/com.companyname.mtrmauiclient/files/.override/libmonosgen-2.0.so
[debug-app-helper] Checking whether Mono runtime exists at: /data/app/~~Il-c4UXMrn-3MZ1EG3mCQg==/com.companyname.mtrmauiclient-mFmbvkXZ4pyDPqfglzg-Qw==/lib/x86_64/libmonosgen-2.0.so
[debug-app-helper] Mono runtime found at: /data/app/~~Il-c4UXMrn-3MZ1EG3mCQg==/com.companyname.mtrmauiclient-mFmbvkXZ4pyDPqfglzg-Qw==/lib/x86_64/libmonosgen-2.0.so
[e.mtrmauiclien] Attempt to remove non-JNI local reference, dumping thread
[DOTNET] JNI_OnLoad: JNI_OnLoad in pal_jni.c
[monodroid] Creating public update directory: /data/user/0/com.companyname.mtrmauiclient/files/.__override__
[e.mtrmauiclien] Attempt to remove non-JNI local reference, dumping thread
[monodroid-debug] Trying to initialize the debugger with options: --debugger-agent=transport=dt_socket,loglevel=0,address=10.0.2.2:57985,embedding=1
[monodroid-assembly] open_from_bundles: failed to load assembly MTRMauiClient.dll
[monodroid-gc] GREF GC Threshold: 46080
[monodroid-assembly] open_from_bundles: failed to load assembly Mono.Android.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Runtime.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Java.Interop.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Collections.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Threading.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Runtime.InteropServices.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Threading.Thread.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Diagnostics.StackTrace.dll
[e.mtrmauiclien] Attempt to remove non-JNI local reference, dumping thread
[monodroid-assembly] open_from_bundles: failed to load assembly netstandard.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Linq.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.VisualStudio.DesignTools.TapContract.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.VisualStudio.DesignTools.TapContract.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.HotReload.Contracts.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.HotReload.Contracts.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Collections.Concurrent.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Text.Json.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Text.Encodings.Web.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.ComponentModel.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Maui.Controls.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.HotReload.Contracts.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.HotReload.Contracts.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.VisualStudio.DesignTools.TapContract.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.VisualStudio.DesignTools.TapContract.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.ObjectModel.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Maui.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Maui.Graphics.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Maui.Essentials.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Extensions.Logging.Abstractions.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.ComponentModel.TypeConverter.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Private.Uri.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Runtime.Loader.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Memory.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Reflection.Emit.Lightweight.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Reflection.Emit.ILGeneration.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Reflection.Primitives.dll
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/System.Reflection.Emit.Lightweight.dll [External]
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/System.Reflection.Emit.ILGeneration.dll [External]
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/System.Reflection.Primitives.dll [External]
[monodroid-assembly] open_from_bundles: failed to load assembly System.Runtime.CompilerServices.Unsafe.dll
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/System.Runtime.CompilerServices.Unsafe.dll [External]
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.Core.dll
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/Xamarin.AndroidX.Core.dll [External]
[libEGL] loaded /vendor/lib64/egl/libEGL_emulation.so
[libEGL] loaded /vendor/lib64/egl/libGLESv1_CM_emulation.so
[libEGL] loaded /vendor/lib64/egl/libGLESv2_emulation.so
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.AppCompat.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.Fragment.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.Activity.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.Lifecycle.Common.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.Lifecycle.ViewModel.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.SavedState.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.DrawerLayout.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.CustomView.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.Loader.dll
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/Xamarin.AndroidX.AppCompat.dll [External]
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/Xamarin.AndroidX.Fragment.dll [External]
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/Xamarin.AndroidX.Activity.dll [External]
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/Xamarin.AndroidX.Lifecycle.Common.dll [External]
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/Xamarin.AndroidX.Lifecycle.ViewModel.dll [External]
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/Xamarin.AndroidX.SavedState.dll [External]
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/Xamarin.AndroidX.DrawerLayout.dll [External]
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/Xamarin.AndroidX.CustomView.dll [External]
Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/Xamarin.AndroidX.Loader.dll [External]
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Maui.Controls.Compatibility.dll
System.NullReferenceException: 'Object reference not set to an instance of an object.'

Loaded assembly: /data/data/com.companyname.mtrmauiclient/files/.override/Microsoft.Maui.Controls.Compatibility.dll [External]
Starting Android application ...

am start -a "android.intent.action.MAIN" -c "android.intent.category.LAUNCHER" -n "com.companyname.mtrmauiclient/crc64edb95fd3532a0100.MainActivity"
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.companyname.mtrmauiclient/crc64edb95fd3532a0100.MainActivity }

Android application is running.
Starting Android application ...

am start -a "android.intent.action.MAIN" -c "android.intent.category.LAUNCHER" -n "com.companyname.mtrmauiclient/crc64edb95fd3532a0100.MainActivity"
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.companyname.mtrmauiclient/crc64edb95fd3532a0100.MainActivity }

Android application is running.

Link to public reproduction project repository

n/a

Version with bug

Unknown/Other (please specify)

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

android

Did you find any workaround?

run on windows to continue working on my dev project.

Relevant log output

I uploaded xamarin logs in previous window.
@diogokobbi
Copy link

Hello, where this exception occours? At build? I don't know if it is the same issue, but i got this error when i tried to navigate to a TabbedPage from a Shell Tab. On Windows everything was fine, but when i tried to run on Android, my app crashed.

@tradegear
Copy link
Author

The first screen in the app never appears. I am only using shell. The build appears to complete, then the Android emulator opens up, then on the Android emulator, I see the standard background with standard Android links, then a screen with a blue background appears (like a blank page in my maui app), but then the first screen never appears and then the error is thrown.

@PureWeen
Copy link
Member

@tradegear if you disable hot reload does it work?

Have you tried reducing your app down to a state where it runs? Like, just load a blank page then go from there?

@PureWeen PureWeen added platform/android 🤖 s/needs-info Issue needs more info from the author labels Sep 22, 2022
@ghost
Copy link

ghost commented Sep 22, 2022

Hi @tradegear. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@tradegear
Copy link
Author

No I have not tried reducing the app because removing anything breaks the app. Everything I have in here is part of the implemented pattern of session state, etc.
In the past, I have instead opened up a fresh "cute bot" app, and added things back in. No response here has me believing I may need to go through that exercise again. When I chose to do a project on dotnet maui, I assumed the long path of Xamarin up to this point would have eliminated the obvious issues, of which this seems one. No answer here is a bit scary.

@ghost ghost added s/needs-attention Issue has more information and needs another look and removed s/needs-info Issue needs more info from the author labels Sep 26, 2022
@tradegear
Copy link
Author

There must be something that gets corrupted or out of sync between payload generated for Android and the emulator. Here is what I did to (temporarily?) side-step the issue, and why I do not believe it is an issue with my actual code:

  1. Delete all Android emulators from Visual Studio.
  2. Create a new dot .net maui "cute bot" app.
  3. Create a new default (pixel 5 ...) Android emulator.
  4. "cut bot" app runs in new Android emulator.
  5. Create a new dot .net maui "cut bot" app.
  6. Modify (and rename) this new app to contain the same nuGet packages, and reintroduce all the code components from your old broken project into this new project.
  7. Run the new project that contains all of your code from the old project within the Android emulator.
  8. Android emulator works fine and runs app fine.
  9. Wonder how often you'll have to do this.
  10. Wonder what you did to break the original project and hope you don't accidentally do the same thing again.
  11. Hope someone who understands how that process was built reviews the error and digs into what is wrong (via all the error stacks originally posted).

@samhouts samhouts added the p/0 Work that we can't release without label Sep 27, 2022
@rachelkang rachelkang added s/needs-repro Attach a solution or code which reproduces the issue and removed s/needs-attention Issue has more information and needs another look labels Sep 29, 2022
@ghost
Copy link

ghost commented Sep 29, 2022

Hi @tradegear. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@rachelkang
Copy link
Member

@tradegear could you attach the two projects you mention so that we can take a closer look?

@ghost ghost added the s/no-recent-activity Issue has had no recent activity label Oct 3, 2022
@ghost
Copy link

ghost commented Oct 3, 2022

This issue has been automatically marked as stale because it has been marked as requiring author feedback to reproduce the issue but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

@ghost ghost closed this as completed Oct 6, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Nov 5, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p/0 Work that we can't release without platform/android 🤖 s/needs-repro Attach a solution or code which reproduces the issue s/no-recent-activity Issue has had no recent activity t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants