question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to run `react-native log-android` in windows

See original GitHub issue

When I attempt to run react-native log-android in windows I get the following error: info Starting logkitty The filename, directory name, or volume label syntax is incorrect. error Command failed: 'C:\Users\reidk\AppData\Local\Android\sdk/platform-tools/adb' logcat -c The filename, directory name, or volume label syntax is incorrect. . Run CLI with --verbose flag for more details. Error: Command failed: 'C:\Users\reidk\AppData\Local\Android\sdk/platform-tools/adb' logcat -c The filename, directory name, or volume label syntax is incorrect.

It appears as though some of the slashes are facing the wrong direction in the command.

React Native version: 0.60.5

Steps To Reproduce

  1. Fresh install of a project running 0.60.5
  2. run react-native log-android

Describe what you expected to happen: To open the logcat

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:8

github_iconTop GitHub Comments

3reactions
reidkerseycommented, Aug 26, 2019

It appears to be an issue with logkitty that manifested itself with the last CLI update.

If I change logkitty’s build/android/adb.js file to do the following I can get it to function: Line 29: return process.env.ANDROID_HOME ? ``${process.env.ANDROID_HOME}\\platform-tools\\adb`` : 'adb'; ^^I cant seem to figure out how to properly escape backitics, but the above line should only have one backtick before the $ and after adb Line 34: (0, _child_process.execSync)(${adbPath} logcat -c);

Its hackish, but works for now.

1reaction
deepaknaikhnvrmcommented, Aug 27, 2019

Yeah removing a single quotes in line number 34 worked for me. The line number 34 should be (0, _child_process.execSync)(${adbPath} logcat -c); (Only backtick no quotes required)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to run react-native app on android emulator because ...
reactjs - Unable to run react-native app on android emulator because 'C:/User/firstname' is not recognized as internal or external command - ...
Read more >
Troubleshooting - React Native
If you run into issue where executing npm run android on macOS throws the above error, try to run sudo chmod +x android/gradlew...
Read more >
Addressing common errors in React Native - LogRocket Blog
Failed to install the app; Unable to load script; React Native run-android command is unrecognized; react-native command not found ...
Read more >
React Native for Android development on Windows
If you want to run your project on an Android emulator, you shouldn't need to take any action as Android Studio installs with...
Read more >
Troubleshoot known issues with Android Emulator
On ChromeOS, Android Virtual Devices (AVDs) might fail to launch because the libnss3 dependency is missing. To launch the AVDs successfully, run ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found