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.

mac M1 capacitor run android fails

See original GitHub issue

Description:

In my M1 Mac with Big Sur 11.4 when I run ionic cap run android build fails

Output: [fatal] TypeError: Cannot read property 'stack' of undefined [capacitor] at runCommand (/Users/ilias/source/repos/njection-app/node_modules/@capacitor/cli/dist/tasks/run.js:65:40) [capacitor] at processTicksAndRejections (internal/process/task_queues.js:95:5) [capacitor] at async /Users/ilias/source/repos/njection-app/node_modules/@capacitor/cli/dist/index.js:94:9 [capacitor] at async /Users/ilias/source/repos/njection-app/node_modules/@capacitor/cli/dist/telemetry.js:26:13 [capacitor] at async Command.<anonymous> (/Users/ilias/source/repos/njection-app/node_modules/@capacitor/cli/dist/util/cli.js:12:13)

My ionic info:

Ionic:

   Ionic CLI                     : 6.16.3 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.6.9
   @angular-devkit/build-angular : 12.0.5
   @angular-devkit/schematics    : 12.0.4
   @angular/cli                  : 12.0.4
   @ionic/angular-toolkit        : 2.1.2

Capacitor:

   Capacitor CLI      : 3.0.1
   @capacitor/android : 3.0.1
   @capacitor/core    : 3.0.1
   @capacitor/ios     : 3.0.2

Utility:

   cordova-res : 0.15.3
   native-run  : 1.4.0

System:

   NodeJS : v14.17.1 (/usr/local/bin/node)
   npm    : 6.14.13
   OS     : macOS Big Sur

Other Information:

Also when I run the app from Android Studio it works fine.

I use a Galaxy S9+ with Android 10.0 as a device.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
eliassparagiscommented, Jul 24, 2021

I run chmod 755 android/gradlew and problem solved. Thank you

0reactions
ionitron-bot[bot]commented, Nov 11, 2022

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

bug: Capacitor fails building on MacOS Big Sur (suspecting ...
MacOS 11.0 Big Sur with M1 ARM processor; Deploy Quasar base project; Install required dependencies for Capacitor from Quasar's ...
Read more >
Can't run ionic cap add ios on Mac M1? - Stack Overflow
After searching tons of answers, finally found the solution: Uninstall Ruby; Uninstall Cocoapods; Unistall Capacitor. Then, in M1 Native, ...
Read more >
iOS Troubleshooting Guide | Capacitor Documentation
On iOS, this can happen if Capacitor doesn't find the plugins or can't inject its code into the WebView. First of all, make...
Read more >
Migrating to Cordova-Android 11 - Ionic
Cordova on a Mac M1. If running into the error during building for android: General error during conversion: Unsupported class file major ...
Read more >
Ionic Capacitor: IOS build error - Searching for inspections ...
When I run: ionic capacitor build android, the command works without ... The ffi error is a know CocoaPods bug on M1 macs,...
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