-
Notifications
You must be signed in to change notification settings - Fork 514
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
Version 8.0.401 release broke ability to run app with WebDriverAgent from Appium on iOS #21234
Comments
From @vitek-karas on Fri, 13 Sep 2024 11:29:09 GMT @rolfbjarne maybe you have some context. |
@Joost-Jens-Luminis it's not clear from your description, but can you reproduce this locally, or does it only happen on CI? To start diagnosing this, it would be good to get any crash reports from the device: https://github.com/xamarin/xamarin-macios/wiki/Diagnosis#crash-reports That would reveal what the app is actually doing when it's being terminated. |
@rolfbjarne Yes, this can be reproduced locally. A colleague of mine has updated his installation and with his builds (both debug and release builds) the takes to long to start. This also means that there is no crash. It just gets closed. |
This is a video of what happens. It's boring, but give you an idea The first document is the console log from the iOS device regarding what is going on at the time for our App (Bronkhorst FlowcontrolApp). The second one is the full log unfiltered (in cases the filter filters something out that is important) I hope this provides enough information to get a clue as to what is going on here. |
iOS will still create a crash report. This is from the device log:
|
You are correct, this is a crash log I got from the phone. I generated it this morning though as I couldn't find the crashlogs from last Friday. But I assume it's the same crash. |
Yes, that crash report is for the watchdog:
Unfortunately all the important frames in the stack trace are only memory addresses:
This is easily fixable, by adding the following to the csproj, rebuilding and triggering a new crash report: <PropertyGroup>
<NoSymbolStrip>true</NoSymbolStrip>
</PropertyGroup> Can you do that and upload the new crash report? |
Here is the file: |
That didn't change anything, the stack trace still only shows memory addresses. Can you get an MSBuild binlog so that I can investigate to see why this happens? |
Maybe that was because it was a release build. I made one with debug, there is a bit more information in here. Unfortunately I spend yesterday trying to update my systems (Windows and Mac) so I can reproduce this while debugging, unfortunately that prevented me from debugging al to gather (VS can't connect to my Mac anymore due to a null reference exception), so this is still a build from the Azure Devops Pipeline but with debugging set instead of release. I hope this is enough. |
Yes, that's a bit more helpful at least. Can you try turning the interpreter off to see if that changes anything? <PropertyGroup>
<UseInterpreter>false</UseInterpreter>
</PropertyGroup> if it still fails the same way, please get an updated crash report. |
You can use the latest workload to see it go wrong. On iOS Workload 17.2.8078 everything is working as expected. |
This works for me, which is the latest as of today:
|
Even those versions work for me :/ A few more questions:
|
Do you have the WDA from Appium installed on your test device? Without that installed it works for me as well, but with that installed is when these problems occur. |
No, I don't; how do I get that installed? |
The following are the instructions I follow when I installed it (They are from our own internal wiki). A good tutorial can be found here: https://www.youtube.com/watch?v=kvNnF4Zpgmo&t=2s Source: https://www.33rdsquare.com/the-complete-step-by-step-guide-to-appium-ios-test-automation/
https://appium.github.io/appium-xcuitest-driver/latest/
You can open the WDA using the following command:
Make sure to set codesign for all packages (else it may not build).
|
OK, I can reproduce it now, the WDA app must also be running from inside Xcode in order to reproduce. |
I've finally figured out what's happening, and it's an unintended side effect of a new feature we added. The problem is in with the public abstract class MvxApplicationDelegate : UIApplicationDelegate, IMvxApplicationDelegate
{
public new virtual UIWindow Window { get; set; }
// ...
} Prior to when this broke, this In one of our latest updates, we implemented improved support for binding protocols by taking advantage of default interface members in C#. The consequence is that the
Sidenote: it's possible to get replicate the broken behavior with the older version of the workload by making the public abstract class MvxApplicationDelegate : UIApplicationDelegate, IMvxApplicationDelegate
{
public override UIWindow Window { get; set; }
// ...
} Going forward, I don't think this is something we'll fix/change on our side, because it's such an incredible rare set of circumstances that leads to the eventual deadlock at startup. I believe the best fix is on your end, by making the Alternatively it might be possible to just rename the public abstract class MvxApplicationDelegate : UIApplicationDelegate, IMvxApplicationDelegate
{
public UIWindow MainWindow { get; set; }
/* Update all the Window references in this class to use MainWindow instead as well! */
} I'll close this now, but feel free to comment if you disagree or have any further problems, and I'll see what I can do. FWIW this was one of the most interesting issues I've had to diagnose in a while, so thanks a lot for taking the time to create a test project I could use to reproduce it! |
Wow, thanks for the explanation. I am happy you have figured out what went wrong (and that you enjoyed it :D ). One final question though, is our work around fine? Or will that cause issues in the future?
edit: spelling |
Yes, that should work fine too I believe. |
In that case I consider this issue resolved, the rest lies with the MvvmCross people whom I have informed. |
From @Joost-Jens-Luminis on Fri, 13 Sep 2024 07:26:42 GMT
We have been creating tests using Appium for a few months now for our app on Windows, Android and iOS.
Unfortunately, with the release of .Net 8.0.401 and the released iOS workload it broke our ability to test on iOS.
When the WebDriverAgent from Appium is running, it takes to long for the App to start now and it gets killed by the iOS watchdog.
If the WebDriverAgent from Appium is not running, the app is starting up fine and working properly.
With .Net version 8.0.300 (and related workloads) it is still working properly. Unfortunately, as we are using a release version, build in Azure Pipelines, to run the tests we cannot downgrade to an earlier version of the workloads.
The following installation is still working fine with Appium testing on iOS (This is from my PC):
Is there any information on what has changed in net8.0-ios that could have caused this? And how we could work around this issue?
Note: We are a 100% sure Appium didn't cause this, as we hadn't update Appium when the problems started.
Of course we did try updating Appium and it's drivers to the latest version but to no avail.
Copied from original issue dotnet/runtime#107781
The text was updated successfully, but these errors were encountered: