./ipfw_config set --device EQ6LPZUK9SS8V46D failed

I am testing mobile device and setting up host on windows 7. But I got errors below in the console output of wptdriver.bat:
./ipfw_config set --device EQ6LPZUK9SS8V46D failed

ipfw_config seemed to be shell. What should be used instead?

The command line to start wptdriver.bat is:
C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\agent\js>wptdriver.bat -m debug --brows
er android:EQ6LPZUK9SS8V46D --serverUrl http://182.92.98.219/ --location Beijing
_MIUI

For right now you’re better off using a static IPFW config on a middlebox and configuring “connectivity=3g” (or whatever) in locations.ini on the server so it doesn’t use traffic shaping.

I’m hoping to get something working on Windows next week so I can do dynamic traffic shaping on the public WPT server but odds are whatever platform you choose is going to require some fairly elaborate configuring since the traffic shaping is done on an external box.

Basically, ipfw_config needs to be replaced with a batch file or program that will “do the right thing” when told to configure traffic shaping parameters for a given device. What that right thing is isn’t really defined. In my case I’m going to have pipes pre-defined for each device on an external freebsd box and just set the traffic shaping parameters using ssh when requested.

The detailed error is as below:
Unable to configure traffic shaping: ./ipfw_config set --device EQ6LPZUK9SS8V46D failed, code -1 To disable traffic shaping, re-run your test with “Advanced Settings > Test Settings > Connection = Native Connection” or add “connectivity=WiFi” to this location’s WebPagetest config.

I tried to modify “connectivity=3g” (or whatever) in locations.ini on the server but seemed same error.

So will you provide replacement for ipfw_config next week? or any other suggestion for a windows test box?

Using adb command below could start up chrome on mobile device and browse to yahoo:
D:\Android_SDK\adt-bundle-windows-x86_64-20140702\sdk\platform-tools>adb shell a
m start -n com.android.chrome/com.google.android.apps.chrome.Main -d http://yaho
o.com
Starting: Intent { dat=http://yahoo.com cmp=com.android.chrome/com.google.androi
d.apps.chrome.Main }
Warning: Activity not started, its current task has been brought to the front

The issue should be the request not sending to mobile device properly.

I’m not sure I understand. Do you have the debug log?

What version of the agent are you running (are you running the latest from the 2.15 release)?
What device?
What version of Android?
What version of Chrome is it running?

Thanks,

-Pat

The debug log is in attached.

For version of the agent I am running, the code I got from Git is around mid of last month.

What device?
I am using XIAOMI

What version of Android?
The Android version I am using is 4.2.1 now. I know document referred Kitkat 4.4, however as I referred before, Using adb command below could start up chrome on mobile device(Andriod 4.2.1) and browse to yahoo:
D:\Android_SDK\adt-bundle-windows-x86_64-20140702\sdk\platform-tools>adb shell a
m start -n com.android.chrome/com.google.android.apps.chrome.Main -d http://yaho
o.com
Starting: Intent { dat=http://yahoo.com cmp=com.android.chrome/com.google.androi
d.apps.chrome.Main }
Warning: Activity not started, its current task has been brought to the front

What version of Chrome is it running?
What is the requirement on Chrome version?

Progress on the testing, after setting connectivity=Native Connection in locations.ini, some new errors happened as below:
D Aug_13_16:06:07.039 C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\agent\js\src\process_utils.js:252 unknown : Exec with timeout(60000): adb -s EQ6LPZUK9SS8V46D shell su -c ‘echo x’

I ran the command line manually but got permission denied:
C:\Users\IBM_ADMIN>adb -s EQ6LPZUK9SS8V46D shell su -c ‘echo x’
Permission denied

From this, seemed the problem come to mobile device side. Not sure whether it is caused by root problem.

Is the phone rooted? It needs to be but it looks like it isn’t.

I already got the phone rooted. Latest error log below, could you please take a look?
==== async task ====
./ipfw_config set --device EQ6LPZUK9SS8V46D
at app.schedule (C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\agent\js\src\proce
ss_utils.js:399:26)
at Object.exports.scheduleExec (C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\age
nt\js\src\process_utils.js:251:14)
at Agent.trafficShaper_ (C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\agent\js\s
rc\agent_main.js:555:24)
at Agent.startTrafficShaper_ (C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\agent
\js\src\agent_main.js:575:8)
at Agent.startJobRun_ (C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\agent\js\src
\agent_main.js:248:10)
at Client.startNextRun_ (C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\agent\js\s
rc\wpt_client.js:469:12)
at Client.processJobResponse_ (C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\agen
t\js\src\wpt_client.js:435:8)
at Client. (C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\agent\js\src
\wpt_client.js:383:16)
at IncomingMessage. (C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\age
nt\js\src\wpt_client.js:196:7)
C Aug_13_18:09:22.286 C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\agent\js\src\wpt_
client.js:336 Client.onUncaughtException_ : Unhandled exception while processing
job 140813_13_9
A Aug_13_18:09:22.286 C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\agent\js\src\wpt_
client.js:493 Client.finishRun_ : Finished run 1/1 (isRunFinished=true) of job 1
40813_13_9
E Aug_13_18:10:30.996 C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\agent\js\src\wd_s
erver.js:1010 WebDriverServer.done_ : Run failed, stopping: Error: Connect DevTo
ols
Wait timed out after 10045ms
at C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\agent\js\node_modules\selenium-w
ebdriver\lib\webdriver\promise.js:1210:29
at C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\agent\js\node_modules\selenium-w
ebdriver\lib\goog\base.js:1178:15
at webdriver.promise.ControlFlow.runInNewFrame_ (C:\Users\IBM_ADMIN\Desktop
WPT\trunk\src\agent\js\node_modules\selenium-webdriver\lib\webdriver\promise.js:
1438:20)
at notify (C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\agent\js\node_modules\se
lenium-webdriver\lib\webdriver\promise.js:328:12)
at notifyAll (C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\agent\js\node_modules
\selenium-webdriver\lib\webdriver\promise.js:297:7)
at fulfill (C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\agent\js\node_modules\s
elenium-webdriver\lib\webdriver\promise.js:402:7)
at C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\agent\js\src\wd_server.js:234:19

at ClientRequest.<anonymous> (C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\agent

\js\src\devtools.js:112:7)
at ClientRequest.emit (events.js:95:17)
at Socket.socketErrorListener (http.js:1547:9)
==== async task ====
Connect DevTools
at webdriver.promise.ControlFlow.wait (C:\Users\IBM_ADMIN\Desktop\WPT\trunk
src\agent\js\node_modules\selenium-webdriver\lib\webdriver\promise.js:1195:15)
at WebDriverServer.connectDevTools_ (C:\Users\IBM_ADMIN\Desktop\WPT\trunk\sr
c\agent\js\src\wd_server.js:224:13)
at WebDriverServer.startChrome_ (C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\ag
ent\js\src\wd_server.js:213:8)
at WebDriverServer.runPageLoad_ (C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\ag
ent\js\src\wd_server.js:779:10)
at WebDriverServer.runTest_ (C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\agent
js\src\wd_server.js:565:10)
at webdriver.promise.ControlFlow.runInNewFrame_ (C:\Users\IBM_ADMIN\Desktop
WPT\trunk\src\agent\js\node_modules\selenium-webdriver\lib\webdriver\promise.js:
1438:20)
at webdriver.promise.ControlFlow.runEventLoop_ (C:\Users\IBM_ADMIN\Desktop\W
PT\trunk\src\agent\js\node_modules\selenium-webdriver\lib\webdriver\promise.js:1
303:8)
at wrapper [as onTimeout] (timers.js:261:14)
at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)
==== async task ====
Run the test
at app.schedule (C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\agent\js\src\proce
ss_utils.js:399:26)
at WebDriverServer.connect (C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\agent\j
s\src\wd_server.js:877:13)
at WebDriverServer. (C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\age
nt\js\src\wd_server.js:105:12)
at process.emit (events.js:98:17)
at handleMessage (child_process.js:322:10)
at Pipe.channel.onread (child_process.js:349:11)
W Aug_13_18:10:33.646 C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\agent\js\src\wd_s
erver.js:415 WebDriverServer. : Converting runtmp_EQ6LPZUK9SS8V46D\sc
reen.png PNG->JPEG failed, will use original PNG: convert runtmp_EQ6LPZUK9SS8V46
D\screen.png -resize ‘50%’ -quality 30 runtmp_EQ6LPZUK9SS8V46D\screen.jpg failed
, code 4, stderr[29] Invalid Parameter - -resize
E Aug_13_18:10:35.106 C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\agent\js\src\proc
ess_utils.js:332 ChildProcess. : ./ipfw_config clear --device EQ6LPZU
K9SS8V46D failed with exception: spawn ENOENT
A Aug_13_18:10:36.207 C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\agent\js\src\wpt

client.js:493 Client.finishRun_ : Finished run 1/1 (isRunFinished=true) of job 1
40813_13_9
E Aug_13_18:10:36.209 C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\agent\js\src\wpt_
client.js:497 Client.finishRun_ : Timed-out job finished, but too late: 140813_1
3_9
E Aug_13_18:12:44.161 C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\agent\js\src\wpt_
client.js:444 Client.abortJob_ : Aborting job 140813_41_A: timeout
E Aug_14_11:10:44.638 C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\agent\js\src\proc
ess_utils.js:332 ChildProcess. : ./ipfw_config clear --device EQ6LPZU
K9SS8V46D failed with exception: spawn ENOENT
A Aug_14_11:10:44.744 C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\agent\js\src\wpt_
client.js:493 Client.finishRun_ : Finished run 1/1 (isRunFinished=true) of job 1
40813_41_A
W Aug_14_11:15:05.133 C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\agent\js\src\wpt_
client.js:388 Client. : Got error: connect ECONNABORTED

As best as I can tell it looks like it couldn’t connect to the dev tools instance on the phone. When you ran the test did Chrome open and stay on a blank screen for a while or did it not open?

Strangely, it also looks like it got an error when posting the failed test result to your webpagetest server. You might want to check the web server’s error logs to see what happened there.

When I ran the test, I can see chrome open and stay on a blank screen for a while and then closed.
The test result is timeout.
Any hint for me?

What version of Chrome? The only thing that comes to mind is if you aren’t using a retail build then the path for the dev tools port will be incorrect (and for the command-line parameters).

I use adb shell to check chrome package:
shell@HM2013022:/ $ dumpsys package com.android.chrome

The version info is as below:
Packages:
Package [com.android.chrome] (422b8d18):
userId=10077 gids=[3003, 1015, 1028]
sharedUser=null
pkg=Package{4242d178 com.android.chrome}
codePath=/data/app/com.android.chrome-1.apk
resourcePath=/data/app/com.android.chrome-1.apk
nativeLibraryPath=/data/app-lib/com.android.chrome-1
versionCode=1025464
applicationInfo=ApplicationInfo{423f95f0 com.android.chrome}
flags=[ HAS_CODE ALLOW_CLEAR_USER_DATA ALLOW_BACKUP ]
versionName=18.0.1025464
dataDir=/data/data/com.android.chrome

I also use below adb command line to start chrome on device and navigate to yahoo properly:
shell@HM2013022:/ $ am start -n com.android.chrome/com.google.android.apps.chrom
e.Main -d http://yahoo.com
e/com.google.android.apps.chrome.Main -d http://yahoo.com <
Starting: Intent { dat=http://yahoo.com cmp=com.android.chrome/com.google.androi
d.apps.chrome.Main }
Warning: Activity not started, its current task has been brought to the front

18.x is an ancient version of Chrome (March 2012 so slightly over 2 years old) and isn’t going to work. The current release is 36.

You might be able to get the agent working against the build you have but it would require figuring out the correct path for the command-line file and possibly some of the package and intent information.

Hi, Patrick
Thanks for the info. After using Chrome version 36, when I ran test on the web page, chrome on mobile device can be launched properly and navigate to target website but the test result I got on the web page is still timeout. I recorded the logs and could you please take a look and see where is the problem?
Thanks again

Looking at the log, a couple of things jump out:

1 - You are still getting ipfw error messages. I don’t see any connectivity settings specified in the test job so it shouldn’t be trying to set anything (I’ll try pulling trunk to see if I can reproduce that).

2 - It LOOKS like the results completed and should have uploaded though I do see a “testerror” being specified with a “timeout”.

These 3 lines indicate the test completed successfully so it’s going to take some digging to see why it thinks it timed out:

D Aug_28_22:33:14.827 C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\agent\js\src\wd_server.js:286 WebDriverServer.onDevToolsMessage_ : DevTools message: {"method":"Page.frameStoppedLoading","params":{"frameId":"15284.1"}}
I Aug_28_22:33:14.841 C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\agent\js\src\wd_server.js:915 WebDriverServer.<anonymous> : Test finished, waiting for browser to coalesce
I Aug_28_22:33:24.882 C:\Users\IBM_ADMIN\Desktop\WPT\trunk\src\agent\js\src\wd_server.js:1012 WebDriverServer.done_ : Test run succeeded

I’ll see if I can reproduce it locally but you might have to go in and add logging around the timeout testerror setting to see why and where it is getting set.