-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
The app is crashing after sent to background IOS only #21533
Comments
Thanks for the report here. I'm very sorry but without any relevant code or logs or anything it will be impossible to determine if this is a potential bug in .NET MAUI or something in your codebase. |
I have updated the post and attached the appdelegate code file , I really don't know from where I begin. |
Dear Gerald,
I really don't know which code should I share! , I attached the AppDelegate
file. if there any code files you want me to share please let me know.
best regards
Alaa Atef
…On Sat, Mar 30, 2024 at 11:50 AM Gerald Versluis ***@***.***> wrote:
Thanks for the report here. I'm very sorry but without any relevant code
or logs or anything it will be impossible to determine if this is a
potential bug in .NET MAUI or something in your codebase.
—
Reply to this email directly, view it on GitHub
<#21533 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/BHOI2KSZ5HWWYX2XVJZ3P5DY2Z4DPAVCNFSM6AAAAABFPG76D2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRXHE4TKMRXHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi, |
Hi, |
Hi we have the same issue. It constantly occurs. It seems relatively new. We've been trying to convert from xamarin 5 thru several net mauireleases. This is likely a net Maui 8 issue. This needs a an urgent high priority fix. Crashing in background makes it undeployable or and at minimum a very pooR Zux |
I'd suggest removing api keys from the file at least. If needed consider sending the details to jsuarez/others privately. @alaa3latol |
any news? |
Seeing the same issue here. The problem started occurring once I've implemented the OnActivated method in AppDelegate. Even if there is no code in it, I get the exception "System.InvalidOperationException: 'Window was already deactivated' when sending the app to background by clicking on the iOS emulator home button. I can reproduce it as follows (MAUI .net8, VS 17.9.6)
The stacktrace looks like this:
Program.cs wasn't modified from the auto-generated code. Commenting out the OnActivated() method makes the crash go away. |
Update: Ignore my previous comment. If I add the line "base.OnActivated(application);" to the OnActivated() method shown above, the app won't crash when sending to background. |
Hi @alaa3latol. 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. |
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. |
Description
I have a problem with IOS only when the app sent to background, it crashes and restarted.
I searched and tried to handle DidEnterBackground but nothing worked for me.
I have sent in the attachments AppDelegate file
AppDelegate.txt
Steps to Reproduce
I handled the DidEnterBackground function in AppDelegate but nothing worked
Link to public reproduction project repository
No response
Version with bug
8.0.3 GA
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
No response
Did you find any workaround?
No
Relevant log output
No response
The text was updated successfully, but these errors were encountered: