RC4: can't run on device (index.html is missing)

I have upgrade my app from rc3 to r4, in the browser (ionic serve) it’s ok.

When I try to run in the device (ionic run android --device) an alert saying that file:///android_asset/www/index.html was not found. I’m attaching a print, it’s strange because below the alert it’s possible to see that the view has been loaded.

Tried the build in 2 different environments (Mac Os and Linux), same problem.
For the iOS build, it’s ok.

Have you recently upgraded to ionic app-script 0.0.47? If yes, maybe try to build with the option --prod

 ionic build android --prod

Then, if still doesn’t work, maybe on your device try to delete your current app first before installing the new one

Just two ideas…not sure about the result of course

Yes, it’s in 0.0.47
I tried with --prod (with ionic run, not build), same error.
I checked the console and now it’s outputting this:

Failed to locate a binder for interface: autofill::mojom::AutofillDriver

Gonna look what can be.

ok sorry to hear it didn’t worked

i had a similar error last week try 2 things:
1 delete the android folder from the platforms folder and build from scrach
2 in the comfig.xml change the <content src="index.html"/> to point to your index file

when i had the same error it was because it was pointing to <content src="../index.html"/>

I hope it helped :slight_smile:

My config.xml it’s already like yours (no …/)

I have the same problem. However if I close the app and open it again (from the device menu, not with the ionic command) it works.

I re-added the platform with the @latest

ionic platform add android@latest

and ran it with --prod flag, now it works.
But without the --prod, the problem persists.

This error occurs because the loadUrlTimeout which is the time that android will wait until your app send to it your files, is too short and your controller is too heavy to respond with a 200 status in this interval.

Put on your config.xml this:
<preference name="loadUrlTimeoutValue" value="700000"/>

and voaila

1 Like

I had the same error. I resolved it: