Giter Club home page Giter Club logo

Comments (14)

mykola-mokhnach avatar mykola-mokhnach commented on June 13, 2024 1

Google only points to https://forums.developer.apple.com/forums/thread/653570 and then to https://stackoverflow.com/questions/34231587/xcode-ui-testing-on-travis-for-osx-with-xcode-helper-accessibility

In the above case the issue was that the Xcode helper app did not have accessibility access. Maybe verify that on your machine

from appium.

d4v1dk0n7 avatar d4v1dk0n7 commented on June 13, 2024 1

Hi guys,

Finally I was able to make it work :)
These are the steps I've followed to solve the issue:

1.- Delete drivers, plugins, appium, nodejs
2.- Reinstall nodejs in my users's home (without sudo)
3.- Reinstall appium, drivers, plugins

So yes, it was a permissions issue which was driving me crazy...

Thank you all for your help @KazuCocoa @mykola-mokhnach @eglitise !!!!!
Really apreciated!

from appium.

mykola-mokhnach avatar mykola-mokhnach commented on June 13, 2024

Please provide the full server log as a gist with xcodebuild logging enabled.
I don't see any errors in the above snippet. It might be it takes too long to build WebDriverAgent on your machine.
You may workaround it by increasing the value of wdaLaunchTimeout capability or prebuilding it before running tests.

from appium.

d4v1dk0n7 avatar d4v1dk0n7 commented on June 13, 2024

Hi @mykola-mokhnach,

Thanks for your reply!
Now I'm also using this capabilities as you suggested but it's still failing...

"appium:wdaLaunchTimeout": 6000000,
"appium:showXcodeLog": true

Here you have the gist with the logs:
https://gist.github.com/d4v1dk0n7/198e00d628633cd1f621d0c3eef0ee01

Thanks!

from appium.

mykola-mokhnach avatar mykola-mokhnach commented on June 13, 2024
2024-04-18 11:19:42:752 - [Xcode] 
2024-04-18 11:19:42:752 - [Xcode] Test session results, code coverage, and logs:
2024-04-18 11:19:42:752 - [Xcode] 	/Users/user/Library/Developer/Xcode/DerivedData/WebDriverAgent-FA217C72-D26E-40D9-A362-FBDB35146E12/Logs/Test/Test-WebDriverAgentRunner-2024.04.18_11-17-51-+0200.xcresult
2024-04-18 11:19:42:752 - [Xcode] 
2024-04-18 11:19:42:752 - [Xcode] 
2024-04-18 11:19:42:752 - [Xcode] Testing failed:
2024-04-18 11:19:42:752 - [Xcode] 	WebDriverAgentRunner-Runner (7287) encountered an error (The test runner failed to initialize for UI testing. (Underlying Error: Timed out while loading Accessibility.))
2024-04-18 11:19:42:752 - [Xcode] 
2024-04-18 11:19:42:752 - [Xcode] ** TEST EXECUTE FAILED **
2024

This seems to be some internal Xcode bug

I don't think there is anything we could help there. Maybe try to run your tests on a different machine

from appium.

d4v1dk0n7 avatar d4v1dk0n7 commented on June 13, 2024

Hi @mykola-mokhnach,

So what I have to do? Downgrade xcode version maybe?
I don't have the possibility of running the tests in another machine...

from appium.

KazuCocoa avatar KazuCocoa commented on June 13, 2024

Possibly downgrading Xcode would help. https://developer.apple.com/download/all/ let you find an arbitrary version

from appium.

d4v1dk0n7 avatar d4v1dk0n7 commented on June 13, 2024

Hi @KazuCocoa,

Thanks for your answer.
I've downgraded xcode to version 14.3.1 and tried again, but no luck... I'm getting the exact same error...

Right now I'm just trying to inspect the app with appium inspector, these are the capabilities being used:

{
"platformName": "ios",
"appium:app": "/Users/user/repos/Mobile_Testing_Project/Company.QA.Core/3-Tests/Company.QA.Tests.Product/apps/ios/test.app",
"appium:automationName": "XCUITest",
"appium:enforceAppInstall": true,
"appium:showXcodeLog": true,
"appium:autoAcceptAlerts": true,
"appium:wdaLaunchTimeout": 600000
}

I can see that the test app and the webdriver agent are being installed successfully in the simulator but nothing more happens...

Here you have the logs:
https://gist.github.com/d4v1dk0n7/2c83a70d57d42f9ae6d304347c4a4cc8

I've tried everything, I'm completely lost...
I don't know what else to try...

Any help would be really appreciated.
Thanks!

from appium.

d4v1dk0n7 avatar d4v1dk0n7 commented on June 13, 2024

I've granted total access to xcode helper in the machine, but I'm still gettins the same errors...

from appium.

KazuCocoa avatar KazuCocoa commented on June 13, 2024

Hm, the error message itself is probably only environment related...?

2024-04-19 20:27:41:135 - [Xcode] 2024-04-19 20:27:41.135099+0200 WebDriverAgentRunner-Runner[20938:455024] Failed to initialize for UI testing: Error Domain=com.apple.dt.XCTest.XCTFuture Code=1000 "Timed out while loading Accessibility." UserInfo={NSLocalizedDescription=Timed out while loading Accessibility.}

https://github.com/orgs/community/discussions/68807
https://stackoverflow.com/questions/48013914/xcode-9-xcodebuild-error-ui-tests-not-running-timed-out-waiting-for-ax-load

from appium.

d4v1dk0n7 avatar d4v1dk0n7 commented on June 13, 2024

Hi,

When you say "environment related", do you mean something related with some kind of permissions issue, or something like that?
I execute all the apps and commands in terminal using "sudo" to have admin permissions...
Anyway, I don't know if it's exactly the same execute commands with "sudo" or execute the commands as root directly...

from appium.

eglitise avatar eglitise commented on June 13, 2024

You should not run Appium with sudo.

from appium.

d4v1dk0n7 avatar d4v1dk0n7 commented on June 13, 2024

You should not run Appium with sudo.

Why not?

from appium.

KazuCocoa avatar KazuCocoa commented on June 13, 2024

Generally, it could generate files/directories with unexpected file permissions. Some may fail. I'm not sure xcuitest runs without issues with sudo privileges.

from appium.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.