WebPagetest Forums
Mobile Agent Setup in MAC - relayServer - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: Private Instances (/forumdisplay.php?fid=12)
+--- Thread: Mobile Agent Setup in MAC - relayServer (/showthread.php?tid=14201)

Pages: 1 2


Mobile Agent Setup in MAC - relayServer - vijay_nts - 02-09-2016 06:55 AM

Hi

I am trying to setup WPT private instance in MAC for Mobile tests. Test Location and Browser fields are empty.

If I give value for relay server, the values are populated in Test Locations and Browser fields. Please let me know what changes need to be done for displaying Test Locations and Browser values with out relay server for my private instance

[locations]
1=Local
default=Local

;
; These are the top-level locations that are listed in the location dropdown
; Each one points to one or more browser configurations
;

[Local]
1=Local-WPTDriver
2=Local-MotoG
label="Local"


;
; These are the browser-specific configurations that match the configurations
; defined in the top-level locations. Each one of these MUST match the location
; name configured on the test agent (urlblast.ini or wptdriver.ini)
;

[Local-WPTDriver]
browser=Chrome,Firefox,IE11
label="local"
;browserExe=pagetest.exe
;key=TestKey123

[Local-MotoG]
browser=Moto-G - Chrome,Moto-G - Chrome Beta
label="Moto-G"
type=nodejs,mobile
connectivity="WiFi"


RE: Mobile Agent Setup in MAC - relayServer - pmeenan - 02-11-2016 02:04 AM

The locations will generally be hidden until a test agent connects. You can check http://localhost/?hidden=1 to show all the hidden and visible locations to see if it is better.

As soon as a local agent connects and starts polling for work it should be made visible.


RE: Mobile Agent Setup in MAC - relayServer - vijay_nts - 02-11-2016 06:04 AM

(02-11-2016 02:04 AM)pmeenan Wrote:  The locations will generally be hidden until a test agent connects. You can check http://localhost/?hidden=1 to show all the hidden and visible locations to see if it is better.

As soon as a local agent connects and starts polling for work it should be made visible.

Thanks pmeenan...Thank You very much.....Now I am able to see the locations and able to run the tests. But the browser is not invoked in Android chrome browser.Mobile is rooted and all necessary setups are done. I am getting "Test completed but there were no successful results". I am seeing some errors in console.

Please help me to resolve this issue. I am using MAC Version 10.10.5 and node version
v0.10.34

----------------------
I Feb_10_13:40:48.697 agent_main.js:261 Agent.app_.schedule.addErrback.job.agentError : Starting run 1a/1 of job 160210_YV_2
D Feb_10_13:40:48.722 process_utils.js:487 unknown : Calling Make dirs
D Feb_10_13:40:48.723 process_utils.js:481 cb : Callback for Make dirs
D Feb_10_13:40:48.735 process_utils.js:487 unknown : Calling Tmp read
D Feb_10_13:40:48.736 process_utils.js:481 cb : Callback for Tmp read
D Feb_10_13:40:48.789 process_utils.js:263 unknown : Exec with timeout(10000): wpr status
E Feb_10_13:40:48.792 process_utils.js:343 ChildProcess.<anonymous> : wpr status failed with exception: spawn ENOENT
W Feb_10_13:40:48.796 web_page_replay.js:127 WebPageReplay.<anonymous> : wpr status command failed: Error: wpr status failed, code -1


---------------------
D Feb_10_13:40:50.887 process_utils.js:327 ChildProcess.<anonymous> : stdout[15] Unknown id: x
E Feb_10_13:40:50.906 wd_server.js:197 WebDriverServer.<anonymous> : Exception from "Run test": Error: Unexpected 'su' output: Unknown id: x
I Feb_10_13:40:50.916 wd_server.js:1170 WebDriverServer.<anonymous> : Test passed
-------------------------
A Feb_10_13:40:55.887 wpt_client.js:554 Client.<anonymous> : Failed run 1a/1 of job 160210_YV_2: (Unexpected 'su' output: Unknown id: x
)
I Feb_10_13:40:55.900 agent_main.js:261 Agent.app_.schedule.addErrback.job.agentError : Retrying run 1a/1 of job 160210_YV_2


