Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: 'ionic browser revert android' doesn't remove cordova-plugin-crosswalk-webview plugin #3482

Closed
mattezell opened this issue Apr 7, 2015 · 7 comments

Comments

@mattezell
Copy link

commented Apr 7, 2015

Type: bug

Platform: android 4.4 webview

When attempting to revert to Android after having introduced Crosswalk to my project, using the documented 'ionic browser revert android' doesn't completely clean up the environment - the breaking omission in my case being the still present cordova-plugin-crosswalk-webview plugin.

Below, you will find my info as well as the steps to reproduce copied and pasted from my console.

Ionic Info:
c:\Working\temp\test2>ionic info
Your system information:
OS: Windows 7 SP1
Node Version: v0.10.36
Cordova CLI: 4.3.0
Ionic Version: 1.0.0-rc.2
Ionic CLI Version: 1.3.19

And my buffer of creating a new project, adding android, adding crosswalk, reverting from crosswalk to Android, later removing android platform and then attempting to add android again (as would often be done of the lifetime of a project using crosswalk (see forums for example)). As you will see, 'cordova-plugin-crosswalk-webview' is left in 'plugins'. In my case, if I manually delete this plugin, I can then again add android as a platform (using 'ionic platform add android').

Am I doing something wrong?

Create an ionic.io account to use the Ionic View app and other features?
(Y/n): n

c:\Working\temp>cd test2

c:\Working\temp\test2>ionic platform add android
Running command: "C:\Program Files (x86)\nodejs\node.exe" c:\Working\temp\test2\hooks\before_platform_add\init_directories.js c:\Working\temp\te
st2
Creating android project...
Creating Cordova project for the Android platform:
        Path: platforms\android
        Package: com.ionicframework.test2352495
        Name: test2
        Android target: android-19
Copying template files...
Project successfully created.
Running command: "C:\Program Files (x86)\nodejs\node.exe" c:\Working\temp\test2\hooks\after_prepare\010_add_platform_class.js c:\Working\temp\te
st2
add to body class: platform-android
Running command: "C:\Program Files (x86)\nodejs\node.exe" c:\Working\temp\test2\hooks\after_prepare\020_remove_sass_from_platforms.js c:\Working\project
\temp\test2
Installing "com.ionic.keyboard" for android
Installing "org.apache.cordova.console" for android
Installing "org.apache.cordova.device" for android
Running command: "C:\Program Files (x86)\nodejs\node.exe" c:\Working\temp\test2\hooks\after_platform_add\010_install_plugins.js c:\Working\temp\
test2

c:\Working\temp\test2>ionic browser add crosswalk
Adding crosswalk browser

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

Downloaded cordova-crosswalk-engine

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

Finished downloading cordova-android v4.0.x

Altered permissions for Android Paths

Downloaded Cordova Android for Crosswalk

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

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

Finished copying Crosswalk Webview (arm) to the Crosswalk Engine
[=============================]  100%  0.0s

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

Added Cordova Android 4.0

Added Crosswalk Webview Engine

Ionic Browser Add completed for Crosswalk

c:\Working\temp\test2>ionic browser remove crosswalk
Removing crosswalk browser

c:\Working\temp\test2>... dir
'...' is not recognized as an internal or external command,
operable program or batch file.

c:\Working\temp\test2>dir
 Volume in drive C has no label.
 Volume Serial Number is D481-B114

 Directory of c:\Working\temp\test2

04/07/2015  08:32 AM    <DIR>          .
04/07/2015  08:32 AM    <DIR>          ..
04/07/2015  08:29 AM                29 .bowerrc
04/07/2015  08:29 AM               138 .gitignore
04/07/2015  08:30 AM               117 bower.json
04/07/2015  08:29 AM               798 config.xml
04/07/2015  08:33 AM    <DIR>          engine
04/07/2015  08:29 AM             1,353 gulpfile.js
04/07/2015  08:32 AM    <DIR>          hooks
04/07/2015  08:32 AM               160 ionic.project
04/07/2015  08:34 AM               378 package.json
04/07/2015  08:34 AM    <DIR>          platforms
04/07/2015  08:34 AM    <DIR>          plugins
04/07/2015  08:29 AM    <DIR>          scss
04/07/2015  08:30 AM    <DIR>          www
               7 File(s)          2,973 bytes
               8 Dir(s)   9,252,102,144 bytes free

c:\Working\temp\test2>dir platforms
 Volume in drive C has no label.
 Volume Serial Number is D481-B114

 Directory of c:\Working\temp\test2\platforms

04/07/2015  08:34 AM    <DIR>          .
04/07/2015  08:34 AM    <DIR>          ..
04/07/2015  08:34 AM    <DIR>          android
               0 File(s)              0 bytes
               3 Dir(s)   9,252,098,048 bytes free

c:\Working\temp\test2>ionic platform remove andorid
running cordova platform remove andorid
Platform "andorid" not recognized as a core cordova platform. See `cordova platform list`.

c:\Working\temp\test2>ionic platform remove android
running cordova platform remove android
Removing platform from package.json file

c:\Working\temp\test2>ionic platform add android
Downloading Default Ionic Resources

Downloading: https://github.com/driftyco/ionic-default-resources/archive/master.zip
[=============================]  100%  0.0s
Done adding default Ionic resources
Adding icons for platform: android
running cordova platform add android
Running command: "C:\Program Files (x86)\nodejs\node.exe" c:\Working\temp\test2\hooks\before_platform_add\init_directories.js c:\Working\temp\te
st2
Adding android project...
Creating Cordova project for the Android platform:
        Path: platforms\android
        Package: com.ionicframework.test2352495
        Name: test2
        Android target: android-21
Copying template files...
Project successfully created.
Running command: "C:\Program Files (x86)\nodejs\node.exe" c:\Working\temp\test2\hooks\after_prepare\010_add_platform_class.js c:\Working\temp\te
st2
add to body class: platform-android
Running command: "C:\Program Files (x86)\nodejs\node.exe" c:\Working\temp\test2\hooks\after_prepare\020_remove_sass_from_platforms.js c:\Working\project
\temp\test2
Installing "com.ionic.keyboard" for android
Installing "org.apache.cordova.console" for android
Installing "org.apache.cordova.device" for android
Running command: "C:\Program Files (x86)\nodejs\node.exe" c:\Working\temp\test2\hooks\after_platform_add\010_install_plugins.js c:\Working\temp\
test2
Saving platform to package.json file

c:\Working\temp\test2>ionic browser list
iOS - Browsers Listing:

Not Available Yet - WKWebView
Not Available Yet - UIWebView


Android - Browsers Listing:


Available - Crosswalk - ionic browser add crosswalk
         Version 8.37.189.14 Published Fri Oct 10 2014 03:26:00 GMT-0500 (Central Daylight Time)
         Version 9.38.208.10 Published Tue Nov 25 2014 11:45:00 GMT-0600 (Central Standard Time)
         Version 10.39.235.15 Published Wed Dec 31 2014 13:16:00 GMT-0600 (Central Standard Time)
         Version 11.40.277.7 Published Thu Feb 26 2015 07:03:00 GMT-0600 (Central Standard Time)
         Version 12.41.296.5 Published Thu Mar 05 2015 13:19:00 GMT-0600 (Central Standard Time)
(canary) Version 13.41.318.0 Published Wed Mar 11 2015 09:22:00 GMT-0500 (Central Daylight Time)

Available - Browser (default) - ionic browser revert android
Not Available Yet - GeckoView

c:\Working\temp\test2>ionic browser add crosswalk@13.41.318.0
Adding crosswalk browser

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

Downloaded cordova-crosswalk-engine

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

Finished downloading cordova-android v4.0.x

Altered permissions for Android Paths

Downloaded Cordova Android for Crosswalk

Downloading: https://download.01.org/crosswalk/releases/crosswalk/android/canary/13.41.318.0/arm/crosswalk-webview-13.41.318.0-arm.zip

Downloading: https://download.01.org/crosswalk/releases/crosswalk/android/canary/13.41.318.0/x86/crosswalk-webview-13.41.318.0-x86.zip
[=============================]  100%  0.0s
[=============================]  100%  0.0s

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

Added Cordova Android 4.0
add crosswalk plugin ionic plugin add ./engine/cordova-crosswalk-engine-c0.7.1

Added Crosswalk Webview Engine

Copying default gradle.properties file

Ionic Browser Add completed for Crosswalk

c:\Working\temp\test2>ionic browser revert android
Reverting android browser
Reverted android browser

c:\Working\temp\test2>ionic platform remove android
running cordova platform remove android
Removing platform from package.json file

c:\Working\temp\test2>ionic platform list
running cordova platform list
Installed platforms:
Available platforms: amazon-fireos, android, blackberry10, browser, firefoxos, windows, windows8, wp8

c:\Working\temp\test2>ionic platform add android
running cordova platform add android
Running command: "C:\Program Files (x86)\nodejs\node.exe" c:\Working\temp\test2\hooks\before_platform_add\init_directories.js c:\Working\temp\te
st2
Adding android project...
Creating Cordova project for the Android platform:
        Path: platforms\android
        Package: com.ionicframework.test2352495
        Name: test2
        Android target: android-21
Copying template files...
Project successfully created.
Running command: "C:\Program Files (x86)\nodejs\node.exe" c:\Working\temp\test2\hooks\after_prepare\010_add_platform_class.js c:\Working\temp\te
st2
add to body class: platform-android
Running command: "C:\Program Files (x86)\nodejs\node.exe" c:\Working\temp\test2\hooks\after_prepare\020_remove_sass_from_platforms.js c:\Working\project
\temp\test2
Installing "com.ionic.keyboard" for android
Installing "cordova-plugin-crosswalk-webview" for android
Failed to install 'cordova-plugin-crosswalk-webview':CordovaError: Plugin doesn't support this project's cordova-android version. cordova-android: 3.7
.1, failed version requirement: >=4
    at checkEngines (C:\Users\user\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\plugman\install.js:116:29)
    at C:\Users\user\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\plugman\install.js:289:16
    at _fulfilled (C:\Users\user\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:787:54)
    at self.promiseDispatch.done (C:\Users\user\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:816:30)
    at Promise.promise.promiseDispatch (C:\Users\user\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:749:13)
    at C:\Users\user\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:557:44
    at flush (C:\Users\user\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:108:17)
    at process._tickCallback (node.js:442:13)

c:\Working\temp\test2>ionic info

Your system information:

OS: Windows 7 SP1
Node Version: v0.10.36
Cordova CLI: 4.3.0
Ionic Version: 1.0.0-rc.2
Ionic CLI Version: 1.3.19



c:\Working\temp\test2>

@mattezell mattezell changed the title 'ionic browser revert android' doesn't remove cordova-plugin-crosswalk-webview plugin bug: 'ionic browser revert android' doesn't remove cordova-plugin-crosswalk-webview plugin Apr 7, 2015
@mattezell

This comment has been minimized.

Copy link
Author

commented Apr 7, 2015

Ah, crud. This should be in ionic-cli... Please move (in the meantime, I am researching to see if I can move).

@mattezell

This comment has been minimized.

Copy link
Author

commented Apr 7, 2015

Here it is:

Directory of c:\Working\project\temp\test2\plugins

04/07/2015  02:29 PM    <DIR>          .
04/07/2015  02:29 PM    <DIR>          ..
04/07/2015  02:29 PM               738 android.json
04/07/2015  08:30 AM    <DIR>          com.ionic.keyboard
04/07/2015  02:27 PM    <DIR>          cordova-plugin-crosswalk-webview
04/07/2015  02:27 PM               334 fetch.json
04/07/2015  08:30 AM    <DIR>          org.apache.cordova.console
04/07/2015  08:30 AM    <DIR>          org.apache.cordova.device
04/07/2015  02:27 PM    <DIR>          org.apache.cordova.splashscreen
               2 File(s)          1,072 bytes
               7 Dir(s)   8,956,428,288 bytes free

