Deze vertaling is niet volledig. Help dit artikel te vertalen vanuit het Engels.
Een Firefox OS apparaat via USB verbinden
Als u een Firefox OS apparaat met WebIDE probeert te verbinden maar u ziet hem niet, dan zijn dit een paar dingen die u kunt proberen:
- Controleer uw Firefox OS versie: zorg ervoor dat u Firefox OS 1.2/Boot2Gecko 1.2 of hoger hebt. Om uw versie te controleren, gaat u naar de Settings app op uw apparaat, en dan
Device Information > Software
. Als u niet de goede versie hebt, zoek dan uw apparaat in de developer phone guide en volg de instructies om hem te updaten. - Enable remote debugging: in the Settings app on the device, go to
Device information > More information > Developer
.- Firefox OS 1.3 and earlier: "Remote Debugging" is just a simple checkbox. Check the box.
- Firefox OS 1.4 and later: "Remote Debugging" asks you to enable for just ADB, or for ADB and DevTools. Select "ADB and DevTools".
- Disable screen lock on your device: in the Settings app on the device, go to
Screen Lock
and unchecking theLock Screen
checkbox. This is a good idea because when the screen gets locked, the phone connection gets lost, meaning it is no longer available for debugging. - Make sure you haven't connected an Android phone at the same time as the Firefox OS phone to your computer.
- Check the USB cable you are using:
- Try unplugging and replugging in the USB cable.
- Try plugging the USB cable into a different port on your computer. You may have to alternate between ports.
- Try a different USB cable. The cables that come with phones are often of poor quality and fail often.
- Try a shorter USB cable. Long USB cables have been known to not work so well.
- Try disabling and re-enabling Remote Debugging in the Settings app on the device.
- If you disabled the ADB Addon Helper, did you successfully run the
adb forward
command? - If you use Linux:
- Make sure you added a
udev
rules file, as documented in step 3 of this guide to setting up an Android device. TheidVendor
attribute to use for the Geeksphone is "05c6", and this page lists otheridVendor
values. Next, run theadb devices
to make sure your device is in the list. If device appears to be "no permission", you need to restart adb server (e.g.adb kill-server;adb start-server
).
- Make sure you added a
- If you use Windows:
- You need to install drivers, as documented in step 3 of this guide to setting up an Android device. You can find drivers for Geeksphone devices on the Geeksphone web site and drivers for Google devices on Google web site. Windows 8 by default will not let you install unsigned drivers. See this tutorial on "How to install an unsigned driver on Windows 8".
- If WebIDE can't see your device after following all the steps, you may have to edit adb_usb.ini.
- If you use Mac OS X:
- If you're getting timeout errors connecting to both simulators and real devices, you may be unable to connect to localhost due to an empty /etc/hosts file. You can solve the problem by populating the file and flushing DNS cache as described here.
- If you're an EasyTether user, you will need to uninstall or disable EasyTether:
sudo kextunload /System/Library/Extensions/EasyTetherUSBEthernet.kext
Connecting a Firefox OS device over Wi-Fi
- Check your version: Wi-Fi debugging requires Firefox 39 or higher, and a Firefox OS device running a build of Firefox OS 3.0 from 2015-03-27 or later.
- The QR code scanner can be a bit frustrating at the moment, as real devices appear to capture a very low resolution picture. Bug 1145772 aims to improve this soon. If you have trouble with this, try scanning with a few different orientations. If you chose "Scan and Remember, then you won't have to scan the code again the next time you connect your computer to this device.
Connecting to Firefox for Android
If you're trying to connect to a Firefox instance running on the Android OS and it doesn't show up, here are some things you can try:
- Check your Firefox version: make sure your device is running Firefox 36 or higher. WebIDE will not detect older versions automatically, so you need to enable port forwarding and connect to the device port - follow the instructions here.
- Make sure you have enabled remote debugging in Firefox: open Firefox for Android, open its menu, select
Settings
, and then check the checkbox atDeveloper Tools > Remote debugging
. - Make sure that USB debugging is allowed in the device's developer settings
- If you still do not see your device in the WebIDE window, try toggling
Remote debugging
on the phone.- Disconnect your device from your computer and turn off
Remote debugging
on the phone. - Reconnect the device and turn on
Remote debugging
- this restarts the debugger instance on the phone. - Try connecting via WebIDE again.
- Disconnect your device from your computer and turn off
- If using Windows, make sure that your Android device is recognized correctly and that it is using the Google USB Driver that is included with the Android SDK.
Connecting to other browsers (Chrome, Safari)
WebIDE makes use of Valence (formerly Firefox Tools Adapter) to reach other browsers, like Chrome and Safari.
If you are having trouble connecting to these other browsers, check the setup steps and other notes for those browsers on the Valence page.
Can't debug some apps
If you are finding that you can't debug certified apps, built-in apps, or apps already installed on a real device, then you may be coming across WebIDE's restricted privileges security policy. To find out more, see the section on Unrestricted app debugging (including certified apps, main process, etc.).
Unable to load project list
If you open WebIDE in one version of Firefox, and then downgrade to a previous Firefox version with the same profile, you may see the error "Unable to load project list" when opening WebIDE in the earlier Firefox version.
This can occur when the storage system that WebIDE uses (IndexedDB) needs to move or restructure its internal files for the newer Firefox version. The project list then becomes effectively inaccessible to older versions of Firefox.
No data has been lost, but you will need to keep using the newest version of Firefox that was used with your profile to get the project list back.
If really want to use the older version of Firefox, you can attempt to delete just the project list in the following way, but this is unsupported and could result in the further problems or additional data loss:
- Close Firefox
- Find your Firefox profile directory
- Find the
storage
folder inside the profile directory - Under some part of this file tree, there should be files and/or directories that start with
4268914080AsptpcPerjo
(a hashed name of the database) - Remove any such files and directories
- Start Firefox and WebIDE again
Enable logging
You can also enable verbose logging to gather diagnostics:
- Open about:config, and add a new preference called
[email protected]
, with the string valueall
, and set[email protected]
totrue
. - In the Add-ons Manager, disable and then re-enable the ADB Helper add-on.
- Open the Browser Console and you'll now see console messages prefixed with
adb
. If the messages don't mean anything to you, ask for help.
Get help
Go to the #devtools room on IRC and we will try to help.