RE: Mobile Agent Setup in MAC - relayServer - vijay_nts - 02-13-2016 01:33 AM

(02-11-2016 06:04 AM)vijay_nts Wrote:  
(02-11-2016 02:04 AM)pmeenan Wrote:  The locations will generally be hidden until a test agent connects. You can check http://localhost/?hidden=1 to show all the hidden and visible locations to see if it is better.

As soon as a local agent connects and starts polling for work it should be made visible.

Thanks pmeenan...Thank You very much.....Now I am able to see the locations and able to run the tests. But the browser is not invoked in Android chrome browser.Mobile is rooted and all necessary setups are done. I am getting "Test completed but there were no successful results". I am seeing some errors in console.

Please help me to resolve this issue. I am using MAC Version 10.10.5 and node version
v0.10.34

----------------------
I Feb_10_13:40:48.697 agent_main.js:261 Agent.app_.schedule.addErrback.job.agentError : Starting run 1a/1 of job 160210_YV_2
D Feb_10_13:40:48.722 process_utils.js:487 unknown : Calling Make dirs
D Feb_10_13:40:48.723 process_utils.js:481 cb : Callback for Make dirs
D Feb_10_13:40:48.735 process_utils.js:487 unknown : Calling Tmp read
D Feb_10_13:40:48.736 process_utils.js:481 cb : Callback for Tmp read
D Feb_10_13:40:48.789 process_utils.js:263 unknown : Exec with timeout(10000): wpr status
E Feb_10_13:40:48.792 process_utils.js:343 ChildProcess.<anonymous> : wpr status failed with exception: spawn ENOENT
W Feb_10_13:40:48.796 web_page_replay.js:127 WebPageReplay.<anonymous> : wpr status command failed: Error: wpr status failed, code -1


---------------------
D Feb_10_13:40:50.887 process_utils.js:327 ChildProcess.<anonymous> : stdout[15] Unknown id: x
E Feb_10_13:40:50.906 wd_server.js:197 WebDriverServer.<anonymous> : Exception from "Run test": Error: Unexpected 'su' output: Unknown id: x
I Feb_10_13:40:50.916 wd_server.js:1170 WebDriverServer.<anonymous> : Test passed
-------------------------
A Feb_10_13:40:55.887 wpt_client.js:554 Client.<anonymous> : Failed run 1a/1 of job 160210_YV_2: (Unexpected 'su' output: Unknown id: x
)
I Feb_10_13:40:55.900 agent_main.js:261 Agent.app_.schedule.addErrback.job.agentError : Retrying run 1a/1 of job 160210_YV_2

Still I am not able to fix this issue.. Could someone provide me some suggestions on how to overcome this issue?


RE: Mobile Agent Setup in MAC - relayServer - vijay_nts - 02-16-2016 02:42 PM

(02-13-2016 01:33 AM)vijay_nts Wrote:  
(02-11-2016 06:04 AM)vijay_nts Wrote:  
(02-11-2016 02:04 AM)pmeenan Wrote:  The locations will generally be hidden until a test agent connects. You can check http://localhost/?hidden=1 to show all the hidden and visible locations to see if it is better.

As soon as a local agent connects and starts polling for work it should be made visible.

Thanks pmeenan...Thank You very much.....Now I am able to see the locations and able to run the tests. But the browser is not invoked in Android chrome browser.Mobile is rooted and all necessary setups are done. I am getting "Test completed but there were no successful results". I am seeing some errors in console.

Please help me to resolve this issue. I am using MAC Version 10.10.5 and node version
v0.10.34

