cordova-plugin-crypt-file icon indicating copy to clipboard operation
cordova-plugin-crypt-file copied to clipboard

Live reload with Ionic

Open Maraket opened this issue 7 years ago • 7 comments

So I have been trying to run this plugin on some of my projects for work, this being heavily reliant on Ionic 2 and thereby typescript. Basically I am finding when testing an app, I am having the following issue when trying to do a live reload with the below command: ionic cordova run android --livereload Only to have the call failed with creating a call to file:///android_asset/www/+++/http://192.168.0.6:8100.

The code isn't really important since this issue was experienced even with a new project doing the following:

  • run command: ionic start myApp sidemenu
  • cd into the directory
  • install the plugin with: ionic cordova plugin add cordova-plugin-crypt-file
  • do a test run (in my case ran this on my android phone), ionic cordova run android --livereload
  • it will fail to run, and will call file:///android_asset/www/+++/http://192.168.0.6:8100 which is not a valid for a number of reasons.

Maraket avatar Jan 15 '18 11:01 Maraket

I also have this same problem. For now I have only workaround: remove plugin before ionic run, and add before normal build.

grzegorzbernat avatar Mar 05 '18 22:03 grzegorzbernat

i have the same problem

fdambrosio avatar Apr 14 '18 14:04 fdambrosio

+1

airstep avatar May 04 '18 09:05 airstep

+1

eomonteiro avatar May 16 '18 16:05 eomonteiro

same here..

jakodev avatar Aug 31 '18 13:08 jakodev

+1

amirulasrof avatar Nov 21 '18 09:11 amirulasrof

I've fixed this by adding the following code to line 2 of plugins/cordova-plugin-cryptx-file/hooks/after_prepare.js

if (context.cmdLine.indexOf('cordova run') !== '-1') return;

Then just run your code with livereload:

ionic cordova run android -lc

bergergit avatar Jul 24 '19 18:07 bergergit