-
Notifications
You must be signed in to change notification settings - Fork 264
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
[ios_xctestrun_runner] codesigning/entitlements blockers #1912
Comments
So I assume that you are running on device? Or even using Network.framework on sim crashes? Feel free to assign to me. Ideally we have a test case for this scenario as well |
It happens on the simulator. We probably crash in our test because we assume that server always starts. I think the underlying issue is NWListener can't bind to the port, from within XTRunner on the simulator. I will try and post a minimal reproducer later. |
@keith you can assign to me, should be able to take a look today |
Attempts to adhoc code sign the runner app itself and its bundled frameworks during UI Testing to resolve [ios_xctestrun_runner] codesigning/entitlements blockers bazelbuild#1912
@iainsmith Can you check out #1932 and see if that works for you? |
Hey @maxwellE I tried this out locally, but I'm hitting the same error where we can't start the NWListener. I can see these lines in the log,
|
@iainsmith Can you push up a small repro to this branch for me to test with? |
I am starting to investigate this again |
@iainsmith I am ready to test again with #1968 |
Adds the necessary setup to codesign the runner and places artifacts in expected locations to support on device running of ui tests Related #1912 Attached is an image of a test running on my phone <img width="686" alt="Screenshot 2023-05-18 at 9 25 56 PM" src="https://github.com/bazelbuild/rules_apple/assets/566328/21d21225-8fa9-4e75-bbce-e7176f29dde3"> https://github.com/bazelbuild/rules_apple/assets/566328/b9d52ae1-328a-41e4-b2dd-b4dd76ed544c
Fixed in 2.4.0 |
Summary
ios_xctestrun_runner doesn't match codesigning/entitlements from Xcodes XCTRunner.app, which blocks certain API's (in our case a Network.framework based HTTP Server). This Apple forums post, seems to indicate this as the likely cause.
More details
We tried migrating to the new ios_xctestrunner for our UITests and hit this issue. We did a bit of digging, and think it's related to the codesigning/entitlements. Our UITest try to start a (Network.framework) based MockServer, which fails to launch.
There is a previous issue #504 about moving the codesigning responsibilities outside of the test runner from a couple of years ago.
I was wondering if the test runner can call
tools/codesigningtool.py
or if it's better to just shell out tocodesign -f
directly in theios_xctestrun_runner.template.sh
cc @mattrobmattrob
The text was updated successfully, but these errors were encountered: