Closed Bug 895564 Opened 11 years ago Closed 11 years ago

Marionette fails to launch Marketplace App on master

Categories

(Remote Protocol :: Marionette, defect)

Other
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: vaidik, Unassigned)

Details

Attachments

(2 files)

We have noticed that Marionette fails to launch Marketplace Dev app often. Rather, it launches the app fine but execute_script call to launch the app times out.

This is something that we have noticed ourselves while working on our automated tests for Marketplace app. Sadly, we haven't noticed this with other apps.

An example of this is: http://qa-selenium.mv.mozilla.com:8080/view/B2G%20Unagi/job/b2g.unagi.mozril.gaia.master.ui/134/testReport/%28root%29/TestMarketplaceChangeUserRegion/test_marketplace_change_user_region/
How easy is this to reproduce? Looking at the logcat I see:

E/GeckoConsole(  735): Content JS LOG at dummy file:1589 in GaiaApps.launchWithName/<: launching app with name 'Marketplace Dev'
...
E/GeckoConsole(  735): Content JS LOG at dummy file:1580 in GaiaApps.launchWithName/</apploadtime/<: app with origin 'https://marketplace-dev.allizom.org' has launched

This indicates a successful launch. I see 5 launch attempts but only 4 successful. Could you try to reproduce this in a reduced test case (one that simply tries to launch the app would be fine) and attach the logcat.
I also noticed this in the logcat after the final launch attempt (with no following success notice).

E/GeckoConsole( 1586): Content JS ERROR at app://homescreen.gaiamobile.org/gaia_build_defer_index.js:44 in onerror: error  while HTTP GET:  https://marketplace-dev-cdn.allizom.org/media/img/mkt/logos/64.png?b=433f2f1-51e6d025

Perhaps something is preventing the app from firing the apploadend event.
I'd quite like to see if we can resolve this so I'll run it on a loop and see if I get that same error. I have also seen it with other apps aside from marketplace.

CC in jgriffin because he wrote this atom.
Attached file mk_launch_timed.txt
OK so I've put this on a loop and timed from immediately before the launch until the test tearDown. 
It seems that it really was taking 60 seconds to launch. 

I was also experiencing some of the famous MV wifi at the time and switched to LAN myself!

What do you think about bumping up the launch timeout for Marketplace launches? 

Although I have seen this same ScriptTimeoutException on other apps on occasion we're probably better off investigating them on case by case basis. Marketplace is 'unique' in that we have to go over the internet to get the app.
(In reply to Zac C (:zac) from comment #5)
> What do you think about bumping up the launch timeout for Marketplace
> launches? 

60 seconds should be plenty of time for an app to launch, but this is a development server so perhaps we should allow for longer. I would suggest an optional timeout argument on the launch function, which could be specified on a per-app basis or default to 60 seconds. Have you raised this with the Marketplace devs?
I'll talk to the devs but will probably propose a "if dev: longer timeout" patch later today.
I see that a fix landed for increasing the timeout when the application name is 'Marketplace Dev'. Has this resolved this issue?
This appears to be resolved by the longer timeout
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: