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

CORDOVA 7.0.0 net::ERR_FILE_NOT_FOUND (file:///android_asset/www/+++/index.html) #75

Open
yascasa opened this issue Nov 28, 2018 · 23 comments

Comments

@yascasa
Copy link

yascasa commented Nov 28, 2018

Hello
First i want thank you for this awesom plugin is very helpfull i use in all my applications.
i was using ionic 3 with cordova ^6 , the plugin was working fine ,but after upgrade platform to 7.0.0 the plugin is stop working and show in background the "index.html" crypted text and also alert contain this error :
net::ERR_FILE_NOT_FOUND (file:///android_asset/www/+++/index.html)
after that application is close

what i try and not worked :

  1. remove the plugin and add with latest version
  2. remove platform and clean project and add the platform .
  3. debug using android studio :
  • the file was crypted successfully
  • the project not openning DecryptResource at all. so the file index.html is not encrypted.

my system info is :
`Ionic:

ionic (Ionic CLI) : 4.1.1 (C:\Users\yassine\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.0

Cordova:

cordova (Cordova CLI) : 8.0.0
Cordova Platforms : android 7.0.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.2.5, (and 14 other plugins)

System:

Android SDK Tools : 26.1.1 (C:\Users\yassine\AppData\Local\Android\Sdk)
NodeJS : v8.2.1 (C:\Program Files\nodejs\node.exe)
npm : 5.3.0
OS : Windows 10
`

I hope this is enought to reprodius the probleme and sorry because we don't have project in global git. so we can't share.
if you need any information or new test just tell me
and than you again for your energy and your time

@devitito
Copy link

Same here

@jeeteshnariya
Copy link

Any one find solution ? i have same issue.

@otak1222
Copy link

otak1222 commented Dec 13, 2018

Try rewriting line number 34 and 58.

Fix cyphering process crashing when some directory name matched the include pattern.
7b6d253

old 34
return isCryptFile(file.replace(wwwDir, ''));
new 34
return fs.statSync(file).isFile() && isCryptFile(file.replace(wwwDir, ''));

old 58
var pluginDir = path.join(platformPath, 'src');
new 58
var pluginDir = path.join(platformPath, 'app/src/main/java');

@devitito
Copy link

Still not working... As far as I know the issue is related to the file server used by ionic-webview, the plugin is not compatible with a local server to serve the files...

@FawadNL
Copy link

FawadNL commented Jan 10, 2019

Same issue here with the latest ionic webview plugin.

@PeterHdd
Copy link

PeterHdd commented Jan 17, 2019

same issue here :/

trying to solve this, if you add cordova-plugin-crypt-file then when you inspect the ionic app, it will be here:

file:///android_asset/www/+++/index.html

but if you remove this plugin and add only the ionic webview plugin 2+ then the app will be in the server http://localhost:8080/

@otak1222
Copy link

otak1222 commented Jan 18, 2019

I'm sorry.
I wrote wrong answer.
I also confirmed.
https://imgur.com/a/wdxS221

Workaround is to remove "cordova-plugin-ionic-webview" plugin.

@PeterHdd
Copy link

PeterHdd commented Jan 20, 2019

I have fixed this finally. I have created another plugin that is made to work with "cordova-plugin-ionic-webview" if you are using it in your project.

The plugin is here:

https://github.com/PeterHdd/cordova-plugin-crypto-file

To use it, try the following:

ionic cordova plugin add cordova-plugin-crypto-file

Also please read the important section and the FAQ section before using it.

Please try @otak1222 (and everyone else in this thread) and give me your feedback.

@narickson
Copy link

@PeterHdd does your solution accomodate all android versions? I am having issues running on lollipop

@PeterHdd
Copy link

PeterHdd commented Apr 5, 2019

@narickson What problem are you getting?

Yes, it should work, make sure to do the "important section" though
https://github.com/PeterHdd/cordova-plugin-crypto-file#important

Also, which version of ionic webview are you using?

@narickson
Copy link

@PeterHdd I am using version 2.2.0 should I update it also to version 4?

@PeterHdd
Copy link

PeterHdd commented Apr 5, 2019

@narickson

Can you please tell me the steps that you are taking?
Did you change the ionicwebviewengine.java file as specified?
Did you try it on different devices, and which versions did you use?

@narickson
Copy link

@PeterHdd

I first installed the plugin
I made the changes on ionicwebviewEngine java file
It gave me an error cannot find module q
I ran npm install q which apparently fixed this issue and build successfully
I tested it on android version 9 and its working perfectly.
I ran the same app on lollipop and it just flushes and crashes with not error message

@PeterHdd
Copy link

PeterHdd commented Apr 5, 2019

@narickson

Ok, check this ionic-team/ionic-framework#17503

I'm not sure what the problem is, but as a test, do the following:

Test1:

Remove cordova-plugin-crypto-file
Keep cordova-plugin-ionic-webview 2.2.0
and test the app

Test 2:
Remove cordova-plugin-crypto-file
Remove cordova-plugin-ionic-webview 2.2.0
and test the app

Test 3:
Add cordova-plugin-crypto-file
Remove cordova-plugin-ionic-webview 2.2.0
and test the app

@narickson
Copy link

@PeterHdd

I have removed all the plugins and re install them again. It is working fine now. I might have messed with the webview while trying to fixed it or something.
Thanks a bunch. I really appreciate your effort and time. Cheers man!

@Trinadhchittuluri
Copy link

Not working

@JS-Girish
Copy link

@PeterHdd I have implemented the same process as per suggestions mentioned in above. My debug app is working fine but when i am trying to run signed app it is getting crashed and closing immediately.

@rawcoolpad
Copy link

@PeterHdd

I add the plugin then made the changes on ionicwebviewEngine java file after that build successfully.
application run fine.
but at the time image capturing it show the broken image.
like below image
corrupt

my project info

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 8.1.2 ([email protected])

local packages:

@ionic/app-scripts : 3.2.1
Cordova Platforms  : android 7.1.4
Ionic Framework    : ionic-angular 3.9.3

System:

Android SDK Tools : 26.1.1
Node              : v8.11.1
npm               : 5.6.0
OS                : Windows 7

Environment Variables:

ANDROID_HOME : D:\android-sdk-win

Misc:

backend : pro

help please....

@huxiamei
Copy link

same issues!Anyone who solves the problem?

@barmao
Copy link

barmao commented Nov 11, 2020

same issues!Anyone who solves the problem?

Use this plugin instead:

https://github.com/PeterHdd/cordova-plugin-crypto-file

@zhangzsan
Copy link

Has anyone tried to remove '/+++/' from this plugin and it still works?

@fahrettinrizaergin
Copy link

Has anyone tried to remove '/+++/' from this plugin and it still works?

Can you try again by replacing the <content src="index.html" /> field in the config.xml file with <content src="../index.html" />?

@maxtroia
Copy link

do it

#97 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests