browser dropdown issue in private instance

Having an issue with chrome not appearing in my browser drop-down list in my newly built private instance. IE appears and testing is working properly but no matter what I have tried I cannot get chrome to appear. Other updates made to locations.ini are reflected.

As I have read from previous posts the browser dropdown is entirely dependent upon the locations.ini file which I believe is configured properly.

Here are the contents of my locations.ini:

[locations]
1=Test_loc
default=Test_loc

[Test_loc]
1=Test_IE
2=Test_Chrome
default=Test_IE
label=New York Office

[Test_IE]
browser=IE 9
;browserExe=pagetest.exe
latency=0
label=“Internet Explorer 9”
key=TestKey123

[Test_Chrome]
browser=Chrome 11
latency=0
label=“Chrome 11”
key=TestKey123

Any thoughts on troubleshooting or solutions are greatly appreciated. Not seeing any errors being reported which is making this more problematic to isolate and resolve.

Thanks all.

Do you have wptdriver.exe running on the test machine? The browser/location will automatically be hidden on the server if the test agent hasn’t connected within the last hour.

Yes wptdriver.exe is running on the test machine but if the server is dynamically detecting availability that does give me another place to look for issues.

Here is the contents of my wptdriver.ini:

[WebPagetest]
url=http://privateurl.com/
location=Test_Chrome
Key=TestKey123

[chrome]
exe=“C:\Users\svc_webpagetest\AppData\Local\Google\Chrome\Application\chrome.exe”
options=“–load-extension=%WPTDIR%\extension --user-data-dir=%WPTDIR%\chrome_cache --new-window --no-proxy-server --no-first-run --no-default-browser-check”
cache=%WPTDIR%\chrome_cache

Check the access log on the server to make sure it shows work/getwork.php requests for the location Test_Chrome - that will help rule that out.

Was just about to post this up when you replied:

GET /work/getwork.php?location=Test_Chrome&key=TestKey123&software=wpt&ver=11&pc=NYNYCWEBTEST03 HTTP/1.1" 200 377 “-” "WebPagetest Driver

This is a windows 7 vm that is only being configured for wptdriver and chrome if that helps clarify at all.

Thanks for all the replies and assistance!

Hmm, ok, now you have me stumped. Is there a tmp directory on the server (under the web root) with Test_IE.tm and Test_Chrome.tm files in it?

Can you check http://privateurl.com/getTesters.php to see if it shows up in the list there?

It doesn’t look like the agent is an issue but as a side note (in case it wasn’t obvious in the directions), you can install wptdriver and urlblast on the same VM and have them both running at the same time. They have protections to make sure that only one of them will be executing tests at a given time but it lets you get better utilization of your systems.

Thanks,

-Pat

As part of my testing before posting I tried configuring chrome on the same vm as the working IE instance and encountered the same issue.

Anywho, I have tested getTesters.php and the chrome machine is listed:

Test_Chrome (0 minutes)
Tester Version PC EC2 Instance IP Busy? Last Check (minutes) Last Work (minutes)
1 11 NYNYCWEBTEST03 10.30.176.52 0 0

Additionally both Test_IE.tm and Test_Chrome.tm are present in the tmp directory.

Seems like I am encountering a curious situation…will keep at it and let me know if you have any thoughts or further suggestions and I’ll post back if I make any further progress.

Thanks again for being so responsive.

Hmm, might have to add some logging to figure out what is going on. Any chance you can zip up your server document directory and zend it to me at pmeenan@webpagetest.org? I can run it through a debugger and should be able to figure it out pretty quickly.

Sent it to you via google docs…let me know if you have any problems receiving or accessing.

Thanks again for all the help

so no luck resolving my issue with 2.3 but I can confirm that the dropdown list behaves as expected under 2.2.

Will have to look more at the differences between the 2.2 and 2.3 releases.

I have the same issue with my private 2.3 instance. I applied a quick fix for now: just made two different test locations–IE is default in one, Chrome in the other. Though ideally there should be one test location because I’m using the the same host for both agents, and give you the option for IE and Chrome under the browsers drop-down. Can you confirm that this is a bug in 2.3?

Issue with the dropdown (at least in my case) is with the following portion of the function FilterLocations function defined in common.inc

This was newly added to the function for the 2.3 release.

// next pass, filter browsers if we were asked to
if( isset($stripBrowser) )
{
    foreach( $locations as $name => &$loc )
    {
        if( isset($loc['browser']) )
        {
            $remove = false;
            foreach( $stripBrowser as $browser )
            {
                if( stripos($loc['browser'], $browser) !== false )
                {
                    $remove = true;
                    break;
                }
            }
                
            if( $remove )
                unset($locations[$name]);
        }
        else
        {
            // strip the browsers from the label
            foreach( $stripBrowser as $browser )
                $loc['label'] = preg_replace("/[, -]*$browser/i", '', $loc['label']);
        }
    }
}

I have removed this from my common.inc file for the time being while I continue to try to resolve this issue.

Thanks

I know I have tweaked that logic after the 2.3 release but it shouldn’t be triggered during the normal code path (well the $stripBrowser part anyway). The $remove block is probably what is causing it to work because the locations aren’t being removed when you kill that part of the code but the flag is probably being set elsewhere.

One of the things WPT does is it hides any locations that haven’t connected to the server recently (last 30-60 minutes I think). If the tracking of the last connect times isn’t working then it could explain the issue (they are stored in temp/.tm) and it usually uses the last modified time of the file itself.

I should have some time this weekend to further test and determine which part of the block is causing my issues.

Based on what you are saying about the normal code path it very well may be the $remove portion of the function. I had already verified that the .tm files were being updated…that being said I will definitely look at it more closely.

Will definitely report back once I have tested a little more.

Thanks again for the help.

Same issue here: 5 locations, each one with IE 6-9 + Chrome (4 VMs each, where each VM has IE x + Chrome, so 4 Chrome per location), for the very last location the very last browser (Chrome) it was missing even confirming it was up and running from /getTesters.php.
After some debugging (WPT PI 2.3) I noticed the following snippet was reusing a variable previously defined by reference inside a foreach loop on common.inc:

line 740:
foreach( $locations as $name => $loc )

But $loc was already defined by reference (&$loc) at line 713 causing the very last location browser to be replaced by IE9.

The solution was renaming $loc to $loc2 at lines 740, 744, 752, 763 (2X), 768 (2X) and 769

Hmm, thanks - this is why I hate languages that don’t have a compiler and let you do all sorts of crazy things :-/

Not sure why it works sometimes but not others (and how it would work on the live system) but I’ll get it patched up for the 2.4 release. Thanks for digging in to it.

Hopefully we’ll have 2.4 in a couple of weeks with the Firefox support (and a bunch of improvements to the Chrome support).

Nicely done!