Code Monkey home page Code Monkey logo

Comments (13)

Dan-Maor avatar Dan-Maor commented on May 24, 2024 1

@DanKovt You can either use the the MacOS Console app and retrieve the device log by selecting it from the left pane and then click on "Start Streaming", or by using the idevicesyslog utility from libimobiledevice.

from appium.

mykola-mokhnach avatar mykola-mokhnach commented on May 24, 2024

Error getting main window kAXErrorServerNotFound

Unfortunately this error is coming from xctest itself and we cannot do anything to change that behaviour. Try to google it, maybe there are some good advices for possible workarounds elsewhere.

from appium.

DanKovt avatar DanKovt commented on May 24, 2024

@mykola-mokhnach I've seen all these issues, but maybe you can tell more about problem itself, so we at lease can fix it from our side please? Because we can't understand what exactly cause this issue.

from appium.

mykola-mokhnach avatar mykola-mokhnach commented on May 24, 2024

Unfortunately I also don't know exactly. The exception is thrown by xctest when it tries to take a snapshot of the app accessibility tree. There must be something preventing it from doing that. Apple did not make it easy - XCTest is a closed-source framework, so only their engineers might know more details.
I would also try to look for device logs, maybe xctest leaves some useful traces there.

from appium.

mykola-mokhnach avatar mykola-mokhnach commented on May 24, 2024

@Dan-Maor Do you have any ideas on the above?

from appium.

Dan-Maor avatar Dan-Maor commented on May 24, 2024

This sounds similar to an issue I encountered before where testmanagerd fails to write automation information to the standardUserDefaults because the daemon responsible for the user defaults hanged. This is usually caused by stressing devices for long periods of time by repeatedly uninstalling, reinstalling and starting an automation session against the freshly installed application. This does not happen with every app and the root cause was very challenging to understand at the time. In any case, the only fully valid solution for it was a full device reboot when the issue occurs.

@DanKovt in order to confirm, will you be able to provide a full syslog of a full session creation from a device in the faulty state?

from appium.

DanKovt avatar DanKovt commented on May 24, 2024

@Dan-Maor can you provide instructions how I can do this please?

Also, I've tried full device reboot and app reinstall, but it didn't help as well.

from appium.

DanKovt avatar DanKovt commented on May 24, 2024

@Dan-Maor Attaching logs for my iPhone from MacOS Console as you requested.
logs.txt

from appium.

Dan-Maor avatar Dan-Maor commented on May 24, 2024

Thanks @DanKovt . While the log does not show the entire session creation sequence (possibly filtered to only show error level), the first line indicates that this is the same scenario I’ve encountered.

Not updating lastKnownShmemState in CFPrefsPlistSource<0x6f6c0a440> (Domain: com.apple.Accessibility, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: Yes): 113 -> 406

testmanagerd is unable to write a preference value, suggesting that cfprefsd might be in a hanged state, and thus cannot write the relevant properties to the standardUserDefaults of the application in order to enable automation access.

Like I mentioned previously, the only solution we were able to find was to reboot the device in question when it gets to such a state. Perhaps a factory reset could help as well, but I cannot guarantee that it will resolve the problem permanently.

from appium.

mykola-mokhnach avatar mykola-mokhnach commented on May 24, 2024

Closed as third party issue

from appium.

DanKovt avatar DanKovt commented on May 24, 2024

Hi guys (@Dan-Maor @mykola-mokhnach), our dev team figured out what caused the issue! . You were right, the issue lies with an third library used in our project.

Since we work with react-native, we sometimes need components written in native code that are bridged into JS. This library allowed us to avoid writing bridge classes in Objective-C, enabling us to directly implement such components in Swift. Everything stopped working due to adapting the project for building with Xcode 15.

In short, the problem was caused by use of the class_getClassMethod method. By switching from it to class_copyMethodList, everything started working again πŸŽ‰πŸŽ‰

from appium.

mykola-mokhnach avatar mykola-mokhnach commented on May 24, 2024

Thanks for the update. I hope it would be useful to other people facing similar issues

from appium.

benzman81 avatar benzman81 commented on May 24, 2024

In short, the problem was caused by use of the class_getClassMethod method. By switching from it to class_copyMethodList, everything started working again πŸŽ‰πŸŽ‰

Hi, we also have the problem in a react native app. What 3rd party library was it and how did you find out?

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.