Getting "Device offline" error even though emulator is running - device

I just installed the android sdk (3.0) on my Mac 10.6.3. I started the emulator successfully using
./emulator -avd my_android &
However, when I try and run a forward command using adb, I get the following error ...
davea-mbp2:platform-tools davea$ ./adb forward tcp:8080 tcp:8080
* daemon not running. starting it now on port 5037 *
* daemon started successfully
error: device offline
Does anyone know what the error means? My emulator is up and running (http://screencast.com/t/bD8WYjZ1) when I run the above command, - Dave

This is an old question but anyway - just had the same issue.
I eventually fixed it by deleting the device and creating a similar one with another name. Recreating the device with the same name did not do the trick.

Related

Fix "Docker daemon failed to start" error after (Mac) OS upgrade

After getting numerous messages saying I should upgrade my OS, I have finally decided to upgrade to macOS Big Sur v11.6.1.
Unfortunately, docker doesn't work anymore.
I'm getting an error:
Fatal Error
Docker daemon failed to start
and
2021-12-07T09:47:14Z dockerd time="2021-12-07T09:47:14.957430297Z" level=debug msg="Calling GET /version"
I can see the option to Reset Docker to factory defaults but I'm afraid of resetting because it means I will also erase all my docker images.
Is there any easy way to fix this issue without erasing my work?
I get this fairly often on my Mac. I'm still on Big Sur.
This in the terminal seems to get me working (pay attention to the capitalisation):
pkill Docker
open -a /Applications/Docker.app

Cannot start Fuchsia Emulator on Ubuntu

I am trying to build Fuchsia OS and run it on the Fuchsia Emulator femu, but after waiting for the emulator to start the fx command exists and displays the error below.
failed to create Fuchsia device device health check failed. Unable to ssh due to error:
Error: Cannot start Fuchsia Emulator. Exit status is 1
I have followed the instructions provided by Google at fuchsia.dev, the build completes successfully and the commands used to build the OS were
fx set core.qemu-x64 --with //examples/hello_world
fx build
Subsequently, I tried running in headless mode with fx vdl start -N --headless which results in the same error as above, I also tried build the OS without the --with argument but received the same error.
The log file gives us more details, the second last line of the log file may be of interest and it reads:
emu-system-x86_64-headless: network script /etc/qemu-ifdown failed with status 256
I am using Ubuntu 21.04 on my machine.
It seems that the network configuration scripts /etc/qemu-ifup and /etc/qemu-ifdown are missing. You can work around it by installing the qemu package:
$ sudo apt install qemu

Can't run Fuchsia components with shell

So I am trying to get started developing on Fuchsia and I wanted to get the hello world component to run. However, following these steps doesn't work for me. I'm using core.qemu-x64 running on an Ubuntu 20.04 VM with Virtual Box. I have gotten the emulator to run with fx qemu -N but fx vdl start -N hasn't worked for me.
I run fx serve-updates but it just outputs "Discovery..." and never changes. Then I try to run fx shell run fuchsia-pkg://fuchsia.com/hello-world-cpp#meta/hello-world-cpp.cmx but it says "No devices found." It seem like this shouldn't be an issue because with Linux the device finder should automatically pick it up. Regardless I tried following the MAC instructions and setting the device with fx set-device 127.0.0.1:22. That just makes the run command say "ssh: connect to host 127.0.0.1 port 22: Connection refused". I also tried to set it to the device to the nodename outputted by the fx qemu -N command which is "fuchsia-####-####-####" but that just makes the run command say no devices are found again.
I have verified that I actually have the hello-world packages with the fx list-packages hello-world which outputs all the hello-world packages as expected.
Is there any way I can get the device to be discoverable by the shell command? Alternatively, can I run components like the hello-world component from the qemu emulator directly?
Please let me know if I can provide any additional information.
I guess I just wasn't patient enough. I assumed the emulator was done getting setup because it stopped giving console output and it allowed me to input commands but it seems I just had to wait longer. After 50 minutes of the fx qemu -N command running, the terminal that had fx serve-updates going finally picked up the device. Then I was able to execute the hello world component. It would be nice if the documentation at least gave an idea of how long the different commands would take before they'd be usable.

What is causing this project to fail on Macbook Pro when It runs just fine on windows 10

I have a nativescript application in windows that deploys to the emulator just fine, but when I git clone onto the MacBook Pro and run the same process, I get:
new-host:nativescript jbaird$ tns run android
Searching for devices...
Starting Android emulator with image Nexus_5X_API_26
Waiting for emulator device initialization...
Executing before-liveSync hook from /Users/jbaird/Documents/development/gr8dates/Nativescript/hooks/before-liveSync/nativescript-angular-sync.js
Executing before-prepare hook from /Users/jbaird/Documents/development/gr8dates/Nativescript/hooks/before-prepare/nativescript-dev-typescript.js
Found peer TypeScript 2.4.2
Preparing project...
Project successfully prepared (Android)
Building project...
Unable to apply changes on device: emulator-5554. Error is: spawn EACCES.
Executing after-watch hook from /Users/jbaird/Documents/development/gr8dates/Nativescript/hooks/after-watch/nativescript-dev-typescript.js
Any ideas? Thanks in advance.
The error is a permission error. Therefore, all you need to do is give access to the the folder you are running your apps from. The process involves you to copy and paste the command below into your terminal.
sudo chmod -R a+rwx /AppFolder
The command is an administrator command, therefore, you may have to insert your system password.
PS: Definitely, you hit enter and there will be a prompt for you to insert your password.
Let me know if you have any challenges with this solution!
emulator-5554. Error is: spawn EACCES.emulator-5554. Error is: spawn EACCES.
Seems a permission error. You could solve it by:
sudo,
Or, by giving +x permision to your hooks folder?

Cannot connect to the Docker daemon on Windows 7

I see a couple of entires for this error but not on Windows 7. I have installed Client version 1.5.0 (Client API 1.17) in to my Windows 7 SP1 machine. I followed the Windows Install instructions with no problem. I run Boot2Docker Start and it is started successfully. However, when I run the docker version command I am informed on version details with a FATA error message below stating:
FATA[0000] Cannot connect to the Docker daemon. Is 'docker -d' running on this host?
When I run docker -d I am told there is a permission error:
INFO[0000] +job serveapi(unix:///var/run/docker.sock)
FATA[0000] open /var/run/docker.pid: permission denied
I have tried a chmod on the pid file and have checked I am running with Administrator privilege on the Windows machine. I am not sure whether the permission denied is a red herring.
As it appears Windows 7.1 is supported and the install appeared to run smoothly without errors, I am wondering if anyone has come across this problem or has any ideas as to what try next?
Many thanks, rvon

Resources