Error while obtaining UI hierarchy XML file:
com.android.ddmlib.SyncException: Remote object doesn't exist!
open your command prompt and type following codes.
adb kill-server
adb start-server
Then try to get Device ScreenShot from uiautomatorviewer.
That should work.
Related
Issue related to reported error #1121. Does the error can be avoided by any other means?
The suggested change is not working for me - conversion of bash script to bat.
Additional escape character can be added to avoid the error. My bad!
adb push --sync -p "issues.txt" "//sdcard" 2>&1
I'm testing an application using Android device. I'm using adb-tool to add some text to certain text fields in the application. Here is one example command:
adb shell input text "foofas"
With above command, I can add text to text field from command line. However, if I try to use that command in my Robot Framework script like this:
run process adb shell input text "foofas"
This above won't work anymore. In my understanding, command line command should be working. Error is something like this:
FileNotFoundError: [WinError 2] The system cannot find the file
specified
Any hints to me?
I am trying to use kinect v2 with turtlebot and am following this tutorial. Everything works fine except when I enter the command
roslaunch kobuki_slam kobuki_slam.launch
This gives an error namely
[ERROR] [1509445234.825467518]: Error connecting to Hokuyo: Could not open serial Hokuyo: /dev/ttyACM0 # 115200 could not open serial device.
Do you have any idea why I might be getting this error?
Thanks!
With the introduction of "Unified Logging" in macOS 10.12 Sierra, one can use the log command to view system log messages in a terminal. For example
sudo log stream
or
sudo log stream --process `pgrep -f /usr/local/bin/myprogram` --info --debug
or
log show --predicate 'process == "myprogram"' --last 1h --info --debug
Using the new "unified" Console.app, one can view system messages and can also view messages from connected iOS devices.
Is there any way to use the log command or any other command-line interface to view iOS device messages in Terminal, or to send them to a file? Or is Console.app the only way?
tl;dr: log collect —device
log collect --device lets you retrieve log archives that can be passed into log show --archive system_logs.logarchive with all the options you're familiar with.
Use log collect --device to automatically guess the device you're referring to.
log collect device-name="Maxs iPhone" or log collect device-udid=abcdefg to collect from a particular device.
log collect --output /your/path will save it to your specified file name or directory. If --output is not given, your output will be in the current directory as system_logs.logarchive.
Note: I occasionally get errors about log: failed to create archive: Device not configured (6) or log: failed to create archive: Connection reset by peer (54) but if I just rerun the command it'll sometimes work 🤷🏾♀️
You can, using third-party OSS tools.
https://libimobiledevice.org
These are available using homebrew. brew install libimobiledevice
You can discover available devices using idevice_id and then start streaming logs using idevicesyslog -n -u <duid>
I am using Xcode 6.1. And i need to run a UI automation script from jenkins as a post build action. The command that i use is shown below.
instruments -t $TRACETEMPLATE -w $DEVICE $APP_PATH -e UIASCRIPT $SCRIPT -e UIARESULTSPATH $RESULTS_PATH | grep "<" > test-reports/test-results.xml
When i run that the following error is thrown by jenkins.
Failed to authorize rights (0x1) with status: -60007.
2014-11-12 16:31:30.685 instruments[488:2607] -[XRSimulatorDevice prepareConnection:]: Unable to authorize simulated daemon (99637): 8
Instruments Trace Error : Target failed to run: Permission to debug com.test.app was denied.
Any help is much appreciated.
The user that invokes Instruments must have developer permissions. The user must be in the _developer group.
Security permissions allowing the user to access Instruments must be set. See the man page for DevToolsSecurity
The user must be logged in to a window server to use the simulator. How to do this will depend somewhat on your Jenkins and OS configuration for that user. In older versions of MacOS creating an SSH connection back into the machine and running Instruments through that connection typically worked. YMMV.
Note that any of the above steps escalates the rights for the Jenkins user, which was security implications.
I got an almost identical error message to yours, and it seemed to be because when Jenkins is launched as a Launch Daemon, it doesn't have access to the screen, even if you log in as "jenkins".
I found the solution from reading this discussion: https://issues.jenkins-ci.org/browse/JENKINS-14421
You can either launch Jenkins from Terminal with java -jar jenkins.war, or you can create a Launch Agent, which runs as the logged-in user and has access to the user's screen.
I achieved the latter solution by moving /Library/LaunchDaemons/org.jenkins-ci.plist to /Library/LaunchAgents/org.jenkins-ci.plist and removing the UserName key and value from the plist. Now Jenkins doesn't start automatically when I boot the machine, but it does start when I log into the desktop, which is required for running UI Automation tests anyway.
It appears that Jenkins still can't actually launch the Simulator app, but if Simulator is already running, the UI Automation scripts proceed just fine.
I also got this error message. Moving service from LaunchDaemons to LaunchAgents didn't solve the problem. My solution was as following:
remove the service by deleting /Library/LaunchAgents/org.jenkins-ci.plist file
create an iOS application using Automator tool. (Which I think exists by default):
I chose "Library" -> "Utilities" -> "Shell Script".
Enter the content of /Library/Application Support/Jenkins/jenkins-runner.sh.
Put export JENKINS_HOME=/path/to/jenkins at the top.
Save the app somewhere
Go to Preferences -> Users & Groups -> choose your user -> Add the saved app.
This way, jenkins is run as an application after login and it has all the privilages of any other application.