Crosswalk Integration Beta in Ionic CLI (v1.3.2)

I think nearly all cordova plugins are broken when you run an app with crosswalk and livereload in order to do some debugging: ionic run android -l -c -s As you see the deviceready event is never fired.

1     761436   log      deviceready has not fired after 5 seconds.
2     761439   log      Channel not fired: onCordovaInfoReady
3     761444   log      Channel not fired: onFileSystemPathsReady

When I run the android app not served via ionic/livereload ionic run all the plugins and events run as expected so it seems to be a problem really related to the livereload feature.

For now, Iā€™ll do the debugging without crosswalk and just add it before publishing on the store.

Has anyone else expirienced the same bug?

I can report that with the 1.0 version of the Cordova Splashscreen plugin the splashscreen is being displayed when using Crosswalk.

image

2 Likes

I got some questions about crosswalk

I saw the supported plugins list for Cordova 3.5 : https://github.com/crosswalk-project/crosswalk-website/wiki/Plugins-list-@-3.5.0-supported-by-crosswalk-cordova-android

For geolocation there is "Recommend to use Crosswalkā€™s geolocation API"
What does that mean?

I saw in previous posts that some plugins were not working (like Facebook)

It should be awesome to have an exhaustive list of supported plugins (external plugins)

In my case I use plugins that are not in Crosswalk supported list : Ionic Keyboard, FacebookConnect, PushPlugin and Statusbar.

It seems that Crosswalk is not for me :persevere:

I released a private beta of my app, and some users were using old android or phones like ā€œWikoā€

They report :

  • Issue with native date (input type=ā€œdateā€)
  • Issue with Ionic Popup (not appearing)
  • Performance issues

I was wondering if crosswalk could help automagically resolve issues like that :smiley:

But if plugins donā€™t work, I would have to wait for a next version

For those having the error: (for me it was due to the imagePicker plugin)

Missing one of the key attributes ā€˜action#name,category#nameā€™ on element intent-filter at AndroidManifest.xml:33:13

I did succeed building by removing the empty property in the plugin.xml file of that plugin.
Cf this commit:
https://github.com/mattchete/cordova-imagePicker/commit/19b04dbc312e70e30c09100b835c0438a2b2bf2b

Edit: The ā€œbuild --releaseā€ failed. Suceeded build by removing the folders src/android/Library/res/values-xx of the plugin
Cf this commit:
https://github.com/mattchete/cordova-imagePicker/commit/6aef28d9de043f85aa3784f2fd354ec71d16ac8e

I fixed it: Crosswalk Integration Beta in Ionic CLI (v1.3.2)

Iā€™m have the same behaviour - would be very interested in a solution.

Greetings Ionic Team, I am getting the following error when trying to run a Genymotion emulation running a Galaxy S3

Running command: /Users/dwitt/Desktop/MonstercatAppCrosswalk/hooks/after_prepare/010_add_platform_class.js /Users/dwitt/Desktop/MonstercatAppCrosswalk
add to body class: platform-android
Running command: /Users/dwitt/Desktop/MonstercatAppCrosswalk/hooks/after_prepare/020_remove_sass_from_platforms.js /Users/dwitt/Desktop/MonstercatAppCrosswalk
Running command: /Users/dwitt/Desktop/MonstercatAppCrosswalk/platforms/android/cordova/run
ANDROID_HOME=/Applications/Android SDK/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_11.jdk/Contents/Home
WARNING : No target specified, deploying to device ā€˜192.168.56.101:5555ā€™.
Running: /Users/dwitt/Desktop/MonstercatAppCrosswalk/platforms/android/gradlew cdvBuildDebug -b /Users/dwitt/Desktop/MonstercatAppCrosswalk/platforms/android/build.gradle -PcdvBuildArch=x86 -Dorg.gradle.daemon=true
Downloading http://services.gradle.org/distributions/gradle-2.2.1-all.zip

Exception in thread ā€œmainā€ java.lang.RuntimeException: java.io.IOException: Invalid Http response
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:78)
at org.gradle.wrapper.Install.createDist(Install.java:47)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
Caused by: java.io.IOException: Invalid Http response
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1553)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1439)
at org.gradle.wrapper.Download.downloadInternal(Download.java:59)
at org.gradle.wrapper.Download.download(Download.java:45)
at org.gradle.wrapper.Install$1.call(Install.java:60)
at org.gradle.wrapper.Install$1.call(Install.java:47)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
ā€¦ 3 more

/Users/dwitt/Desktop/MonstercatAppCrosswalk/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
Error code 1 for command: /Users/dwitt/Desktop/MonstercatAppCrosswalk/platforms/android/gradlew with args: cdvBuildDebug,-b,/Users/dwitt/Desktop/MonstercatAppCrosswalk/platforms/android/build.gradle,-PcdvBuildArch=x86,-Dorg.gradle.daemon=true
ERROR running one or more of the platforms: Error: /Users/dwitt/Desktop/MonstercatAppCrosswalk/platforms/android/cordova/run: Command failed with exit code 1
You may not have the required environment or OS to run this project

Enviroment Details:

OS: Mac OS X Yosemite
Node Version: v0.12.0
Cordova CLI: 4.2.0
Ionic CLI Version: 1.3.10
Xcode version: Xcode 6.1.1 Build version 6A2008a
ios-sim version: 3.0.0

Any help?
Thanks

Hey, I had the same issue. I donā€™t think itā€™s the ā€˜nameā€™ field that causes the build to fali, itā€™s ā€˜maxSdkVersionā€™. It seems like crosswalk script treat the both permissions as a unique permission because one has ā€˜the maxSdkVersionā€™ field defined.

What Iā€™m ended up doing is I forked the plugin thatā€™s defining the ā€˜maxSdkVersionā€™ field and remove the ā€˜maxSdkVersionā€™ field. Then I used the forked version of the plugin on my project.

Iā€™ve looked and it appears to be an issue with the calling of Gradle. When I call ā€œionic run androidā€ and it gets to the point where it launches gradlew it fails. I manually installed gradle and added it to my path (works by just running gradle) it works. Looking inside the file gradle and gradlew are the exact same, so is there a way for whatever script is running to call grade instead of gradlew?

Same problem here, using Genymotion, here is the github issue https://github.com/driftyco/ionic-cli/issues/265

Any fix about this? Thanks in advance

I tried creating a new user account and I still receiving the same error.

@asanjum Could you be more specific on how you resolved this? Did you just remove the empty entry from the plugin.xml or what?

I think I just deleted the empty tag from the file.

guys from what I can tell cordova-crosswalk-engine-c0.5/ is using an old apache project which is called org.apache.harmony which statically links to old OpenSSL version and this trigger an issue with google play store.

[update] : the recommended version for crosswalk is v 10+ this will solve the issue

By default i get two separates apks for x86 and ARM7, but how i can combine them? i tried with BUILD_MULTIPLE_APKS=false ionic build android but i get two apks too.

Thanks

thanks, but how can i update the crosswalk? just ionic browser add crosswalk?

you can do it like this : ionic browser add crosswalk@10.39.235.15 but you need first to remove the old one ionic browser rm crosswalk

1 Like

Thanks!

p.s: you know something about my last question? thanks in advance

Happy to report success integrating crosswalk on windows. Had to rebuild our project from scratch though, but all appears ok now. Still issues with some plugins not working (toasts etc)

still the size issue, i saw crosswalk team has released a lite version, the apk size can be reduced to 10M
can I use this version in ionic?

2 Likes