Repository: microsoft/vscode-react-native

Issue #1026: Command failed: adb -s "emulator-5554" shell getprop ro.build.version.sdk
Created: 2019-06-10T07:32:16Z
Actual Behavior

Can't debug app.I'm getting 'Command failed: adb -s "emulator-5554" shell getprop ro.build.version.sdk' error. I tried to run this command from cmd and it worked.

Expected Behavior

Run debugger without errors.

Software versions

React-Native VS Code extension version: 0.9.3
VSCode version: 1.35.0
OS platform and version: Windows 10
NodeJS version: 10.16.0
React Native version: 0.57.8

Outputs (Include if relevant)

Output of the Debug Console (View -> Toggle Debug Console):

Could not debug. Error while executing command 'adb -s "emulator-5554" shell getprop ro.build.version.sdk': Command failed: adb -s "emulator-5554" shell getprop ro.build.version.sdk


Output of the React-Native output channel (View -> Toggle Output -> Select React-Native in ListBox):

Error: Error while executing command 'adb -s "emulator-5554" shell getprop ro.build.version.sdk': Command failed: adb -s "emulator-5554" shell getprop ro.build.version.sdk

Duplicate issue #1028: Cannot bind listener: operation not permitted
Created: 2019-06-15T17:39:42Z
Actual Behavior
[Error] Error: Error while executing command 'adb -s "emulator-5554" reverse tcp:8081 tcp:8081': Error while executing command 'adb -s "emulator-5554" reverse tcp:8081 tcp:8081': Command failed: adb -s "emulator-5554" reverse tcp:8081 tcp:8081
adb.exe: error: cannot bind listener: Operation not permitted
using android studio adv
I set path to platform-tools
Starting custom debugger by executing: echo A debugger is not needed:
Expected Behavior
I would like to debug step, but i get this error, and the top bar for stopping or debugging disappears.
Software versions

React-Native VS Code extension version: 0.9.3
VSCode version: 1.35.1
Windows 10
NodeJS version: npm: '6.9.0',
React Native version: "react-native": "0.59.9",

Outputs (Include if relevant)

Output of the Debug Console (View -> Toggle Debug Console):

OS: win32 x64
Adapter node: v10.2.0 x64
vscode-chrome-debug-core: 6.7.46
Could not debug. Error while executing command 'adb -s "emulator-5554" reverse tcp:8081 tcp:8081': Error while executing command 'adb -s "emulator-5554" reverse tcp:8081 tcp:8081': Command failed: adb -s "emulator-5554" reverse tcp:8081 tcp:8081
adb.exe: error: cannot bind listener: Operation not permitted



Output of the React-Native output channel (View -> Toggle Output -> Select React-Native in ListBox):

[Info] Packager is already running.

[Info] Prewarming bundle cache. This may take a while ...

[Info] About to get: http://localhost:8081/index.bundle?platform=android

[Warning] The Bundle Cache was prewarmed.

[Info] Building and running application.

 BUNDLE  [android, dev] ./index.js ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100.0% (1/1), done.

[Error] Error: Error while executing command 'adb -s "emulator-5554" reverse tcp:8081 tcp:8081': Error while executing command 'adb -s "emulator-5554" reverse tcp:8081 tcp:8081': Command failed: adb -s "emulator-5554" reverse tcp:8081 tcp:8081
adb.exe: error: cannot bind listener: Operation not permitted


Starting custom debugger by executing: echo A debugger is not needed:  "c:\Project\Harborapp"



Output of the Developer Tools console (Help -> Toggle Developer Tools -> Select Console tab):

workbench.main.js:4357 Overwriting grammar scope name to file mapping for scope source.js.
Old grammar file: file:///c%3A/Users/Origin/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/extensions/javascript/syntaxes/JavaScript.tmLanguage.json.
New grammar file: file:///c%3A/Users/Origin/.vscode/extensions/mgmcdermott.vscode-language-babel-0.0.22/grammars/Babel-Language.json
register @ workbench.main.js:4357
workbench.main.js:3313 [Extension Host] debugger listening on port 36911
workbench.main.js:238 [Extension Host] (node:2692) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
t.log @ workbench.main.js:238
workbench.main.js:238 [Extension Host] (node:2692) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.

Closing comment (2019-06-19T07:48:14Z): Hi @OriginLive . This issue looks similar to #1026 and #1027. Could you please check your Android SDK Platform Tools version? If it equals 29 then I recommend you to downgrade tools version to 28, because there was some bugs introduced in this version. To do that please do the following:

Open Android Studio
Click Configure
Choose SDK Manager
Open SDK Tools
Uncheck Android SDK Platform Tools and click Apply
Download Android SDK Platform Tools 28 using this link : https://dl.google.com/android/repository/platform-tools_r28.0.0-windows.zip
Unzip this folder into Android SDK Location folder that is indicated at SDK Manager

Please let us know if this works for you.