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

net::ERR_FILE_NOT_FOUND (filr:///android_assert/www/index.prod-android.html ) #1275

Open
amitmisratas opened this issue Sep 20, 2021 · 11 comments

Comments

@amitmisratas
Copy link

getting this error after installing the build .apk in my hand set:-

Application Error
net::ERR_FILE_NOT_FOUND (filr:///android_assert/www/index.prod-android.html )

i am working on windows 10

@suryanshsangwan
Copy link

I am working on it

@amitmisratas
Copy link
Author

Captureaa

As you see from above, all building well in dist folder, but not able to figure out wat is missing.

Please let me know if you need any more info from my side.

@amitmisratas
Copy link
Author

Capturebb

And i forgot to mention, the index.html in not copied to asserts/www folder

May be resolving this will make things work.

@suryanshsangwan
Copy link

I am getting error on running "npm run dev:android" command

@suryanshsangwan
Copy link

image

@ebma
Copy link
Member

ebma commented Sep 21, 2021

Hey there. At least for the issue of @suryanshsangwan I can tell that the problem is that the rm command does not exist on windows. That's why we use the rimraf dependency in the root project (see here) but it seems like we forgot to also use it in the scripts of the cordova/package.json.

So please try installing rimraf as dev dependency to the cordova directory, i.e. run npm i rimraf --save-dev in the cordova directory and replace rm -rf with rimraf in the scripts in cordova/package.json. Let me know if this solves this issue and if it does feel free to open a pull request for it. :)

@suryanshsangwan
Copy link

I solved the issue by changing package.json

"install:android": "rimraf plugins && .\scripts\create-config-from-template.sh prod android && cordova platform add android"

@suryanshsangwan
Copy link

Now i am getting this error

image

@suryanshsangwan
Copy link

I have also changed line 74 but no luck

image

@ebma
Copy link
Member

ebma commented Sep 22, 2021

The new error is because specifying environment variables with PLATFORM=android .... does not work on windows. One would have to use set PLATFORM=android or another tool like cross-env.
@suryanshsangwan please try using cross-env, i.e. follow the steps on its GitHub page to install and use it for the npm scripts you need and let me know if it works afterward.

@AnsarMadiniBaba
Copy link

getting this error after installing the build .apk in my hand set:-

Application Error
net::ERR_FILE_NOT_FOUND (filr:///android_assert/www/index.prod-android.html )

i am working on windows 10

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

4 participants