0

I've successfully connected Firefox for Android to my desktop Firefox, I'm able to debug pages, and even install applications.

The problem is that installed applications do not start. And in result I can't debug them. Even worse, that now I'm unable to delete installed app from device, there is no such button, and my app is not listed among android apps like those which are installed from Firefox Marketplace.

Does anyone know how to deal with that, or it is now working yet?

Ubuntu 14.10 x64, Firefox 31.0, Firefox for Android 31.0 beta (used stable with the same result), Android 4.4.4 (CyanogenMod 11)

nazar-pc
  • 305
  • 4
  • 11

2 Answers2

0

Unfortunetely you cannot debug installed Firefox OS apps on Android phone via Firefox for Android. You can only debug web pages in Firefox for Android via remote debugging. https://developer.mozilla.org/en-US/docs/Tools/Remote_Debugging/Firefox_for_Android In case of Firefox OS app, you have better use App manager or simulator. Of course, if you have Firefox OS phone, you can do this via remote debugging between Firefox OS phone and your desktop.

Channy
  • 184
  • 4
  • Well, as I already wrote I've installed an application, but now I can't either run it or remove. I think, if I'll be able to run it - I'll be able to debug it. – nazar-pc Jul 09 '14 at 21:20
0

Here are the generic instructions (after which I'll address your specific issues):

Install mozilla-apk-cli using NPM:

npm install -g mozilla-apk-cli

Use it to generate a "debuggable" APK for your app from either a source directory or a URL to the mini-manifest:

mozilla-apk-cli /path/to/source/dir/ arbitrary-name.apk
mozilla-apk-cli http://example.com/path/to/mini/manifest.webapp arbitrary-name.apk

(Context-click > Inspect Element on the "Free" button in Marketplace to discover the mini-manifest URL for an app in the Marketplace.)

Install the APK on your Android device:

adb install -r arbitrary-name.apk

Launch the app on the device. Look to the notification area for a notification about which port the remote debugger server is listening on. Forward that port on your desktop, f.e. if the port is 12345:

adb forward tcp:12345 tcp:12345

Go to Web Developer > Connect… in Firefox on your desktop and connect to localhost at the forwarded port. Commence debugging!

Notes:

Now, regarding your specific issues: It sounds like you've made it past app installation but are stuck on launching and running the app. How are you launching the app? For example, are you tapping the app's icon on Android's All Apps screen? And what do you mean when you say that apps "do not start"? Do you mean that nothing happens when you launch the app, or does something happen (f.e. a splash screen appears, perhaps followed by a white screen), but the app itself doesn't appear?

It would also be useful to know the manifest URL of the app you're testing, if it's a public hosted app; or get access to the source code, if it's a public packaged app!

Finally, note this related (identical?) question: How to install packaged app on Firefox for mobile?. I copied the generic part of this answer from it, but presumably they should be consolidated into a single answer (modulo the troubleshooting info, which is specific to the problem you're encountering).

Community
  • 1
  • 1
Myk Melez
  • 1,080
  • 7
  • 9
  • I've connected to Firefox for Android Beta in App Manager and clicked "Update" just like I update app in Firefox OS Siimulator. – nazar-pc Jul 14 '14 at 21:01
  • I do not see installed app among others Android apps, only in Applications menu in Firefox for Android itself. Clicking on application icon inside Firefox does nothing, nothing happens. – nazar-pc Jul 14 '14 at 21:02
  • When I click "Debug" in App Manager it stucks for a while, and then fails with timeout (obviously, because App didn't start). – nazar-pc Jul 14 '14 at 21:04