Error while obtaining ui hierarchy xml file

Failed to get device screenshot — Pixel 2 XL #46 Comments First off, I absolutely love this project. I really appreciate the work you’ve put into it. I was using it on a Pixel XL (updated to 8.0) up until yesterday, and it was working fine. Then, however, I switched to a Pixel 2 […]

Содержание

  1. Failed to get device screenshot — Pixel 2 XL #46
  2. Comments
  3. Русские Блоги
  4. «Android uiautomatorviewer не может делать скриншоты»
  5. «Android uiautomatorviewer не может делать скриншоты»
  6. Интеллектуальная рекомендация
  7. IView CDN Загрузка значка шрифта нормальная, а значок шрифта не может быть загружен при локальной загрузке JS и CSS
  8. Критическое: ошибка настройки прослушивателя приложения класса org.springframework.web.context.ContextLoaderLis
  9. 1086 Не скажу (15 баллов)
  10. Pandas применяют параллельный процесс приложения, многоядерная скорость очистки данных
  11. PureMVC Learning (Tucao) Примечания

Failed to get device screenshot — Pixel 2 XL #46

First off, I absolutely love this project. I really appreciate the work you’ve put into it.

I was using it on a Pixel XL (updated to 8.0) up until yesterday, and it was working fine. Then, however, I switched to a Pixel 2 XL, and the following happens.

If I set the screensize manually (to ), I get:

14:04:12 [Screen Capturer] INFO ScreenCaptureRunnable — Failed to get device screenshot 02:04:13 E/Screenshot: Unsupported protocol: 2 14:04:13 [Screen Capturer] INFO ScreenCaptureRunnable — Failed to get device screenshot 02:04:13 E/Screenshot: Unsupported protocol: 2 14:04:13 [Screen Capturer] INFO ScreenCaptureRunnable — Failed to get device screenshot 02:04:13 E/Screenshot: Unsupported protocol: 2 14:04:13 [Screen Capturer] INFO ScreenCaptureRunnable — Failed to get device screenshot 02:04:13 E/Screenshot: Unsupported protocol: 2 14:04:13 [Screen Capturer] INFO ScreenCaptureRunnable — Failed to get device screenshot 02:04:13 E/Screenshot: Unsupported protocol: 2 14:04:13 [Screen Capturer] INFO ScreenCaptureRunnable — Failed to get device screenshot 02:04:13 E/Screenshot: Unsupported protocol: 2 14:04:13 [Screen Capturer] INFO ScreenCaptureRunnable — Failed to get device screenshot 02:04:13 E/Screenshot: Unsupported protocol: 2 14:04:13 [Screen Capturer] INFO ScreenCaptureRunnable — Failed to get device screenshot 02:04:13 E/Screenshot: Unsupported protocol: 2 14:04:13 [Screen Capturer] INFO ScreenCaptureRunnable — Failed to get device screenshot 14:04:14 [AWT-EventQueue-0] INFO AndroidScreencastApplication — Stopping application 14:04:14 [Screen Capturer] WARN ScreenCaptureRunnable — IO Exception happened while getting device screenshot. Will try again in 100 ms. 14:04:14 [Screen Capturer] INFO ScreenCaptureRunnable — Failed to get device screenshot 14:04:14 [Screen Capturer] INFO ScreenCaptureRunnable — Stopping screen capturing 14:04:15 [Thread-1] INFO AndroidScreencastApplication — Stopping application

If I leave the screen size undefined (not set in app.properties) I get:

14:05:29 [Screen Capturer] INFO ScreenCaptureRunnable — Failed to get device screenshot 14:05:29 [Screen Capturer] WARN ScreenCaptureRunnable — ADB Command was rejected. Will try again in 100 ms. 14:05:29 [Screen Capturer] INFO ScreenCaptureRunnable — Failed to get device screenshot 14:05:29 [Screen Capturer] WARN ScreenCaptureRunnable — ADB Command was rejected. Will try again in 100 ms. 14:05:29 [Screen Capturer] INFO ScreenCaptureRunnable — Failed to get device screenshot 14:05:29 [Screen Capturer] WARN ScreenCaptureRunnable — ADB Command was rejected. Will try again in 100 ms. 14:05:29 [Screen Capturer] INFO ScreenCaptureRunnable — Failed to get device screenshot 14:05:29 [Screen Capturer] WARN ScreenCaptureRunnable — ADB Command was rejected. Will try again in 100 ms. 14:05:29 [Screen Capturer] INFO ScreenCaptureRunnable — Failed to get device screenshot 14:05:29 [Screen Capturer] WARN ScreenCaptureRunnable — ADB Command was rejected. Will try again in 100 ms. 14:05:29 [Screen Capturer] INFO ScreenCaptureRunnable — Failed to get device screenshot 14:05:29 [Screen Capturer] WARN ScreenCaptureRunnable — ADB Command was rejected. Will try again in 100 ms. 14:05:30 [Screen Capturer] INFO ScreenCaptureRunnable — Failed to get device screenshot 14:05:30 [Screen Capturer] WARN ScreenCaptureRunnable — ADB Command was rejected. Will try again in 100 ms.

Controls via buttons still work. it’s just the screenshot capability which isn’t.

Any ideas how to fix?

The text was updated successfully, but these errors were encountered:

Источник

Русские Блоги

«Android uiautomatorviewer не может делать скриншоты»

«Android uiautomatorviewer не может делать скриншоты»

Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Permission denied

У моего собственного приложения все еще есть проблемы. Это также рухнуло.

uiautomator предоставляет соответствующие команды для вывода информации об интерфейсе.
Напишите соответствующий файл сценария и выполните его.
Дайте сценарию имя для простоты использования.

Интеллектуальная рекомендация

IView CDN Загрузка значка шрифта нормальная, а значок шрифта не может быть загружен при локальной загрузке JS и CSS

Используйте iview, чтобы сделать небольшой инструмент. Чтобы не затронуть другие платформы, загрузите JS и CSS CDN на локальные ссылки. В результате значок шрифта не может быть загружен. Просмо.

Критическое: ошибка настройки прослушивателя приложения класса org.springframework.web.context.ContextLoaderLis

1 Обзор Серверная программа, которая обычно запускалась раньше, открылась сегодня, и неожиданно появилась эта ошибка. Интуитивно понятно, что не хватает связанных с Spring пакетов, но после удаления п.

1086 Не скажу (15 баллов)

При выполнении домашнего задания друг, сидящий рядом с ним, спросил вас: «Сколько будет пять умножить на семь?» Вы должны вежливо улыбнуться и сказать ему: «Пятьдесят три». Это.

Pandas применяют параллельный процесс приложения, многоядерная скорость очистки данных

В конкурсе Algorith Algorith Algorith Algorith Algorith 2019 года используется многофункциональная уборка номера ускорения. Будет использовать панды. Но сама панда, кажется, не имеет механизма для мно.

PureMVC Learning (Tucao) Примечания

Справочная статья:Введение подробного PrueMVC Использованная литература:Дело UnityPureMvc Основная цель этой статьи состоит в том, чтобы организовать соответствующие ресурсы о PureMVC. Что касается Pu.

Источник

The Genymotion emulator starts with the following error:

Unable to start the virtual device.The virtual device got no IP address.The VirtualBox DHCP server has not assigned an IP address to the virtual device.To find a solution,please start VirualBox.

Solutions.

1. Run Genymotion as administrator.

I followed the Internet to set up vm virtualBox network, network card, DHCP, etc. to no effect, so I tried to start the virtual machine to view the contents of the error report, and found that the computer is not set up virtualization caused by the Genymotion but reported a network problem, I can only say that it is better to consider the problem or look at the root reliable.

2, vm virtualBox normal start the simulator, check the specific error message

The simulator reported the following errors.

Enter the computer boss, set the virtualization, and then select the version of the emulator, you can solve

Genymotion download emulator finished, prompt unable to create virtual device:failed to import ova file

1. run Genymotion as administrator.

2. Delete the file.

uiautomatorviewer.bat opens with the following error:

Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn’t exist!

Solution:

Close appium to recapture the app interface.

appium 1.4 with desired_caps[‘unicodeKeyboard’] = True reports an error because of a duplicate installation of Unicode-IME-debug.apk reports the following error.

selenium.common.exceptions.SessionNotCreatedException: Message: A new session could not be created. (Original error: Command failed: C:WINDOWSsystem32cmd.exe /s /c “F:xxxandroid-sdk-windowsplatform-toolsadb.exe -s P1QRMW6136 install “F:xxxAppiumnode_modulesappiumbuildunicode_ime_apkUnicodeIME-debug.apk””
Failed to install F:xxxAppiumnode_modulesappiumbuildunicode_ime_apkUnicodeIME-debug.apk: Failure [INSTALL_FAILED_ALREADY_EXISTS: Attempt to re-install io.appium.android.ime without first uninstalling

Solution.

cmd can uninstall adb install io.appium.android.ime

appium1.4 does not support android version 7 error.

Attempt to re-install io.appium.settings without first uninstalling

Solution.

Solution.
1. Modify C:Program Files (x86)Appiumnode_modulesappiumlibdevicesandroidandroid.js file to the following

2. Modify C:Program Files (x86)Appiumnode_modulesappiumnode_modulesappium-adblibadb.js file to the following

this.shell_grep("ps", name, function (err, stdout) {
 
     if (err) {
 
     logger.debug("No matching processes found");
 
     return cb(null, []);
 
    }
 
ADB.prototype.shell_grep = function (cmd, grep, cb) {
 
    if (cmd.indexOf('"') === -1) {
    cmd = '"' + cmd + '"';
    }
 
   var execCmd = 'shell ' + cmd + '| grep ' + grep;
 
   this.exec(execCmd, cb);
 
   };

appium run script, start application, pop up permission or other pop-up box: appium

solutions:

from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC

driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
# Determine if there is a permission popup, based on keywords
for i in range(5):
    alertWin = ("xpath", "//*[@text='deauthorize']")
    try:
        e = WebDriverWait(driver, 1, 0.5).until(EC.presence_of_element_located(alertWin ))
        e.click()
    except:
        pass

java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000

The solution:

Check if the Activity is written incorrectly, self.desired_caps[‘appActivity’] = ‘com.xxx.xxx’

Genymotion install app error, emulator can’t drag and drop installation and Genymotion “INSTALL_FAILED_CPU_ABI_INCOMPATIBLE” errors; INSTALL_FAILED_ NO_MATCHING_ABIS

Solution:

Download Genymotion-ARM-Translation_v1.1.zip; download address

cmd install command.

adb push C:UsersASDownloadsGenymotion-ARM-Translation_v1.1.zip /sdcard/Download

adb shell sh /system/bin/flash-archive.sh /sdcard/Download/Genymotion-ARM-Translation_v1.1.zip

Just close the emulator and restart it

Similar Posts:

I am testing my app with adb, but i get this error when i execute «dump view hierarchy for uiautomator»:

Error obtaining UI hierarchy Error while obtaining UI hierarchy XML
file: com.android.ddmlib.SyncException: Remote object doesn’t exist!

My adb version is 1.0.36 and my android version is 6.0.1.

This error comes launched only when in the interface there is a dynamic element that is in motion.

thank you in advance.

12 Answers

The best way is to kill the adb server and start it again.

  • sudo adb kill-server
  • sudo adb start-server

This will do the trick.

Currently your UI needs to be idle (as in no Accessibility Events sent) for at least 1000ms before the AccessibilityService will be able to produce the UI hierarchy dump.

If you would try to run adb shell uiautomator dump it would give you the ERROR: could not get idle state.

Even though it’s late I’m giving my observation here. Even I got this issue. Before taking the screen shot from UI Automator terminate the appium server connection. Then try to capture screenshot. It works fine.

I realise this is an old post. But I’ve noticed the same issue when I’ve use uiautomator to control the simulator for automation testing. It seems that the uiautomatorviewer does not connect to the emulator to take a screenshot after the emulator has been controlled by the uiautomator.

I found that running adb reconnect allows the uiautomatorviewer to take screenshots again.

Try Restarting your device, which worked in my case.

The below command executed from command line worked for me;

adb shell am force-stop com.android.ddmlib

in the device or emulator :

  1. display the applications opened , and close them one by one.

  2. refresh monitor.

    It should now be able to and get the hierarchies, as if one of the apps opened was «obfuscating» the parsing.

Close other AccessibilityService in your phone please.

If you are getting this error

enter image description here

This means your UI Automator is got disconnected, to regain the connection, you can open the new terminal no need to worry about the location on the terminal.

Type the command

adb reconnect

and try again to take a screenshot it should work.

Rebooting the device worked for me.

I have tried all the above steps and none of them did not work. The reason being I have tried to run the uiautomatorviewer after opening the app using Appium. Whenever I manually open my app on the device and then run the uiautomatorviewer works perfectly well. Just sharing my experience. Thanks

Before taking the screen shot from «uiautomatorviewer» please terminate the appium server connection by using ctrl+C command. Then try to capture screenshot. It works fine.

  1. Нажмите Device ScreenShot Dump, чтобы сообщить об ошибке.
Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn't exist!
Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn't exist!

решение:

1.1 Повторно подключите телефон → выберите использование USB → передать файлы (MTP)
1.2. Запрос «Разрешаете ли вы отладку» → Разрешить
1.3 Командная строка → adb devices → Проверить, есть ли устройство:

C:UserAsa> adb devices
List of devices attached
adb server version (31) doesn't match this client (40); killing...
* daemon started successfully
2956549f7d23    device

1.4 Open UI Automator Viewer

  1. Ошибка отчета Chrome при вызове телефона Android
    ошибка:
selenium.common.exceptions.SessionNotCreatedException: Message: A new session could not be created. (Original error: An unknown server-side error occurred while processing the command. (Original error: unknown error: Device 2956549f7d23 is not online
  (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 10.0 x86_64)))

решение:

  1. Посмотреть версию Chrome для телефона
  2. Загрузите версию Chromedriver, соответствующую Chrome
    http://chromedriver.storage.googleapis.com/index.html
  3. Замени Chromedriver под appium, мой путь следующий:
# старая версия: 
C:Program Files (x86)Appiumnode_modulesappiumnode_modulesappium-chromedriverchromedriverwin

 # новая версия
C:Program Files (x86)Appiumresourcesappnode_modulesappiumnode_modulesappium-chromedriverchromedriverwin
  1. Вы можете найти элемент поля ввода кода подтверждения, но после нажатия кнопки «получить код подтверждения» при вводе кода подтверждения появляется сообщение об ошибке.
input_auth_code.set_text(vercode)

ошибка:

# Невозможно получить элемент
selenium.common.exceptions.NoSuchElementException: Message: UiSelector[INSTANCE=0, RESOURCE_ID=com.xike.yipai:id/edt_login2_verifi_code]

 # Или тайм-аут
selenium.common.exceptions.TimeoutException: Message: 

решение:
Перед получением кода подтверждения установите фокус для поля ввода кода подтверждения.

    # Установить фокус
    input_auth_code.set_text('')
         # получить код подтверждения
    vercode = get_vercode()
         # Введите код подтверждения 
    input_auth_code.set_text(vercode)

Понравилась статья? Поделить с друзьями:
  • Error while loading the sample library waves
  • Error while loading the game rising world
  • Error while loading shared libraries nuke83 so
  • Error while loading shared libraries libxt so 6
  • Error while loading shared libraries libxss so 1 cannot open shared object file