----------------------
I Feb_10_13:40:48.697 agent_main.js:261 Agent.app_.schedule.addErrback.job.agentError : Starting run 1a/1 of job 160210_YV_2
D Feb_10_13:40:48.722 process_utils.js:487 unknown : Calling Make dirs
D Feb_10_13:40:48.723 process_utils.js:481 cb : Callback for Make dirs
D Feb_10_13:40:48.735 process_utils.js:487 unknown : Calling Tmp read
D Feb_10_13:40:48.736 process_utils.js:481 cb : Callback for Tmp read
D Feb_10_13:40:48.789 process_utils.js:263 unknown : Exec with timeout(10000): wpr status
E Feb_10_13:40:48.792 process_utils.js:343 ChildProcess.<anonymous> : wpr status failed with exception: spawn ENOENT
W Feb_10_13:40:48.796 web_page_replay.js:127 WebPageReplay.<anonymous> : wpr status command failed: Error: wpr status failed, code -1


---------------------
D Feb_10_13:40:50.887 process_utils.js:327 ChildProcess.<anonymous> : stdout[15] Unknown id: x
E Feb_10_13:40:50.906 wd_server.js:197 WebDriverServer.<anonymous> : Exception from "Run test": Error: Unexpected 'su' output: Unknown id: x
I Feb_10_13:40:50.916 wd_server.js:1170 WebDriverServer.<anonymous> : Test passed
-------------------------
A Feb_10_13:40:55.887 wpt_client.js:554 Client.<anonymous> : Failed run 1a/1 of job 160210_YV_2: (Unexpected 'su' output: Unknown id: x
)
I Feb_10_13:40:55.900 agent_main.js:261 Agent.app_.schedule.addErrback.job.agentError : Retrying run 1a/1 of job 160210_YV_2

Still I am not able to fix this issue.. Could someone provide me some suggestions on how to overcome this issue?

Hi Patrick,

Did you get a chance to look at the issue that I am facing? Could you please help me in this?

Thanks
Vijay


RE: Mobile Agent Setup in MAC - relayServer - pmeenan - 02-17-2016 01:08 AM

What version of the agent are you running and what command line are you passing it? It shouldn't be trying to do anything with web page replay (wpr) though old versions of the code may have.


RE: Mobile Agent Setup in MAC - relayServer - vijay_nts - 02-17-2016 02:34 AM

(02-17-2016 01:08 AM)pmeenan Wrote:  What version of the agent are you running and what command line are you passing it? It shouldn't be trying to do anything with web page replay (wpr) though old versions of the code may have.

Hi Patrick,

Thank You for your response. Here are the requested details. I updated the WPT to latest version (2.18)
MAC Version 10.10.5 and node version v0.10.34

wptdriver.sh -m debug --browser android:568cf8dd --location Local-Android

Now I am getting the following error
I Feb_16_10:07:53.927 agent_main.js:396 Agent.app_.schedule.addErrback.job.agentError : Starting run 1/1 of job 160216_H2_2
D Feb_16_10:07:53.970 process_utils.js:487 unknown : Calling Make dirs
D Feb_16_10:07:53.971 process_utils.js:481 cb : Callback for Make dirs
D Feb_16_10:07:53.984 process_utils.js:487 unknown : Calling Clean video dir
D Feb_16_10:07:53.985 process_utils.js:481 cb : Callback for Clean video dir
D Feb_16_10:07:53.998 process_utils.js:487 unknown : Calling Tmp read
D Feb_16_10:07:53.999 process_utils.js:481 cb : Callback for Tmp read

D Feb_16_10:07:56.029 process_utils.js:327 ChildProcess.<anonymous> : stderr[28] 8 KB/s (20 bytes in 0.002s)
D Feb_16_10:07:56.031 process_utils.js:487 unknown : Calling Delete local hosts file
D Feb_16_10:07:56.031 process_utils.js:481 cb : Callback for Delete local hosts file
D Feb_16_10:07:56.060 process_utils.js:263 unknown : Exec with timeout(60000): adb -s 568cf8dd shell su -c 'echo x'
D Feb_16_10:07:56.104 process_utils.js:327 ChildProcess.<anonymous> : stdout[15] Unknown id: x
E Feb_16_10:07:56.131 wd_server.js:202 WebDriverServer.<anonymous> : Exception from "Run test": Error: Unexpected 'su' output: Unknown id: x
D Feb_16_10:07:56.132 wd_server.js:203 WebDriverServer.<anonymous> : Error: Unexpected 'su' output: Unknown id: x

at Adb.<anonymous> (/Users/vijayakumar_k/Documents/mobile/src/adb.js:140:17)
at /Users/vijayakumar_k/Documents/mobile/node_modules/selenium-webdriver/lib/goog/base.js:1178:15
at webdriver.promise.ControlFlow.runInNewFrame_ (/Users/vijayakumar_k/Documents/mobile/node_modules/selenium-webdriver/lib/webdriver/promise.js:1438:20)
at notify (/Users/vijayakumar_k/Documents/mobile/node_modules/selenium-webdriver/lib/webdriver/promise.js:328:12)
at notifyAll (/Users/vijayakumar_k/Documents/mobile/node_modules/selenium-webdriver/lib/webdriver/promise.js:297:7)
at fulfill (/Users/vijayakumar_k/Documents/mobile/node_modules/selenium-webdriver/lib/webdriver/promise.js:402:7)
at /Users/vijayakumar_k/Documents/mobile/node_modules/selenium-webdriver/lib/webdriver/promise.js:1305:10
at /Users/vijayakumar_k/Documents/mobile/node_modules/selenium-webdriver/lib/goog/base.js:1178:15
at webdriver.promise.ControlFlow.runInNewFrame_ (/Users/vijayakumar_k/Documents/mobile/node_modules/selenium-webdriver/lib/webdriver/promise.js:1438:20)
at notify (/Users/vijayakumar_k/Documents/mobile/node_modules/selenium-webdriver/lib/webdriver/promise.js:328:12)

==== async task ====
adb -s 568cf8dd shell su -c 'echo x'
at app.schedule (/Users/vijayakumar_k/Documents/mobile/src/process_utils.js:392:20)
at Object.exports.scheduleExec (/Users/vijayakumar_k/Documents/mobile/src/process_utils.js:262:14)
at Adb.command_ (/Users/vijayakumar_k/Documents/mobile/src/adb.js:73:24)
at Adb.adb (/Users/vijayakumar_k/Documents/mobile/src/adb.js:90:15)
at Adb.shell (/Users/vijayakumar_k/Documents/mobile/src/adb.js:107:15)
at Adb.<anonymous> (/Users/vijayakumar_k/Documents/mobile/src/adb.js:134:12)
at webdriver.promise.ControlFlow.runInNewFrame_ (/Users/vijayakumar_k/Documents/mobile/node_modules/selenium-webdriver/lib/webdriver/promise.js:1438:20)
at webdriver.promise.ControlFlow.runEventLoop_ (/Users/vijayakumar_k/Documents/mobile/node_modules/selenium-webdriver/lib/webdriver/promise.js:1303:8)
at wrapper [as _onTimeout] (timers.js:261:14)
==== async task ====
Check su
at app.schedule (/Users/vijayakumar_k/Documents/mobile/src/process_utils.js:392:20)
at Adb.formatSuArgs (/Users/vijayakumar_k/Documents/mobile/src/adb.js:131:20)
at Adb.su (/Users/vijayakumar_k/Documents/mobile/src/adb.js:163:15)
at BrowserAndroidChrome.<anonymous> (/Users/vijayakumar_k/Documents/mobile/src/browser_android_chrome.js:308:23)
at /Users/vijayakumar_k/Documents/mobile/node_modules/selenium-webdriver/lib/goog/base.js:1178:15
at webdriver.promise.ControlFlow.runInNewFrame_ (/Users/vijayakumar_k/Documents/mobile/node_modules/selenium-webdriver/lib/webdriver/promise.js:1438:20)
at notify (/Users/vijayakumar_k/Documents/mobile/node_modules/selenium-webdriver/lib/webdriver/promise.js:328:12)
at notifyAll (/Users/vijayakumar_k/Documents/mobile/node_modules/selenium-webdriver/lib/webdriver/promise.js:297:7)
at fulfill (/Users/vijayakumar_k/Documents/mobile/node_modules/selenium-webdriver/lib/webdriver/promise.js:402:7)
==== async task ====
Configure hosts file
at app.schedule (/Users/vijayakumar_k/Documents/mobile/src/process_utils.js:392:20)
at BrowserAndroidChrome.scheduleConfigureHostsFile_ (/Users/vijayakumar_k/Documents/mobile/src/browser_android_chrome.js:292:13)
at BrowserAndroidChrome.startBrowser (/Users/vijayakumar_k/Documents/mobile/src/browser_android_chrome.js:232:8)
at WebDriverServer.startChrome_ (/Users/vijayakumar_k/Documents/mobile/src/wd_server.js:245:17)
at WebDriverServer.runPageLoad_ (/Users/vijayakumar_k/Documents/mobile/src/wd_server.js:933:10)
at WebDriverServer.<anonymous> (/Users/vijayakumar_k/Documents/mobile/src/wd_server.js:605:12)
at webdriver.promise.ControlFlow.runInNewFrame_ (/Users/vijayakumar_k/Documents/mobile/node_modules/selenium-webdriver/lib/webdriver/promise.js:1438:20)
at webdriver.promise.ControlFlow.runEventLoop_ (/Users/vijayakumar_k/Documents/mobile/node_modules/selenium-webdriver/lib/webdriver/promise.js:1303:8)
at wrapper [as _onTimeout] (timers.js:261:14)
==== async task ====
Run test
at app.schedule (/Users/vijayakumar_k/Documents/mobile/src/process_utils.js:392:20)
at WebDriverServer.scheduleNoFault_ (/Users/vijayakumar_k/Documents/mobile/src/wd_server.js:201:20)
at WebDriverServer.runTest_ (/Users/vijayakumar_k/Documents/mobile/src/wd_server.js:601:15)
at WebDriverServer.connect (/Users/vijayakumar_k/Documents/mobile/src/wd_server.js:1041:8)
at WebDriverServer.<anonymous> (/Users/vijayakumar_k/Documents/mobile/src/wd_server.js:106:12)
at process.emit (events.js:98:17)
at handleMessage (child_process.js:322:10)
at Pipe.channel.onread (child_process.js:349:11)


RE: Mobile Agent Setup in MAC - relayServer - pmeenan - 02-17-2016 03:17 AM

Latest is 2.19: https://github.com/WPO-Foundation/webpagetest/releases

2.18 is getting close to a year old at this point and the mobile agent was one of the main areas of activity.

Though you're better off pulling from Trunk directly as there have been a few changes since 2.19 as well.


RE: Mobile Agent Setup in MAC - relayServer - vijay_nts - 02-17-2016 07:38 AM

(02-17-2016 03:17 AM)pmeenan Wrote:  Latest is 2.19: https://github.com/WPO-Foundation/webpagetest/releases

2.18 is getting close to a year old at this point and the mobile agent was one of the main areas of activity.

Though you're better off pulling from Trunk directly as there have been a few changes since 2.19 as well.

Hi Patrick,

Thank You for your time. Now I have the latest 2.9 with all the changes made after release but still I am facing the issue..
-------------------------------------------------------------------------------------------------
E Feb_16_15:33:23.729 process_utils.js:343 ChildProcess.<anonymous> : wpr status failed with exception: spawn ENOENT
W Feb_16_15:33:23.733 web_page_replay.js:127 WebPageReplay.<anonymous> : wpr status command failed: Error: wpr status failed, code -1
D Feb_16_15:33:23.820 process_utils.js:327 ChildProcess.<anonymous> : stderr[164] +++ /sbin/ipfw list
./ipfw_config: line 47: /sbin/ipfw: No such file or directory
+++ /sbin/ipfw list
./ipfw_config: line 47: /sbin/ipfw: No such file or directory
--------------------------------------------------------------------------------------------------

