hanugm
hanugm

Reputation: 1387

CommandInvokationFailure: : Unable to forward network traffic to device in Unity

I installed Unity and following tutorial from GoogleAR.

I faced some difficulties and managed till installation of app in mobile by lot of internet search.

Now, the app is installed in my Android mobile by unity, but not opening by itself due to the following error

CommandInvokationFailure: Unable to forward network traffic to device. Please make sure the Android SDK is installed and is properly configured in the Editor. See the Console for more details. /home/_____/Android/Sdk/platform-tools/adb -s "number" forward "tcp:34999" "localabstract:Unity-com.example.helloAR"

What causes this issue and how to overcome it?

Note that I did un-check Development Build, but still not working.

Upvotes: 3

Views: 2477

Answers (3)

Over17
Over17

Reputation: 1071

Looks like a bug in UnityEditor on Linux, where it opens port 34999, and adb fails to do the port forwarding because it's in use.

https://issuetracker.unity3d.com/issues/android-linux-unable-to-forward-network-traffic-to-device-when-trying-to-build-and-run-a-development-build

While it's being fixed, workarounds:

  • The app should be successfully installed to the device, so you can run it manually from the Apps menu.
  • Close Unity editor, run adb forward "tcp:34999" "localabstract:Unity-com.your.packagename" and open the editor again. This way you make the port used by adb so that later it works when building.

Upvotes: 5

Little Endian
Little Endian

Reputation: 830

On Windows, I was able to fix the issue by simply restarting the Editor.

Upvotes: 0

Dmitriy Nazarovskiy
Dmitriy Nazarovskiy

Reputation: 9

For Windows: just kill adb.exe and Build&Run again. Work for me every time :) You don't even need to restart the Editor.

  1. Ctrl+Alt+Del -> Task Manager
  2. kill this task

Upvotes: 0

Related Questions