Closed Eltee-Taiwo closed 1 month ago
Duplicate of https://github.com/xamarin/xamarin-android/issues/4721 but that was closed by the user.
This looks like a network issue, most likely not a bug in Mono's BCL. However, since it happens in HttpClient
which is not part of Xamarin.Android but rather of Mono, I'm reassigning to the Mono team to look at it. @steveisok, can you route it to whoever can take a look? Thanks!
Any update on this? Xamarin.UITest seems to be the easiest to implement framework for UITesting but can't get started due to this bug.
Any chance of an update on this please?
I have had this issue a number of times now, my resolution steps are one of the following in no particular order:
Thanks a lot for that @iooovolts. Now working. Appreciate it :)
Added this in case someone still running into this problem. I believe that it is common if you are Unit Testing in UnitTest, NUnit, XUnit (it doesn't matter), I'm on VS 2022. I recently had this problem and it caused me days to resolve when I ran into this post. Basically, the Android emulators in Visual Studio are very meticulous when it comes to apps doing too much when initializing the app and it disconnects if it senses is going for too long. There is nothing I found to force the emulator to complete rendering or extend it. The way I solved it is by unloading some of the stuff from the initializing construct. Just add basic stuff to help render the app and do not add any extended methods (async or sync, it doesn't matter). I was seeding a folder structure during initialization and that was apparently causing a heartburn. Note that the app was installing and running fine everywhere except launching from a Xamarin Test framework.
With support for Classic Xamarin.Android ended May 1st, 2024, this issue is likely no longer relevant.
If this still persists in .NET 8+, please open a new issue with updated information based on net8.0-android
or greater. Please include a link to this issue for context.
Steps to Reproduce
Expected Behavior
Tests work
Actual Behavior
An exception is thrown:
Workaround:
~Disable
.EnableLocalScreenshots()
inAppInitializer.cs
and remove any code that's trying to take a screenshot.~ Looks like that was a false positive. It's back to not working but I'll keep playing around with it to see if I can figure one out.Version Information