Application Error net::ERR_FILE_NOT_FOUND

  • 2
  • Problem
  • Updated 3 years ago
  • Solved
Hello,

I'm trying to download and install from using the QR Code in PhoneGap Build, but I'm getting the error on the attached screenshot.



When I run: cordova run android --device it works fine.

Is there anything that I'm not pushing to GitHub by chance? I'm keeping hooks, plugins, www, and the files in the root like config, package.json, etc in GitHub.

My config.xml content is set to:

Let me know if I need to provide anything else.

Thanks,

Luke
Photo of Luke

Luke

  • 19 Posts
  • 0 Reply Likes

Posted 5 years ago

  • 2
Photo of Luke

Luke

  • 19 Posts
  • 0 Reply Likes
I think this might be my problem:

http://community.phonegap.com/nitobi/...
Photo of Yi Ming Kuan

Yi Ming Kuan

  • 1840 Posts
  • 78 Reply Likes
You don't need to include the contents of /plugins, /hooks etc. The PhoneGap Build zip file upload should merely contain all the stuff in your www folder, plus your config.xml file, and your app icons and splashscreens.

-yiming
Photo of Luke

Luke

  • 19 Posts
  • 0 Reply Likes
Thanks for the reply. I'm not sure how that will help my error though.

Are you saying by removing plugins and hooks and the other items you mentioned then it will load the index.html file?
Photo of Luke

Luke

  • 19 Posts
  • 0 Reply Likes
Ok, I tested my theory (posted on another forum post) by changing the following in config.xml:

content src="src/index.html"

to

content src="index.html"

And the error went away.. However, now it appears as though AngularJS and all my other assets are not loading.

As a reminder, everything still works if I build and run locally. What am I doing wrong here?
Photo of Luke

Luke

  • 19 Posts
  • 0 Reply Likes
And yes, I'm using relative paths in my index.html file.
Photo of Luke

Luke

  • 19 Posts
  • 0 Reply Likes
I downloaded my .apk file from phonegap build, changed to .zip, extracted. Is the AndroidManifest.xml supposed to look like the following?



I can also confirm, all my assets (css, images, and javascript) are all there.
Photo of Luke

Luke

  • 19 Posts
  • 0 Reply Likes
Ok, issue resolved. I had a rule in my .gitignore that was ignoring dist directories.

Keep in mind though, is there a bug with how the content src path works with PhoneGap Build? As stated above, once I moved it to just index.html instead of src/index.html then it started working.
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
In PGB you can't use a Content element in config.xml.
PGB looks for index.html and config.xml in the same (root) directory.
Photo of Gus Gonzalez

Gus Gonzalez

  • 1 Post
  • 0 Reply Likes
so what do you mean by that.....what change should be made? im getting same error
Photo of Luke

Luke

  • 19 Posts
  • 0 Reply Likes
Thanks for confirming that. I think I'm all set with everything.