D Feb_16_15:33:25.623 process_utils.js:327 ChildProcess.<anonymous> : stdout[15] Unknown id: x
E Feb_16_15:33:25.643 wd_server.js:197 WebDriverServer.<anonymous> : Exception from "Run test": Error: Unexpected 'su' output: Unknown id: x
I Feb_16_15:33:25.645 wd_server.js:1170 WebDriverServer.<anonymous> : Test passed
D Feb_16_15:33:25.735 process_utils.js:327 ChildProcess.<anonymous> : stdout[7] 4.4.4
D Feb_16_15:33:28.696 process_utils.js:327 ChildProcess.<anonymous>
D Feb_16_15:33:28.836 process_utils.js:327 ChildProcess.<anonymous> : stderr[36] 9893 KB/s (1061168 bytes in 0.104s)
D Feb_16_15:33:28.844 wd_server.js:421 WebDriverServer.addScreenshot_ : Adding screenshot screen.png (runtmp/568cf8dd/screen.png): end of run

-------------------------------------------------------------------------------------------------

(02-17-2016 07:38 AM)vijay_nts Wrote:  
(02-17-2016 03:17 AM)pmeenan Wrote:  Latest is 2.19: https://github.com/WPO-Foundation/webpagetest/releases

2.18 is getting close to a year old at this point and the mobile agent was one of the main areas of activity.

Though you're better off pulling from Trunk directly as there have been a few changes since 2.19 as well.

Hi Patrick,

Thank You for your time. Now I have the latest 2.19 with all the changes made after release but still I am facing the issue..
-------------------------------------------------------------------------------------------------
E Feb_16_15:33:23.729 process_utils.js:343 ChildProcess.<anonymous> : wpr status failed with exception: spawn ENOENT
W Feb_16_15:33:23.733 web_page_replay.js:127 WebPageReplay.<anonymous> : wpr status command failed: Error: wpr status failed, code -1
D Feb_16_15:33:23.820 process_utils.js:327 ChildProcess.<anonymous> : stderr[164] +++ /sbin/ipfw list
./ipfw_config: line 47: /sbin/ipfw: No such file or directory
+++ /sbin/ipfw list
./ipfw_config: line 47: /sbin/ipfw: No such file or directory
--------------------------------------------------------------------------------------------------

D Feb_16_15:33:25.623 process_utils.js:327 ChildProcess.<anonymous> : stdout[15] Unknown id: x
E Feb_16_15:33:25.643 wd_server.js:197 WebDriverServer.<anonymous> : Exception from "Run test": Error: Unexpected 'su' output: Unknown id: x
I Feb_16_15:33:25.645 wd_server.js:1170 WebDriverServer.<anonymous> : Test passed
D Feb_16_15:33:25.735 process_utils.js:327 ChildProcess.<anonymous> : stdout[7] 4.4.4
D Feb_16_15:33:28.696 process_utils.js:327 ChildProcess.<anonymous>
D Feb_16_15:33:28.836 process_utils.js:327 ChildProcess.<anonymous> : stderr[36] 9893 KB/s (1061168 bytes in 0.104s)
D Feb_16_15:33:28.844 wd_server.js:421 WebDriverServer.addScreenshot_ : Adding screenshot screen.png (runtmp/568cf8dd/screen.png): end of run

-------------------------------------------------------------------------------------------------
typo error - I have 2.19


RE: Mobile Agent Setup in MAC - relayServer - pmeenan - 02-18-2016 01:48 AM

Can you run it with the debugging enabled (-m debug)? That will provide a lot more detail about what is going on. I think the wpr and ipfw errors can be ignored. Those look like they are probing to see if either is enabled/supported.

Can you also try this from a shell prompt?

Code:
adb shell
su -c 'echo x'

It's possible that something is going wrong with the shell parameter passing in the shell on OSX (I've only tested the adb control on Windows and Linux) but it should be fine.