-
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
[regression/8.0.0] Android app crashes with an ANR on .NET 8 preview 6 #16418
Comments
We've done some more investigation into this issue by using the profiling instructions provided here. Unfortunately it seems that this is making matters worse, because the app is now killed by the OS even sooner resulting in a broken trace. We've tried this with almost every .NET 8 preview (except for preview 1 since the app immediately crashes at startup with that version) and what we're seeing in the output of If we do the same with .NET 7 we see that the trace keeps on collecting up to 4 MB after which I pressed Enter, but the app just keeps working and is not being killed by the OS at all. So it seems there is definitely an issue with .NET 8. |
possibly related to #15829 |
What steps do I take to see the issue? On thing I would try here is to run Does the problem still occur with .NET 8 Preview 7? |
Hi @jmezach. 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. |
Here are some more detailed instructions for |
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. |
@jonathanpeppers thank for taking a look at this. The sample app does not work out of the box currently, this is because we removed the connectionstring/keys from the google-services.json file that are used to connect to Firebase. We'll take a look at using the .NET 8 preview 7 and the |
Hi @jmezach. 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. |
We have tested with the .NET 8 preview 7 and the good news is the issue seems to be fixed, app no longer crashes with an ANR after upgrading. The bad news, upgrading to the new preview involved a bit more work than we expected though. At first the app would crash immediately after opening, this only happened on release builds for Android (debug/iOS builds worked fine). The crash occurred due to a We fixed this by adding a new |
There is a fix for You should be able to set If that is the only issue you ran into so far using .NET 8 Preview 7, I suspect the original problem could have been related to We disabled this feature in .NET 8 Preview 7 to revisit in .NET 9. I'll add your example to the list, to test in the future. But sounds like things are working now. Closing, as I don't see any problems in dotnet/maui here, but let us know, thanks! |
Description
We are experiencing an issue with a cross-platform app we are developing that is being killed by Android due to an Application Not Responding (ANR). So far we haven't been able to pinpoint what is causing this, but we figured we'd report this anyway since it appears not to happen with .NET 7, only with .NET 8. That being said, we do have a workaround which is removing the
<GoogleServicesJson>
element from the project file, but that then means we are unable to receive push notifications in our app which we obviously do actually need.So it seems that there is some combination of factors that are contributing to this issue but we don't think it is something that is actually happening in our code. We can however consistently reproduce the issue. What is further complicating things is that it only seems to happen when the app is running on a device and has been compiled in Release mode.
We do have an ANR report from a device but it is too big to post here. What would be the best way to provide this information?
Steps to Reproduce
Please note that our provided repro doesn't actually crash with an ANR, that only happens in our actual app, but we can't figure out what the difference is. Our working assumption is that in our actual app some process that is running in the background is taking up a lot of time and that causes the app to crash.
Link to public reproduction project repository
https://github.com/tristanhollman/MauiApp_FirebaseMessagingNet8
Version with bug
8.0.0-preview.5.8529
Last version that worked well
7.0.86
Affected platforms
Android
Affected platform versions
At least Android 13, might occur on older versions as well but haven't tested
Did you find any workaround?
A workaround is to remove the
<GoogleServiceJson>
element from the project file, but then push notifications no longer work.Relevant log output
The text was updated successfully, but these errors were encountered: