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.

bug: @capacitor/android: 3.4.3 - ERR_SUBPROCESS_COMMAND_NOT_FOUND

See original GitHub issue

Bug Report ERR_SUBPROCESS_COMMAND_NOT_FOUND

What command is it looking for? Perhaps the error should specify?

Capacitor Version

% npx cap doctor android 
💊   Capacitor Doctor  💊 

Latest Dependencies:

  @capacitor/cli: 3.4.3
  @capacitor/core: 3.4.3
  @capacitor/android: 3.4.3
  @capacitor/ios: 3.4.3

Installed Dependencies:

  @capacitor/cli: 3.4.3
  @capacitor/core: 3.4.3
  @capacitor/android: 3.4.3
  @capacitor/ios: 3.4.3

Platform(s)

@capacitor/android: 3.4.3

Current Behavior

% npx cap run android
✔ Copying web assets from www to android/app/src/main/assets/public in 9.85ms
✔ Creating capacitor.config.json in android/app/src/main/assets in 1.07ms
✔ copy android in 16.39ms
✔ Updating Android plugins in 1.16ms
[info] Found 3 Capacitor plugins for android:
       @capacitor/camera@1.3.1
       @capacitor/filesystem@1.1.0
       @capacitor/geolocation@1.3.1
✔ update android in 28.55ms
✖ Running Gradle build - failed!
[error] ERR_SUBPROCESS_COMMAND_NOT_FOUND

Expected Behavior

Expect the app to run in the emulator

Code Reproduction

https://github.com/codeconsole/exiftest/tree/capacitor

Other Technical Details

npm --version output: 8.5.5

node --version output: v17.8.0

pod --version output (iOS issues only): 1.11.2

Additional Context

% cd android
% ./gradlew assembleDebug 

BUILD SUCCESSFUL in 798ms
153 actionable tasks: 153 up-to-date
% npx ionic info

Ionic:

   Ionic CLI : 6.19.0

Capacitor:

   Capacitor CLI      : 3.4.3
   @capacitor/android : 3.4.3
   @capacitor/core    : 3.4.3
   @capacitor/ios     : 3.4.3

Utility:

   cordova-res : not installed globally
   native-run  : 1.5.0

System:

   NodeJS : v17.8.0 (/opt/homebrew/Cellar/node/17.8.0/bin/node)
   npm    : 8.5.5
   OS     : macOS Monterey
% sw_vers
ProductName:	macOS
ProductVersion:	12.3
BuildVersion:	21E230
% sysctl -a | grep brand    
machdep.cpu.brand_string: Apple M1 Pro

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:3
  • Comments:15 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
jcesarmobilecommented, Apr 22, 2022

Should be fixed by a

brew update && brew upgrade libuv

1reaction
jcesarmobilecommented, Apr 20, 2022

There seems to be some weird bug on the nodejs installed from homebrew (not only 17, I’ve seen it on 16 and 14 too, 12 worked fine)

I’ve created a gist with a simplification of the code that is failing, and it’s nodejs spawn behaving differently on the homebrew node installs when running the gradle file, it calls the error function with ENOENT and the close function with -2 code, but the gradle execution finished correctly with

BUILD SUCCESSFUL in 490ms 1 actionable task: 1 executed

When using node from nvm/nodenv it doesn’t call the error function and the close is called with code 0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gradle build - failed! (subprocess command not found)
It works fine if I build / run it through Android Studio directly. Is there anyway to debug this to better understand what...
Read more >
bug: SubprocessError · Issue #4818 · ionic-team/ionic-cli
at new SubprocessError (C:\Users\suresh\AppData\Roaming\npm\node_modules@ionic\cli\node_modules@ionic\utils-subprocess\dist\index.js:41:23)
Read more >
An error occurred while running subprocess capacitor when ...
answer was the key. looks that the new version of the capacitor has a lot of changes. Even I re-installed android studio to...
Read more >
Ionic Forum - Latest topics - RSSing.com
Using “ionic serve” at the command line, my app seems to compile with no errors present in the terminal window. At the completion...
Read more >
Python Subprocess Module - Running external programs
Content. method summary; shell parameter summary; Basic Usage - primary function calls. check_call; check_output; call; Popen. Error Checking.
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