Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not being able to debug due to adb path being incorrect #781

Closed
Sterlingryan opened this issue Aug 28, 2018 · 12 comments
Closed

Not being able to debug due to adb path being incorrect #781

Sterlingryan opened this issue Aug 28, 2018 · 12 comments

Comments

@Sterlingryan
Copy link

Sterlingryan commented Aug 28, 2018

Actual Behavior

  1. Start Debugging on Android.
  2. Get this error [Error] Error: Error while executing command 'F\:\Programs\Android\sdk\platform-tools\adb devices': Command failed: F\:\Programs\Android\sdk\platform-tools\adb devices
    The filename, directory name, or volume label syntax is incorrect.
  3. App is built and running on emulator
  4. Debugging is not available

Expected Behavior

  1. Start Debugging
  2. App is built and running on emulator
  3. Debugging is available.

Software versions

  • React-Native VS Code extension version:
  • VSCode version: 1.26.1
  • OS platform and version: Windows 10
  • NodeJS version: 9.8.0
  • React Native version: 0.55.4

Outputs (Include if relevant)

  • Output of the Debug Console (View -> Toggle Debug Console):
OS: win32 x64
Adapter node: v8.9.3 x64
vscode-chrome-debug-core: 3.17.3
Could not debug. Error while executing command 'F\:\Programs\Android\sdk\platform-tools\adb devices': Command failed: F\:\Programs\Android\sdk\platform-tools\adb devices
The filename, directory name, or volume label syntax is incorrect.

  • Output of the React-Native output channel (View -> Toggle Output -> Select React-Native in ListBox):
Metro Bundler ready.

[Info] Packager started.

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

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

Loading dependency graph, done.
[Warning] The Bundle Cache was prewarmed.

[Info] Building and running application.

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

[Error] Error: Error while executing command 'F\:\Programs\Android\sdk\platform-tools\adb devices': Command failed: F\:\Programs\Android\sdk\platform-tools\adb devices
The filename, directory name, or volume label syntax is incorrect.


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

Thoughts

I can see that there is an extra '\' character between 'F' and ':', but for the life of me I cannot find where to go to fix it. I tried changing the environment variable for adb but it did not work.

@macaetano
Copy link

Exact same error here

@Sterlingryan
Copy link
Author

#777 (comment) @macaetano check this out, it worked for me

@macaetano
Copy link

Thx @Sterlingryan, that worked for me too.

@ruslan-bikkinin
Copy link
Contributor

@macaetano thanks for reaching us. Please, try updating to v0.6.16, versions v0.6.14-v0.6.15 are broken.

@Sterlingryan
Copy link
Author

V0.6.16 fixed that, thank you @ruslan-bikkinin that was very fast

@Sterlingryan
Copy link
Author

Sterlingryan commented Sep 21, 2018

The latest update (0.6.17) produced a similar error as mentioned in this issue :

[Error] Error: Error while executing command 'F:\Programs\Android\sdk\platform-tools\adb devices': Command failed: F:\Programs\Android\sdk\platform-tools\adb devices
The filename, directory name, or volume label syntax is incorrect.

@ruslan-bikkinin
Copy link
Contributor

@Sterlingryan could you please copy-paste output of View -> Output -> React-Native: Run Android channel and content of your-project-path/android/local.properties.

@Sterlingryan
Copy link
Author

React-Native: Run Android
`[Warning] Target simulator is not supported for Android platform. If you want to use particular device or simulator for launching Android app, please specify device id (as in 'adb devices' output) instead.

[Info] Using Android SDK location defined in android/local.properties file: F:\Programs\Android\sdk.

[Info] Starting React Native Packager.

Scanning folders for symlinks in f:\GitHub\React Native Projects\RentProfileAgents\node_modules (67ms)
Building and installing the app on the device (cd android && gradlew.bat installDebug)...
WARNING: The option 'android.enableAapt2' is deprecated and should not be used anymore.
Use 'android.enableAapt2=true' to remove this warning.
It will be removed at the end of 2018..
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The option 'android.enableAapt2' is deprecated and should not be used anymore.
Use 'android.enableAapt2=true' to remove this warning.
It will be removed at the end of 2018..
WARNING: The option 'android.enableAapt2' is deprecated and should not be used anymore.
Use 'android.enableAapt2=true' to remove this warning.
It will be removed at the end of 2018..
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The option 'android.enableAapt2' is deprecated and should not be used anymore.
Use 'android.enableAapt2=true' to remove this warning.
It will be removed at the end of 2018..
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The option 'android.enableAapt2' is deprecated and should not be used anymore.
Use 'android.enableAapt2=true' to remove this warning.
It will be removed at the end of 2018..
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
:app:preBuild UP-TO-DATE
:react-native-camera:preBuild UP-TO-DATE
:react-native-camera:preDebugBuild UP-TO-DATE
:react-native-camera:checkDebugManifest UP-TO-DATE
:react-native-camera:processDebugManifest UP-TO-DATE
:react-native-image-resizer:preBuild UP-TO-DATE
:react-native-image-resizer:preDebugBuild UP-TO-DATE
:react-native-image-resizer:checkDebugManifest UP-TO-DATE
:react-native-image-resizer:processDebugManifest UP-TO-DATE
:react-native-securerandom:preBuild UP-TO-DATE
:react-native-securerandom:preDebugBuild UP-TO-DATE
:react-native-securerandom:checkDebugManifest UP-TO-DATE
:react-native-securerandom:processDebugManifest UP-TO-DATE
:react-native-vector-icons:preBuild UP-TO-DATE
:react-native-vector-icons:preDebugBuild UP-TO-DATE
:react-native-vector-icons:checkDebugManifest UP-TO-DATE
:react-native-vector-icons:processDebugManifest UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:react-native-camera:compileDebugAidl UP-TO-DATE
:react-native-image-resizer:compileDebugAidl UP-TO-DATE
:react-native-securerandom:compileDebugAidl UP-TO-DATE
:react-native-vector-icons:compileDebugAidl UP-TO-DATE
:app:compileDebugAidl UP-TO-DATE
:react-native-camera:packageDebugRenderscript NO-SOURCE
:react-native-image-resizer:packageDebugRenderscript NO-SOURCE
:react-native-securerandom:packageDebugRenderscript NO-SOURCE
:react-native-vector-icons:packageDebugRenderscript NO-SOURCE
:app:compileDebugRenderscript UP-TO-DATE
:app:checkDebugManifest UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:prepareLintJar UP-TO-DATE
:app:mergeDebugShaders UP-TO-DATE
:app:compileDebugShaders UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:react-native-camera:mergeDebugShaders UP-TO-DATE
:react-native-camera:compileDebugShaders UP-TO-DATE
:react-native-camera:generateDebugAssets UP-TO-DATE
:react-native-camera:packageDebugAssets UP-TO-DATE
:react-native-image-resizer:mergeDebugShaders UP-TO-DATE
:react-native-image-resizer:compileDebugShaders UP-TO-DATE
:react-native-image-resizer:generateDebugAssets UP-TO-DATE
:react-native-image-resizer:packageDebugAssets UP-TO-DATE
:react-native-securerandom:mergeDebugShaders UP-TO-DATE
:react-native-securerandom:compileDebugShaders UP-TO-DATE
:react-native-securerandom:generateDebugAssets UP-TO-DATE
:react-native-securerandom:packageDebugAssets UP-TO-DATE
:react-native-vector-icons:mergeDebugShaders UP-TO-DATE
:react-native-vector-icons:compileDebugShaders UP-TO-DATE
:react-native-vector-icons:generateDebugAssets UP-TO-DATE
:react-native-vector-icons:packageDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:react-native-camera:compileDebugRenderscript UP-TO-DATE
:react-native-camera:generateDebugResValues UP-TO-DATE
:react-native-camera:generateDebugResources UP-TO-DATE
:react-native-camera:packageDebugResources UP-TO-DATE
:react-native-image-resizer:compileDebugRenderscript UP-TO-DATE
:react-native-image-resizer:generateDebugResValues UP-TO-DATE
:react-native-image-resizer:generateDebugResources UP-TO-DATE
:react-native-image-resizer:packageDebugResources UP-TO-DATE
:react-native-securerandom:compileDebugRenderscript UP-TO-DATE
:react-native-securerandom:generateDebugResValues UP-TO-DATE
:react-native-securerandom:generateDebugResources UP-TO-DATE
:react-native-securerandom:packageDebugResources UP-TO-DATE
:react-native-vector-icons:compileDebugRenderscript UP-TO-DATE
:react-native-vector-icons:generateDebugResValues UP-TO-DATE
:react-native-vector-icons:generateDebugResources UP-TO-DATE
:react-native-vector-icons:packageDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:bundleDebugJsAndAssets SKIPPED
:app:copyDebugIconFonts UP-TO-DATE
:app:mainApkListPersistenceDebug UP-TO-DATE
:app:createDebugCompatibleScreenManifests UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:splitsDiscoveryTaskDebug UP-TO-DATE
:react-native-camera:platformAttrExtractor UP-TO-DATE
:react-native-camera:generateDebugRFile UP-TO-DATE
:react-native-image-resizer:platformAttrExtractor UP-TO-DATE
:react-native-image-resizer:generateDebugRFile UP-TO-DATE
:react-native-securerandom:platformAttrExtractor UP-TO-DATE
:react-native-securerandom:generateDebugRFile UP-TO-DATE
:react-native-vector-icons:platformAttrExtractor UP-TO-DATE
:react-native-vector-icons:generateDebugRFile UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:react-native-camera:generateDebugBuildConfig UP-TO-DATE
:react-native-camera:prepareLintJar UP-TO-DATE
:react-native-camera:generateDebugSources UP-TO-DATE
:react-native-camera:javaPreCompileDebug UP-TO-DATE
:react-native-camera:compileDebugJavaWithJavac UP-TO-DATE
:react-native-camera:processDebugJavaRes NO-SOURCE
:react-native-camera:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug UP-TO-DATE
:react-native-image-resizer:generateDebugBuildConfig UP-TO-DATE
:react-native-image-resizer:prepareLintJar UP-TO-DATE
:react-native-image-resizer:generateDebugSources UP-TO-DATE
:react-native-image-resizer:javaPreCompileDebug UP-TO-DATE
:react-native-image-resizer:compileDebugJavaWithJavac UP-TO-DATE
:react-native-image-resizer:processDebugJavaRes NO-SOURCE
:react-native-image-resizer:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug UP-TO-DATE
:react-native-securerandom:generateDebugBuildConfig UP-TO-DATE
:react-native-securerandom:prepareLintJar UP-TO-DATE
:react-native-securerandom:generateDebugSources UP-TO-DATE
:react-native-securerandom:javaPreCompileDebug UP-TO-DATE
:react-native-securerandom:compileDebugJavaWithJavac UP-TO-DATE
:react-native-securerandom:processDebugJavaRes NO-SOURCE
:react-native-securerandom:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug UP-TO-DATE
:react-native-vector-icons:generateDebugBuildConfig UP-TO-DATE
:react-native-vector-icons:prepareLintJar UP-TO-DATE
:react-native-vector-icons:generateDebugSources UP-TO-DATE
:react-native-vector-icons:javaPreCompileDebug UP-TO-DATE
:react-native-vector-icons:compileDebugJavaWithJavac UP-TO-DATE
:react-native-vector-icons:processDebugJavaRes NO-SOURCE
:react-native-vector-icons:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug UP-TO-DATE
:app:javaPreCompileDebug UP-TO-DATE
:app:compileDebugJavaWithJavac UP-TO-DATE
:app:compileDebugNdk NO-SOURCE
:app:compileDebugSources UP-TO-DATE
:app:transformClassesWithDexBuilderForDebug UP-TO-DATE
:app:transformClassesWithMultidexlistForDebug UP-TO-DATE
:app:transformDexArchiveWithDexMergerForDebug UP-TO-DATE
:app:mergeDebugJniLibFolders UP-TO-DATE
:react-native-camera:compileDebugNdk NO-SOURCE
:react-native-camera:mergeDebugJniLibFolders UP-TO-DATE
:react-native-camera:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE
:react-native-camera:transformNativeLibsWithIntermediateJniLibsForDebug UP-TO-DATE
:react-native-image-resizer:compileDebugNdk NO-SOURCE
:react-native-image-resizer:mergeDebugJniLibFolders UP-TO-DATE
:react-native-image-resizer:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE
:react-native-image-resizer:transformNativeLibsWithIntermediateJniLibsForDebug UP-TO-DATE
:react-native-securerandom:compileDebugNdk NO-SOURCE
:react-native-securerandom:mergeDebugJniLibFolders UP-TO-DATE
:react-native-securerandom:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE
:react-native-securerandom:transformNativeLibsWithIntermediateJniLibsForDebug UP-TO-DATE
:react-native-vector-icons:compileDebugNdk NO-SOURCE
:react-native-vector-icons:mergeDebugJniLibFolders UP-TO-DATE
:react-native-vector-icons:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE
:react-native-vector-icons:transformNativeLibsWithIntermediateJniLibsForDebug UP-TO-DATE
:app:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE
:app:processDebugJavaRes NO-SOURCE
:app:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
:app:validateSigningDebug UP-TO-DATE
:app:packageDebug UP-TO-DATE
:app:assembleDebug UP-TO-DATE
:app:installDebug
Installing APK 'app-debug.apk' on 'Pixel_2(AVD) - 8.0.0' for app:debug
Installed on 1 device.

BUILD SUCCESSFUL in 4s
104 actionable tasks: 1 executed, 103 up-to-date
Running adb -s emulator-5554 reverse tcp:8081 tcp:8081
Starting the app on emulator-5554 (adb -s emulator-5554 shell am start -n com.rentprofileagents/com.rentprofileagents.MainActivity)...
Starting: Intent { cmp=com.rentprofileagents/.MainActivity }
`
local.properties

sdk.dir=F\:\\Programs\\Android\\sdk

@Sterlingryan
Copy link
Author

It runs fine if I downgrade the extension to 0.6.13

@macaetano
Copy link

@Sterlingryan, version 0.6.16 also seems to work fine.

@Sterlingryan
Copy link
Author

Yep you're right

@ruslan-bikkinin
Copy link
Contributor

Hey guys, I confirm that this is a bug that impact users on Windows targeting android apps, and I am working on a fix now. As workaround, you can comment sdk.dir=your-value string in android/local.properties file and set ANDROID_HOME environment variable for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants