-
Notifications
You must be signed in to change notification settings - Fork 516
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
Unable to deploy to iOS 15.4 emulator #14834
Comments
I have a few questions:
|
Hi @wellhat. We have added the "need-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. |
Thanks for your reply @rolfbjarne
|
Interesting:
I'll let @rolfbjarne reply back as the expert here, but have you tried restarting the iOS device and/or deleting the app from it and letting the reinstall copy it back over? |
@wellhat it seems there's something unique to your project, so could we get access to it somehow so we can try it ourselves? |
@chamons I tried that just now, but I got the same error. @rolfbjarne It could be something is misconfigured on my end! But haven't been able to get a useful error message yet. The solution I am building is SkyDrop.sln (SkyDrop.iOS) from this open source repository: https://github.com/SkyLabs-Innovation-Group/SkyDrop |
I see you're on an M1 machine, do you have the same problem on an x86_64 machine (if you have one available)? |
More questions!
|
I've tried to repro this on both an M1 and x86_64 machine, and no success. Could you zip up the |
@rolfbjarne Here you go SkyDrop.iOS.zip |
I don't have another Mac device to test with except this M1 Macbook Air. The app installs in the simulator fine, and it launches but it is almost immediately backgrounded. That happens a split second after showing the splash screen (the debugger disconnects/crashes at the same time). I can't re-attach the debugger. I can also launch the app normally by clicking it in the simulator. But I don't know any way to debug the application atm. |
I can launch that app just fine in the simulator, so it doesn't seem to be a problem with the app :/ Next step is to collect diagnostic information from the simulator:
Thanks for helping diagnosing this! |
Glad to help get to the bottom of this. Here is the log you requested https://siasky.net/AABSSgq7H3VuhpDVZhecDEzfN48DLHz9sgnHkIXuTK8QcQ |
This looks interesting:
I wonder if the executable isn't actually executable somehow... Could you execute this command and attach the output?
|
@rolfbjarne Here's the output:
|
That didn't reveal much 😐 Does this command launch the app in the simulator correctly?
If not, please paste the full output of the command here. |
I'm experiencing the same issue on an M1 Pro. The problem only occurs in VS2022 and not in VS2019. |
Using this command line worked for me but launching the app from VS2022 produces the HE0042 error. |
Can you try installing this package, and see if that works? If that doesn't work, please:
If you need to revert to the released stable version, you can just select the stable channel in VSMac and update Xamarin.iOS. Thanks! |
The 15.8.0.6 package didn't fix it for me. Here is the output with mlaunch-verbosity: Using Xcode 13.3.1 found in /Applications/Xcode.app/Contents/Developer Xamarin.Hosting: Created shared memory token: 1013718 |
I think I've managed to figure this out (with a lot of help from people willing to diagnose this!): We ask the simulator to write stdout and stderr to a file, and if the simulator doesn't have write permissions to write/create those files, then this error occurs. |
Any workaround or a way to test whether this is truly the case? |
We are having the same issue, if we can help somehow let me know! |
Next attempt at a fix! Try installing this package, and see if that works: If that doesn't work, please:
If you need to revert to the released stable version, you can just select the stable channel in VSMac and update Xamarin.iOS. Thanks! |
@rolfbjarne just to make sure, does it matter if we use VS 2022 Preview or should we try with 2019? It occurs on both but to me it seems that the 2019 is more verbose, however I cannot find out anything from the logs... |
@tomh4 the package from my previous comment should work with both VS 2022 and 2019. |
New commits in xamarin/maccore: * xamarin/maccore@29a1c1382e [mlaunch] Redirect stdout and stderr through a pty when launching in the simulator. Fixes xamarin#14834. Diff: https://github.com/xamarin/maccore/compare/749e84cb162b945dafa85fd6dffe80a727a491cf..29a1c1382e005e568b57d1b45e3877c8081dfc8b Fixes xamarin/maccore#2575.
Not at the moment, no, but we'll try to get it out asap. In the meantime you can use the packages I've linked to here. |
New commits in xamarin/maccore: * xamarin/maccore@b457f4bdee [xcode13.3] [mlaunch] Redirect stdout and stderr through a pty when launching in the simulator. Fixes xamarin#14834. Diff: https://github.com/xamarin/maccore/compare/59583606121bcc15bad6580f3b0ee6ced8d0bdeb..b457f4bdee9138998a3e875bfbca6993f73a47ff Fixes xamarin#14834. Backport of xamarin#2575.
Awesome, it is working again! Great job @rolfbjarne thanks! |
New commits in xamarin/maccore: * xamarin/maccore@29a1c1382e [mlaunch] Redirect stdout and stderr through a pty when launching in the simulator. Fixes xamarin#14834. * xamarin/maccore@749e84cb16 [mlaunch] Make minor improvements to Main.cs Diff: https://github.com/xamarin/maccore/compare/cf9f7409e9a79d0d0835863cc9f5afe77ba5e74a..29a1c1382e005e568b57d1b45e3877c8081dfc8b Fixes xamarin#14834. Backport of xamarin#14946.
New commits in xamarin/maccore: * xamarin/maccore@29a1c1382e [mlaunch] Redirect stdout and stderr through a pty when launching in the simulator. Fixes #14834. * xamarin/maccore@749e84cb16 [mlaunch] Make minor improvements to Main.cs Diff: https://github.com/xamarin/maccore/compare/cf9f7409e9a79d0d0835863cc9f5afe77ba5e74a..29a1c1382e005e568b57d1b45e3877c8081dfc8b Fixes #14834. Backport of #14946.
New commits in xamarin/maccore: * xamarin/maccore@b457f4bdee [xcode13.3] [mlaunch] Redirect stdout and stderr through a pty when launching in the simulator. Fixes #14834. Diff: https://github.com/xamarin/maccore/compare/59583606121bcc15bad6580f3b0ee6ced8d0bdeb..b457f4bdee9138998a3e875bfbca6993f73a47ff Fixes #14834. Backport of #14946.
New commits in xamarin/maccore: * xamarin/maccore@29a1c1382e [mlaunch] Redirect stdout and stderr through a pty when launching in the simulator. Fixes #14834. Diff: https://github.com/xamarin/maccore/compare/749e84cb162b945dafa85fd6dffe80a727a491cf..29a1c1382e005e568b57d1b45e3877c8081dfc8b Fixes #14834.
The recently released 15.10.0.1 has the same problem, we're working on getting updated packages. I'll post something here when they're done. |
* [d17-2] Bump maccore to get fix for xamarin/maccorexamarin/maccore#14834. New commits in xamarin/maccore: * xamarin/maccore@29a1c1382e [mlaunch] Redirect stdout and stderr through a pty when launching in the simulator. Fixes #xamarin/xamarin-macios@14834. * xamarin/maccore@749e84cb16 [mlaunch] Make minor improvements to Main.cs Diff: https://github.com/xamarin/maccore/compare/cf9f7409e9a79d0d0835863cc9f5afe77ba5e74a..29a1c1382e005e568b57d1b45e3877c8081dfc8b * [devops] Include d17-* as a trigger. Co-authored-by: Rolf Bjarne Kvinge <[email protected]>
@rolfbjarne Any estimate for when we might get a fix? I upgraded to VS2022 for Mac GA this morning and have had a nightmare trying to debug on iOS ever since, with the same 'error HE0042: Could not launch the app' error coming up more often than not (sometimes the debugger will just wait indefinitely until I start the app myself, then it's fine). |
@NiknakSi I thought I'd commented here with updated packages, but apparently I didn't. Try installing this package: xamarin.ios-15.10.0.5.pkg If you need to revert to the released stable version, you can just select the stable channel in VSMac and update Xamarin.iOS. |
That works great @rolfbjarne, thank you! |
Facing similar issue after upgrading visual studio for mac from 2019 to 2022. Facing the issue on old solution created from visual studio 2019. While solution created from VS 2022 is working well. Can anyone help what template change or any config I am missing in old solution that is causing error HE0042. |
@ksp90 you need to install an updated version of Xamarin.iOS. You don't give your version information, but my guess is that this package will fix the problem for you: #14834 (comment) |
@rolfbjarne thanks for your comment. I have installed all the updates. There are no pending updates from visual studio and xcode. I am not able to deploy the old solution. new solution created from vs 2022 working well in simulator! |
@ksp90 I would suggest opening a new issue, providing your full version information (https://github.com/xamarin/xamarin-macios/wiki/Diagnosis#visual-studio-for-mac), and the exact error output you get. |
I was having the exact same issue as @ksp90. Everything is updated to the latest version in VS and xcode, but my app originally build on 2019 was crashing with this error. I tried installing that package and it resolved the issue :) |
Y confirm this solves the issue. Thanks! |
Updated to latest VS 2022 Xamarin.iOS Same solution i'm able to deploy with VS 2019 version details: Xamarin.iOS Found thread pointing to the similar issue https://devblogs.microsoft.com/visualstudio/visual-studio-2022-for-mac-preview-7/#comment-26685 Update : xamarin.ios-15.10.0.5 works! When can we expect this in stable channel? |
@ksp90 Try installing this package: xamarin.ios-15.10.0.5.pkg If you need to revert to the released stable version, you can just select the stable channel in VSMac and update Xamarin.iOS. The stable channel should be updated with a build with the fix fairly soon. |
I am experiencing the same issue as described here #14560 (comment) by this user.
It appears that the main issue was closed, but I still have the issue after installing Xamarin.iOS Version 15.8.0.4
This is the only line which appears in the Application Output:
error HE0042: Could not launch the app 'skydrop.skydrop' on the device 'iOS 15.4 (19E240) - iPhone 13 Pro': Application launch for 'skydrop.skydrop' did not return a valid pid nor a launch error.
Steps to Reproduce
Expected Behavior
App builds and deploys, debugger is started as normal.
Actual Behavior
App builds and deploys, but debugger fails to start.
Environment
Build Logs
Example Project (If Possible)
https://github.com/SkyLabs-Innovation-Group/SkyDrop
The text was updated successfully, but these errors were encountered: