-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Exception being thrown on android physical device with latest version of .NET MAUI #7002
Comments
Tagging @jonathanpeppers @eerhardt in case this looks familiar. |
Would the original author (Paul Johnson) be able to share a small sample project that hits this issue? I suspect there might be something wrong when using .resx files from a class library, but there isn't enough information to know if that is the problem. We have a few tests around .resx in xamarin/xamarin-android, and they seem to be passing. |
Hi @vsfeedback. 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. |
While I'm not the original author, I faced this issue on my experimental app as well.
Physical device: Google Pixel 5, Android 12.1 (SDK 32). --> Reproduction I have the following additional information:
|
@timvandenhof said:
You mean there are, or aren't? |
If someone has an idea of what API you're using that causes this, or can reproduce it in a sample app that would help us solve this. The problem is the stack trace above, doesn't really show what the problematic code is... Thanks! |
Test code showing the issue : https://github.com/nodoid/CompEncrypt - works fine on iOS and the app builds on Android but errors out when run in debug mode - in release mode it's fine |
@nodoid are you seeing the above application crash on a device? Debug mode only? The app seems to work for me, it does look like maybe the layout has an issue: Are you using the latest MAUI RC 3 builds that went out last week? |
I have the same issue on my Android emulator. If I ticket all the items in Common Language Runtime Exceptions, the exception gets caught. It doesn't get caught if CLR exception settings is default. |
@kojini can you share a sample that hits this problem? Is it the same |
@jonathanpeppers I can't share my code as it's commartial code. However, I can provide logs and stacktrace when the exception occurred.
Yes, I can see `> am start -a "android.intent.action.MAIN" -c "android.intent.category.LAUNCHER" -n "com.sample.test/crc64e14457250bc6e2f9.MainActivity"
|
This issue is also showing with the same System.Private error when accessing a locally stored file. If you grab the source code (https://github.com/nodoid/CompEncrypt) the issue can be seen once the start button is clicked except that the application now terminates due to a process being shared error (which I'm not sure if this too is incorrect as the process is closed before the line 71 in FileUtilities - ConvertToBase64()) |
@nodoid this sample has changed alot since I last tried it. It now crashes with a completely different error:
I think you probably have a
Do you know how I can see the original problem above? I want to understand how you get Thanks! |
As soon as the app hits the fist InitializeComponent in the App.xaml.cs I get the FileNotFound error with the Source from the throwback showing System.Private.CoreLib. I then get the same error when the LanguageConverter converter method is hit (same error) and when the File error occurs, the System.Private.CoreLib is showing as the Source here. This error is showing with the GA release |
Ok what device or emulator are you seeing this on? Debug or Release mode? |
Samsung S8, Debug mode - release mode never shows these issues from memory |
I tried on a Samsung Galaxy S9+ (just what I have), and it seems to be working for me. I was using a Pixel 5 previously. What Android version is your device running? Can you also try:
We've seen some Samsung devices have an issue with Fast Deployment in the past, perhaps |
It's using API 28. I've followed your instructions, deleted the obj and bin directories, run clean and it seems to be working now. |
@nodoid do you think it was the |
@jonathanpeppers = adding the Embded sorted the issue |
Is this resolved then or do we still have something to do here? :) |
Hi @vsfeedback. 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. |
This issue has been automatically marked as stale because it has been marked as requiring author feedback 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. |
This issue has been moved from a ticket on Developer Community.
When I attempt to run my .NET MAUI application on a physical device, I'm getting hit with the following exception
If I enabled the CLR debug, it's revealing more
The error shows in App.xaml.cs when the InitialiseComponent is called and if I try to access anything in my Languages.Resources file or use DI to access platform specific code. On an emulator, the code works as expected.
Using .NET MAUI 6.0.300-rc.2.5513
Original Comments
Feedback Bot on 4/30/2022, 09:39 PM:
(private comment, text removed)
Original Solutions
(no solutions)
The text was updated successfully, but these errors were encountered: