Skip to content
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.

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

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

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

mykmelez opened this issue Dec 31, 2012 · 5 comments
Labels

Comments

@mykmelez
Copy link
Contributor

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 updating app removes other apps from Simulator #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
Copy link
Contributor Author

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
Copy link
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
Copy link
Member

rpl commented Feb 13, 2013

fixed by #304

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

@mykmelez
Copy link
Contributor Author

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

@rpl
Copy link
Member

rpl commented Mar 29, 2013

we're already doing auto-reinstall if app it not found from ca50f16

we can simply close this issue, because simulator already behaves as
requested.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants