Crosswalk Error with Ionic CLI 1.3.8

Getting this error with the update to the Ionic CLI when trying to add crosswalk browser. Happening on multiple machines. Both Mac and Windows.

There was an error adding the Cordova Android library
Running command: /Users/brian/Sandbox/snippet/hooks/before_platform_add/init_directories.js /Users/brian/Sandbox/snippet
Creating android project…
Error: /Users/brian/Sandbox/snippet/engine/cordova-android-c0.5.5/bin/create: Command failed with exit code EACCES
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.emit (events.js:95:17)
at Process.ChildProcess._handle.onexit (child_process.js:818:12)
(CLI v1.3.8)

You can fix it doing chmor -R 777 in the engine folder and its content like @jlcarv explained

Still get errors even after changing permissions on the engine folder. It looks like after it gets past that there are other permission issues in the ‘platforms/android’ folder. I can change the permissions, but that folder gets removed and re-added every time I run the command to add crosswalk.

There was an error adding the Cordova Android library
Running command: /Users/brian/Sandbox/snippet/hooks/before_platform_add/init_directories.js /Users/brian/Sandbox/snippet
Creating android project…
Creating Cordova project for the Android platform:
Path: platforms/android
Package: com.ionicframework.snippet717486
Name: snippet
Android target: android-21
Copying template files…
Android project created with cordova-android@4.0.0-dev
Running command: /Users/brian/Sandbox/snippet/hooks/after_prepare/010_add_platform_class.js /Users/brian/Sandbox/snippet
add to body class: platform-android
Running command: /Users/brian/Sandbox/snippet/hooks/after_prepare/020_remove_sass_from_platforms.js /Users/brian/Sandbox/snippet
Installing “com.ionic.keyboard” for android
Failed to install ‘com.ionic.keyboard’:Error: /Users/brian/Sandbox/snippet/platforms/android/cordova/version: Command failed with exit code EACCES
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.emit (events.js:95:17)
at Process.ChildProcess._handle.onexit (child_process.js:818:12)
Error: /Users/brian/Sandbox/snippet/platforms/android/cordova/version: Command failed with exit code EACCES
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.emit (events.js:95:17)
at Process.ChildProcess._handle.onexit (child_process.js:818:12)
(CLI v1.3.8)

same problem here. I was able to install crosswalk without errors once I removed the com.ionic.keyboard plugin

But now I have an error when running ionic run or ionic build

Running command: /home/tobika/Documents/pooapp/hooks/after_prepare/010_add_platform_class.js /home/tobika/Documents/pooapp
add to body class: platform-android
Running command: /home/tobika/Documents/pooapp/hooks/after_prepare/020_remove_sass_from_platforms.js /home/tobika/Documents/pooapp
Running command: /home/tobika/Documents/pooapp/platforms/android/cordova/build 
ERROR building one of the platforms: Error: /home/tobika/Documents/pooapp/platforms/android/cordova/build: Command failed with exit code EACCES
You may not have the required environment or OS to build this project

ok this was too simple, apparently if you have the EACCES error with build or run it’s just a missing executable tag on the files in platforms/android/cordova

chmod a+x build or run should do

1 Like

Here is what happens when I try to install crosswalk.

$ ionic browser add crosswalk
Adding crosswalk browser

Downloading: https://github.com/driftyco/cordova-crosswalk-engine/archive/c0.6.1.zip
[=============================]  100%  0.0s

Downloaded cordova-crosswalk-engine

Downloading: https://github.com/driftyco/cordova-android/archive/c0.5.5.zip
[=============================]  100%  0.0s
 ✗ (node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral.
  
✗ (node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral.

/* I get about 100 of these Recursive warnings */

/usr/local/lib/node_modules/ionic/node_modules/colors/colors.js:125
    return str + '';
               ^
RangeError: Maximum call stack size exceeded

Then, if I run the command again, this is what happens…

$ ionic browser add crosswalk

Adding crosswalk browser

Downloaded cordova-crosswalk-engine

Downloaded Cordova Android for Crosswalk

Downloading: https://download.01.org/crosswalk/releases/crosswalk/android/stable/9.38.208.10/arm/crosswalk-webview-9.38.208.10-arm.zip

Downloading: https://download.01.org/crosswalk/releases/crosswalk/android/stable/9.38.208.10/x86/crosswalk-webview-9.38.208.10-x86.zip
[=============================]  100%  0.0s
[========================     ]  83%  15.4s
Copying over Crosswalk Webview (arm) to the Crosswalk Engine

Finished copying Crosswalk Webview (arm) to the Crosswalk Engine

Copying over Crosswalk Webview (x86) to the Crosswalk Engine

Finished copying Crosswalk Webview (x86) to the Crosswalk Engine

Downloaded Crosswalk webviews

Removed old Cordova Android platform
There was an error adding the Cordova Android library
Running command: /Users/matt/Documents/_Ionic/myApp/hooks/before_platform_add/init_directories.js /Users/matt/Documents/_Ionic/myApp
Creating android project...
Error: /Users/matt/Documents/_Ionic/myApp/engine/cordova-android-c0.5.5/bin/create: Command failed with exit code EACCES
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
    at ChildProcess.emit (events.js:95:17)
    at Process.ChildProcess._handle.onexit (child_process.js:818:12)
 (CLI v1.3.8)

I have the same problem. Any solution ?

I ended up changing the permissions on my directory and all subdirectories after the first failed attempt. Then, I run all my commands as sudo and things seems to work.

sudo find /Users/matt/Documents/_Ionic/myApp -type d -exec chmod -R 777 {} \;
4 Likes

thanks it’s working. Hope they will fix that in order to don’t have to change permission like that…