-
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
[Bug] MAUI App Crashes/Freezes on Debugging (iOS & Android) with Real Device #27204
Comments
This is also happening in version 9.030 |
Without any reproduction or logs of any kind it will be impossible for us to determine what might be going on here or where the source of this issue might be. If you revert back to 8.0.90 SR9 does it then work again? Or is it still broken now in this state? Are you able to test this project on Windows with Visual Studio? Does that show the same behavior? Does it only happen with a certain project or if you start a new project does it happen there as well? |
@jfversluis I haven't reverted back to 8.0.90 SR9. I still do get the issue with 8.0.90 SR9 but not as frequent as now. The interesting is that I am not seeing any logs or any reason for the crash which makes it more difficult. I have tried deleting and reinstalling visual studio code but to no avail. I cannot use visual studio for mac as it's been retired. Am I the only one experiencing this issue. I know I have seen some complaining but not on github |
@jfversluis please find logs updated at Relevant log output. The crash is more frequent with maui android and UIs becoming unresponsive. I need help. I don't want to give up on maui. I will continue to update logs if different |
Could you provide us with a sample project so we can investigate it further? Looking forward to your reply! |
Unfortunately it would seem like that so far you're the only one or one of a few people that seem to experience this. At least, I haven't heard it before. Do you have the option to try on another machine? Does it behave better there? If you run a Windows/macOS app? Does it freeze then? And what exactly freezes? The .NET MAUI app you have deployed or Visual Studio Code as a whole? Does it happen with all .NET MAUI projects or just 1 in particular? |
@jfversluis sorry for my late response. I think I have found a temporary workaround. I was able to resolve it Issue 1: [NetworkSecurityConfig] No Network Security Config specified, using platform default Cause Resolution xml xml Issue 2: Creating public update directory: /data/user/0/com.mypackage/files/.override/armeabi-v7a Cause Resolution Remove the .override Directory: bash Clear the App Data: bash Uninstall the App: bash Reinstall the App: Deploy the app again using your development environment (e.g., Visual Studio Code). I'm now trying on a windows laptop using Visual Studio 2022 |
Hi @jfversluis I have reverted to my original code, and it works very well. So, it must have been some NuGet packages I installed that caused the issues. APPLE PAY: #if IOS || MACCATALYST namespace projectA.Client.Maui; public class ApplePayService : PKPaymentAuthorizationViewControllerDelegate, IPayService
} GOOGLE PAY: namespace projectA.Client.Maui; public class GooglePayService : AppCompatActivity, IPayService, IOnCompleteListener
#if DEBUG || TEST
#if !DEBUG
} public class IntentMessage : ValueChangedMessage
} public class ActivityResultCallback : Java.Lang.Object, IActivityResultCallback
} public class OnSuccessListener : Java.Lang.Object, IOnSuccessListener
} public class OnCompleteListener : Java.Lang.Object, IOnCompleteListener
} using System; namespace projectA.Client.Maui; public class GooglePaymentRequest public class MerchantInfo using System; namespace projectA.Client.Maui; public class GooglePaymentResponseToken public class TransactionInfo public class PaymentMethod public class PaymentParameters public class TokenizationSpecification public class TokenizationSpecificationParameters public static class GooglePaymentMethodType public static class TotalPriceStatusTypes public static class GoogleCardNetwork public static class GoogleAuthMethod public static class GoogleTokenizationType Google button handler: namespace projectA.Client.Maui
} @jfversluis first, I’d like to express my appreciation for all the hard work you have put into making .NET MAUI a robust and versatile framework. I wanted to kindly ask whether there are any plans to introduce native support for Apple Pay and Google Pay in .NET MAUI. Many developers, including myself, would greatly benefit from having seamless payment integrations, as this would enhance the user experience and expand the capabilities of applications built on the framework. If this is already on the roadmap, I would love to know if there is an estimated timeline. If not, could you please consider adding it as a feature request? I believe it would be a valuable addition to the ecosystem. Thank you for your time and consideration. I look forward to your response! |
Thanks for all the investigation here! Good luck figuring out what NuGet it was and how to work around it :) I remember there being an issue for the Apple Pay/Google Wallet API but I can't seem to find it. Honestly, I don't think we will be implementing that anytime soon. There is still lots of other things we want to do and primarily .NET MAUI is a UI framework and this is more of a non-UI thing. If you can't find the Apple Pay/Google Wallet issue either, you could consider opening a new feature request for it. Great input for that could be this old Xamarin.Forms issue. Please don't just copy/paste it, but make sure its updated for the latest and greatest and how you envision it to work. Thanks! Gerald |
No worries. I will consider opening a new feature request for it. I will also make it's updated. Thanks |
Description
When running a .NET MAUI app on a real iOS or Android device using Visual Studio Code in debug mode, the app runs successfully only after following a strict sequence:
Delete bin and obj folders
Perform a clean build
Restore dependencies
Rebuild the project
Delete the app from the device
Deploy and run the app
However, when attempting to re-run the app without repeating the above steps, the application either crashes on startup or freezes. This forces me to repeat the entire cycle again.
Steps to Reproduce
Expected Behavior
The app should run consistently in debug mode without requiring a full clean-up and rebuild every time.
Actual Behavior
The app crashes or freezes unless the cleanup steps are performed before every debug session.
Additional Information
.NET MAUI Version: [Provide your MAUI version]
Visual Studio Code Version: [Provide VS Code version]
Operating System: [Windows/macOS + version]
Target Devices: [iOS version / Android version & model]
Any Exception Logs?: [Attach logs if available]
Link to public reproduction project repository
No response
Version with bug
9.0.14 SR1.4
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
8.0.90 SR9
Affected platforms
iOS, Android, macOS
Affected platform versions
iOS 15.8, iOS 18, Android 10
Did you find any workaround?
The workaround is going through that annoying cycle
Relevant log output
You may only use the Microsoft Visual Studio .NET/C/C++ Debugger (vsdbg) with
Visual Studio Code, Visual Studio or Visual Studio for Mac software to help you
develop and test your applications.
The program 'App.Client.Maui.dll' has exited with code 0 (0x0).
[rom.arcrom] Late-enabling -Xcheck:jni
[rom.arcrom] Unquickening 22 vdex files!
[rom.arcrom] The ClassLoaderContext is a special shared library.
[LoadedApk] LoadedApk::makeApplication() appContext=android.app.ContextImpl@c5c149e appContext.mOpPackageName=com.mypackage appContext.mBasePackageName=com.mypackage appContext.mPackageInfo=android.app.LoadedApk@1b11b7f
2
[NetworkSecurityConfig] No Network Security Config specified, using platform default
[DOTNET] AndroidCryptoNative_InitLibraryOnLoad: jint AndroidCryptoNative_InitLibraryOnLoad(JavaVM *, void *) in /__w/1/s/src/native/libs/System.Security.Cryptography.Native.Android/pal_jni.c
[DOTNET] GetOptionalClassGRef: optional class com/android/org/conscrypt/OpenSSLEngineImpl was not found
[monodroid] Failed to create directory '/data/user/0/com.mypackage/files/.override/armeabi-v7a'. File exists
[monodroid] Creating public update directory:
/data/user/0/com.mypackage/files/.__override__/armeabi-v7a
[rom.arcrom] 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=127.0.0.1:51507,server=y,embedding=1,timeout=-459748843
The text was updated successfully, but these errors were encountered: