WebPagetest Forums

Full Version: Mobile agents issues
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I'm trying to set up mobile agents and have following issues so far. Please help. Thanks a lot!

Basically, I followed this documentation.
https://sites.google.com/a/webpagetest.o...gent/setup

1. Android phone.
Everything works fine except for the filmstrip and video. As per the documentation above, I installed ImageMagick and ffmpeg is included already on the host. I'm wondering if ffmpet is required on the server side or the agent side. I also tried using ffmpeg 1.1.3 and it doesn't work. There's no file found under /video_1/.

2. iOS
(1) It mentions "work in progress" still in the documentation. Is it still workable? Is there any more recent documentation?
(2) In the 2nd step, Install OpenSSH, does it mean to create a private key under ~/.ssh/id_dsa_ios on the device and public key on the host? On the device, which path should the file be put to? I mean which user's home directory. Is it "root"? Should the user name be the same as the one on the host?
(3) Should the host and the device be in the same network? Does the host connect to the device via network or USB?
(02-29-2016 06:22 PM)sally Wrote: [ -> ]I'm trying to set up mobile agents and have following issues so far. Please help. Thanks a lot!

Basically, I followed this documentation.
https://sites.google.com/a/webpagetest.o...gent/setup

1. Android phone.
Everything works fine except for the filmstrip and video. As per the documentation above, I installed ImageMagick and ffmpeg is included already on the host. I'm wondering if ffmpet is required on the server side or the agent side. I also tried using ffmpeg 1.1.3 and it doesn't work. There's no file found under /video_1/.

If you are running 2.19 or Trunk they are needed agent-side. If you are running an earlier version they can be server-side as well but agent-side scales better (and you need to pass "--processvideo yes" with the wptdriver command-line).

You can test if things are configured correctly on the agent by going into the js/lib/video directory and trying "python visualmetrics.py --check" which will check the dependencies.

Quote:2. iOS
(1) It mentions "work in progress" still in the documentation. Is it still workable? Is there any more recent documentation?

It is workable and that is the most recent documentation and matches what I did bringing them online on the public instance. iOS is extremely painful though because it requires a dedicated Mac OSX host for every single device if you want to be able to do video capture.

Quote: (2) In the 2nd step, Install OpenSSH, does it mean to create a private key under ~/.ssh/id_dsa_ios on the device and public key on the host? On the device, which path should the file be put to? I mean which user's home directory. Is it "root"? Should the user name be the same as the one on the host?

It means on the host and you need to install the public key into the authorized_keys on the device (for root). The agent is hard-coded to ssh to the iPhone using the private key in ~/.ssh/id_dsa_ios

Quote: (3) Should the host and the device be in the same network? Does the host connect to the device via network or USB?

Network doesn't matter. The host connects to the phone over USB.
Hi Patrick,

Thanks so much for your detailed answer.

Regarding the video processing issue, I tried and got the following issues.
------------------
Node.js - v4.3.1
Python 2.7
Pillow -2.7
ImageMagick - 6.9.3-5 Q16
FFMPEG - tried both the version 2.8.4 which is included in ImageMagick and version 1.13 and the result looks the same.
------------------

1. Version 2.19 - Filmstrip is generated though video is not available yet. However, I'm getting "browser crashed" error as below. Then the test ended and no repeat view. The first view result looks good. Any idea on it?

On the UI, I see this error message.
-------------------
First View
(Test Error: Browser Crashed)
(Error: 99995)
--------------------

And On the agent command output, I see this error message:
-----------------
A Feb_29_13:37:24.491 C:\webpagetest_2.19\mobile\src\wpt_client.js:699 Client.fi
nishRun_ : Failed run 1a/1 of finished job 160301_YF_A: Browser Crashed
E Feb_29_13:38:26.838 C:\webpagetest_2.19\mobile\src\wd_server.js:1401 WebDriver
Server.<anonymous> : Test failed: Browser Crashed
----------------

The Config check result:
-----------------
ffmpeg: OK
convert: OK
compare: OK
Pillow: OK
SSIM: FAIL
------------------

2. I also tried version 2.18. With the same installation on the same host, I don't see the above "browser crashed" error but the filmstrip and video are not generated. The config check looks good.
-----------------
ffmpeg: OK
convert: OK
compare: OK
Pillow: OK
------------------
I tried the iphone agent and got the following error. Also attached please find the console out. Any idea?
[attachment=576]

E Mar_07_04:19:28.879 process_utils.js:371 Socket.<anonymous> : /Users/builder/wpt/agent/js/lib/ios/video/xrecord STDERR: 2016-03-07 04:19:28.877 xrecord[1931:13883] Timed out waiting to acquire lock
E Mar_07_04:19:39.001 wd_server.js:210 WebDriverServer.<anonymous> : Exception from "Run test": Error: Connect DevTools
Wait timed out after 10003ms
A Mar_07_04:19:39.916 wpt_client.js:699 Client.finishRun_ : Finished run 1a/1 of job 160307_PK_27
E Mar_07_04:22:47.325 process_utils.js:371 Socket.<anonymous> : /Users/builder/wpt/agent/js/lib/ios/video/xrecord STDERR: 2016-03-07 04:22:47.323 xrecord[2054:14878] Breaking existing lock
E Mar_07_04:22:50.413 process_utils.js:371 Socket.<anonymous> : /Users/builder/wpt/agent/js/lib/ios/video/xrecord STDERR: 2016-03-07 04:22:50.413 xrecord[2054:14878] Starting capture....
E Mar_07_04:22:50.440 process_utils.js:371 Socket.<anonymous> : /Users/builder/wpt/agent/js/lib/ios/video/xrecord STDERR: 2016-03-07 04:22:50.440 xrecord[2054:14878] Recording started. Hit ctrl-C to stop.
E Mar_07_04:22:50.548 process_utils.js:371 Socket.<anonymous> : /Users/builder/wpt/agent/js/lib/ios/idevice/Darwin x86_64/ios_webkit_debug_proxy STDERR: Could not connect to lockdownd. Exiting.: No such file or directory
Unable to attach 06717e5a2e7fde6e6f2605c4401848aaf69ef8f8 inspector
E Mar_07_04:23:00.574 wd_server.js:210 WebDriverServer.<anonymous> : Exception from "Run test": Error: Connect DevTools
Wait timed out after 10025ms
E Mar_07_04:23:00.621 wd_server.js:210 WebDriverServer.<anonymous> : Exception from "Capture Screen Shot": Error: '/Users/builder/wpt/agent/js/lib/ios/idevice/Darwin x86_64/idevicescreenshot' -u 06717e5a2e7fde6e6f2605c4401848aaf69ef8f8 failed, code 255, stdout[86] No device found with udid 06717e5a2e7fde6e6f2605c4401848aaf69ef8f8, is it plugged in?
A Mar_07_04:23:06.036 wpt_client.js:699 Client.finishRun_ : Finished run 1b/1 of finished job 160307_PK_27
Filmstrip being available means the agent is fine. The video generation itself is a server config issue and it needs ffmpeg on the server to render the videos (sorry, forgot about that bit). If you go to http://<server>/install does it pass the ffmpeg checks on the server?

For the iOS agent, what version of OSX are you running and are you only running one agent at a time? The xrecord lock should only come into play when multiple instances are running at the same time (or maybe if it is running on an earlier version of OSX than what has been tested).
(03-08-2016 12:02 AM)pmeenan Wrote: [ -> ]Filmstrip being available means the agent is fine. The video generation itself is a server config issue and it needs ffmpeg on the server to render the videos (sorry, forgot about that bit). If you go to http://<server>/install does it pass the ffmpeg checks on the server?

For the iOS agent, what version of OSX are you running and are you only running one agent at a time? The xrecord lock should only come into play when multiple instances are running at the same time (or maybe if it is running on an earlier version of OSX than what has been tested).

Thanks Patrick for your reply.

For iphone, I'm using iPhone 6 on ios 9 and osx 10.10.5.

For Android, if I use the latest version 2.19, I got the browser crash error. 2.18 is working fine.

[attachment=578]
Focusing on the 2.19 browser crash for right now, can you run the agent with "-m debug" and send me the output? Feel free to email it to pmeenan@webpagetest.org if you'd rather not post it.

I don't think 2.18 had the crash detection but it's also possible that something is unhappy with the trace collection that is triggering the crash (I have seen the blink.user_timing trace category crash desktop chrome and I'm wondering if it is also crashing your test case). 2.18 Also didn't have the same end condition and would not wait for network activity to stop so it may have been stopping the tests earlier.

Does it crash when you run the same URL on the public WebPageTest agents (Moto G)?
(03-09-2016 12:00 AM)pmeenan Wrote: [ -> ]Focusing on the 2.19 browser crash for right now, can you run the agent with "-m debug" and send me the output? Feel free to email it to pmeenan@webpagetest.org if you'd rather not post it.

I don't think 2.18 had the crash detection but it's also possible that something is unhappy with the trace collection that is triggering the crash (I have seen the blink.user_timing trace category crash desktop chrome and I'm wondering if it is also crashing your test case). 2.18 Also didn't have the same end condition and would not wait for network activity to stop so it may have been stopping the tests earlier.

Does it crash when you run the same URL on the public WebPageTest agents (Moto G)?

Patrick,

For the iPhone testing, do you have any suggestion? Currently, it's okay to run without video capture. But it crashes the host frequently. Even there's no testing running and only the node.js agent is running, the host gets restarted automatically. And if I checked "Capture Video", the test will fail.

Here's the output log for Android running on 2.19.
[attachment=579]

And the command line error:
Code:
C:\webpagetest_2.19\mobile>wptdriver.bat  -m debug -b android:TA25804C7W -i -s h
ttp://d-shc-00436935.test.com  -l M3_1_Motorola --processvideo yes >out.txt

E Mar_09_14:41:04.606 C:\webpagetest_2.19\mobile\src\wd_server.js:1401 WebDriver
Server.<anonymous> : Test failed: Browser Crashed
A Mar_09_14:41:09.853 C:\webpagetest_2.19\mobile\src\wpt_client.js:699 Client.fi
nishRun_ : Failed run 1a/1 of finished job 160310_PC_D: Browser Crashed
A Mar_09_14:53:24.274 C:\webpagetest_2.19\mobile\src\wpt_client.js:433 Client.on
Signal_ : Received SIGINT, exiting.
[/
code]
For the crash, can you try grabbing the latest js agent from Github trunk to see if it helps? I removed one suspect thing that I've seen crash the browser and I re-arranged the checks at the end of the test so if the browser crashes when pulling the trace data it won't fail the test.

For iOS, can you try running xrecord directly on the command-line? At a minimum, if the lock is causing issues I can get rid of it because it was to support multiple devices running at the same time but that ends up freaking out OSX anyway so it didn't help. If you open quicktime, can you record video from the attached phone?
(03-11-2016 12:05 AM)pmeenan Wrote: [ -> ]For the crash, can you try grabbing the latest js agent from Github trunk to see if it helps? I removed one suspect thing that I've seen crash the browser and I re-arranged the checks at the end of the test so if the browser crashes when pulling the trace data it won't fail the test.

For iOS, can you try running xrecord directly on the command-line? At a minimum, if the lock is causing issues I can get rid of it because it was to support multiple devices running at the same time but that ends up freaking out OSX anyway so it didn't help. If you open quicktime, can you record video from the attached phone?

I tried the latest code and it doesn't work.
Pages: 1 2
Reference URL's