Skip to content

running app that is not installed in Simulator kills Simulator #245

Closed
mykmelez opened this Issue Dec 31, 2012 · 5 comments

2 participants

@mykmelez
Mozilla member

If I try to run an app that isn't installed in the Simulator (f.e. because of issue #244), the Simulator complains to the console that it couldn't find the app and then dies:

info: r2d2b2g: Simulator.onMessage runApp
debug: r2d2b2g: RUNAPP RESPONSE: {"message":"runApp request received","from":"conn0.simulator5"}
prosthesis:simulator actor received a 'runApp' command
--runapp found app: Template, disabling lock screen...
--runapp launching app: Template
info: r2d2b2g: Simulator.onMessage runApp
debug: r2d2b2g: RUNAPP RESPONSE: {"message":"runApp request received","from":"conn0.simulator5"}
prosthesis:simulator actor received a 'runApp' command
Could not find app: "Weather Me". Maybe you meant one of:
  Marketplace
  PDF Viewer
  Cost Control
  Template
  Communications
  TowerJelly
  PenguinPop
  Settings
  Video
  Homescreen
  System
  Test Agent
  Membuster
  Keyboard
  Send To Bluetooth Device
  Test Sensors
  Staging Marketplace
  Maps
  Camera
  UI tests
  Clock
  Music
  Browser
  Gallery
  Geoloc
  Test reciever#1
  Calendar
  Twitter share
  Test Container
  CubeVid
  Share Receiver
  Messages
  CrystalSkull
  Wallpaper
  Test reciever (inline)
  TestPermissions
  FM Radio
  Image Uploader
  Dev Marketplace
  E-Mail
  Test Receiver#2
  Template
debug: r2d2b2g: rsc.onClientClosed
prosthesis:simulator actor connection closed
info: r2d2b2g: mac64/B2G.app/Contents/MacOS/b2g-bin terminated with 0

At the very least, it shouldn't die; ideally, the Simulator should detect that the app is not installed and install it. This seems like a corner case, since normally all apps listed in the Dashboard will be installed in the Simulator. I only know of two times when that isn't the case:

  1. Issue #244 causes apps listed in the Dashboard to be uninstalled.
  2. When running the addon with cfx run against an existing profile, f.e. cfx run --profiledir ~/Profiles/r2d2b2g --templatedir template/, cfx run reinstalls the addon from scratch, but it doesn't set Self.loadReason to upgrade, so main.js never calls simulator.updateAll(), and none of the addons listed in the Dashboard get installed in the Simulator.
@mykmelez
Mozilla member

I started a discussion in the Jetpack forum about the problem running cfx run against an existing profile. And I'll follow up with the Jetpack folks about solving that problem, since I run into it regularly.

Nevertheless, this issue still seems low-priority, as regular users won't run into that problem, and they won't run into issue #244 once we fix it.

@rpl
Mozilla member
rpl commented Jan 1, 2013

this issue is related to code reused from http://mxr.mozilla.org/mozilla-central/source/b2g/chrome/content/runapp.js#87

Soon I'm going to use mozApps.mgmt API to find and run apps and to fail gracefully, fixing #237 or right after that.

@rpl
Mozilla member
rpl commented Feb 13, 2013

fixed by #304

I leave this issue open to add error reporting to the user,

@mykmelez
Mozilla member

Instead of reporting an error to the user when the app is not installed, we should simply install it.

@rpl
Mozilla member
rpl commented Mar 29, 2013
@mykmelez mykmelez closed this Mar 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.