c:\Working\project\temp\test2>

Of course, changing ionic\browser.js to match this naming convention gets around it:

IonicTask.prototype.removeCrosswalk = function removeCrosswalk() {
  //...existing function code
  shelljs.exec('ionic plugin rm cordova-plugin-crosswalk-webview')
  //...existing function code
}

Resulting in:

c:\Working\project\temp\test2>ionic browser revert android
Reverting android browser
Reverted android browser

c:\Working\project\temp\test2>dir plugins
 Volume in drive C has no label.
 Volume Serial Number is D481-B114

 Directory of c:\Working\project\temp\test2\plugins

04/07/2015  04:58 PM    <DIR>          .
04/07/2015  04:58 PM    <DIR>          ..
04/07/2015  04:58 PM             1,622 android.json
04/07/2015  08:30 AM    <DIR>          com.ionic.keyboard
04/07/2015  02:27 PM               334 fetch.json
04/07/2015  08:30 AM    <DIR>          org.apache.cordova.console
04/07/2015  08:30 AM    <DIR>          org.apache.cordova.device
04/07/2015  02:27 PM    <DIR>          org.apache.cordova.splashscreen
               2 File(s)          1,956 bytes
               6 Dir(s)   9,040,609,280 bytes free

c:\Working\project\temp\test2>ionic platform add android
running cordova platform add android
Running command: "C:\Program Files (x86)\nodejs\node.exe" c:\Working\project\temp\test2\hooks\before_platform_add\init_directories.js c:\Working\project\temp\te
st2
Adding android project...
Creating Cordova project for the Android platform:
        Path: platforms\android
        Package: com.ionicframework.test2352495
        Name: test2
        Android target: android-21
Copying template files...
Project successfully created.
Running command: "C:\Program Files (x86)\nodejs\node.exe" c:\Working\project\temp\test2\hooks\after_prepare\010_add_platform_class.js c:\Working\project\temp\te
st2
add to body class: platform-android
Running command: "C:\Program Files (x86)\nodejs\node.exe" c:\Working\project\temp\test2\hooks\after_prepare\020_remove_sass_from_platforms.js c:\Working\project
\temp\test2
Installing "com.ionic.keyboard" for android
Installing "org.apache.cordova.console" for android
Installing "org.apache.cordova.device" for android
Installing "org.apache.cordova.splashscreen" for android
Running command: "C:\Program Files (x86)\nodejs\node.exe" c:\Working\project\temp\test2\hooks\after_platform_add\010_install_plugins.js c:\Working\project\temp\
test2
Fetching plugin "[object" via plugin registry

Saving platform to package.json file

c:\Working\project\temp\test2>
@mattezell

This comment has been minimized.

Copy link
Author

commented Apr 10, 2015

Note: This can be closed. Was for CLI - change has been pulled into master.

@perrygovier

This comment has been minimized.

Copy link
Member

commented Apr 13, 2015

Thanks!

@fdambrosio

This comment has been minimized.

Copy link

commented Oct 3, 2015

I have the same problem
Cordova CLI: 5.3.3
Gulp version: CLI version 3.9.0
Gulp local: Local version 3.9.0
Ionic Version: 1.1.0
Ionic CLI Version: 1.6.5
Ionic App Lib Version: 0.3.9
ios-deploy version: Not installed
ios-sim version: 5.0.1
OS: Mac OS X Yosemite
Node Version: v0.12.7
Xcode version: Xcode 6.4 Build version 6E35b

@mhartington

This comment has been minimized.

Copy link
Member

commented Oct 4, 2015

@fdambrosio you can now just do ionic plugin rm <plugin_name> since the browser command has been depreciated.

@fdambrosio

This comment has been minimized.

Copy link

commented Oct 5, 2015

thanks, but my warkaround has worked before changing adding browser ''crowsswalk-lite" and after "revert android"

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants
You can’t perform that action at this time.