[EC2 AMI] Firefox is broken on Windows (wptagent) EC2 AMI

I’ve set up a WPT Private Instance which uses the Windows (wptagent) AMI to run tests. Chrome works fine, but if I try to launch a test with Firefox, I get a result of:

The testing completed but failed.
Invalid browser - Firefox
First View: Test Error: Invalid browser - Firefox

This occurs in all regions I have tested - us-west-2, eu-west-1, and ap-northeast-1.

If I remote desktop to the Agent, Firefox is installed and otherwise functional.

I’ve done more testing. It appears this is occurring because the browser_install.py file is downloading and installing the 64-bit Firefox, but something is wrong with the browser auto-detection in wptagent.py. This is evidenced by the logging, which only shows detection of Chrome, ie, and Edge.

If I manually install the 32-bit version of Firefox on the wptagent AMI, then Firefox works fine.

From the log file:
22:40:24.502 - Detected Browsers:
22:40:24.502 - Chrome: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
22:40:24.502 - Edge: C:\WebPageTest\wptagent\internal\support\edge\14\MicrosoftWebDriver.exe
22:40:24.502 - ie: C:\Program Files (x86)\Internet Explorer\iexplore.exe
22:40:24.516 - Microsoft Edge: C:\WebPageTest\wptagent\internal\support\edge\14\MicrosoftWebDriver.exe

Patrick fixed this with

https://github.com/WPO-Foundation/wptagent/commit/9b530728a7dcd6afa50ccef8ebb9bab0910e9dbb

Firefox now loads properly on the WPTAgent AMI.