Has anything changed with your project structure?
I would recommend verifying that you haven't made a couple of common mistakes:
- the config.xml file is also in the root with the index.html
- make sure the file name of index.html is all lowercase
config.xml and index.html are in the root, and all lower-case.
I've been reviewing my build processes and looking into the zip that results and the files are in there and they do contain code... no idea atm where it went wrong but still thinking about what it could be....
herm, i remember what happened prior to the issue - i had changed my build process such that the index nor config was copied to the root of the resulting zip archive. i got the obvious error, then i fixed my build problem and from that point forward the "no index" error continued.
The only way out of this mess might be:
- delete the app from PGB
- upload your zip to create a new app.
If the app is already in Google Play Store, you would need to set android-versioncode to a higher value than the current value.
Ok..... so i tested my zip this morning - same as usual... taking Vectorj's advice i thought there could be no harm. I deleted the project. Thing is, I was using the free basic "1 app" account - now i cant upload a new project and it seems I have to buy in.
is that true? I mean, it makes sense to me otherwise no one would buy in so i get that... I guess I need to create another account and use that instead to try things out for free?
You should be able to delete your app from PGB, then upload a zip for a new app. Even with the free account.
Why can't you upload a new zip file for a new app? Do you receive any error messages?
How did you delete your old app? Did you go to your settings page, scroll all the way down and delete it there?
Update - so i figured out how to get around the limitation on the front end that seemed to force me to buy in. I uploaded the exact same archive that was giving me the previous "index.html" errors - works fine, compiles with no issue.
Herm, seems to me there is something amiss with uploading projects, maybe this would recreate it?
1. create new basic account
2. upload zip with config and index.html
3. compile both iOS and Android
4. upload a zip with no index (and potentially no config)
5. Recompile - no index error should appear
6. re-upload a zip containing index.html and config
7. index error does not go away.
I deleted it via settings: where it says "danger zone" - and selected "delete app"
thereafter, only the opensource option was available to me - clicking the private tab did not enable the upload button. Viewing the source it had the "disabled" attribute. I removed it, but clicking it did nothing.... then I programatically submitted the surrounding form, the page reloaded with "nothing uploaded". At that point the upload button was enabled and worked.
Glad you have your app now uploaded and built.
Also, thanks for the explanation for the PGB Crew. I hope they will (finally) take action on this problem, that has been reported at least a dozen times in the past couple of years.
I have just the same problem. Same "No index.html" error.
Add, I need always to delete my app and create another one to try to skip this error. Yes, I said "try", because even with this workahound, sometimes this error still happen.
How do we get attention from adobe support to fix this critical bug?
This still happens to me too, very, very often..... BTW, after deleting
your project the upload button is disabled - reload the page to enabled it,
faster than what I did previously....
I have found that I have to do this:
1) delete, refresh page, then....
2) put all project files in www folder
3) put configuration in root
4) put dummy index in root
5) upload zip archive, PGB accepts the package
6) re-zip the project without the dummy index in the root
7) upload again, build and test
8) repeat everything again within the next 1 or 2 code updates
Note step 6, if I don't remove the "dummy index", just a blank text file
called "index.html", then that is my app! With it gone then the index.html
in the www folder is my app, which is desired. But if course PGB expects it
in the root, which is wrong.
I cannot put all my project files in the root because if I do then none of
the assets are loaded. All assets must be in the www folder..... and I
don't see why I need to put my index in the root and then edit all my paths
to point to assets in the www folder! I've built PG via the cli many, many
times. Having the entire project in the www folder makes sense, not this
crazy thing that is happening.
It's ridiculous that I have to go through so many acrobatics with PGB....
2) put all project files in www folder
3) put configuration in root
4) put dummy index in root
That can't be right. I've never done that, and never had to.
Also, PGB doesn't require a "www folder". It doesn't require any specific directory names, and doesn't even require any directories.
As long as you have
in the root directory (not in /www!) of your zip file, and the config is well-formed xml, PGB is happy.
Yeah, well, its happening. I disabled debugging on PGB and then remotely inspected the app via Safari on OSX. No assets are loaded because for some reason the paths all include "www" which forces me to believe that a "www" is needed as PG expects files to reside there... so, when I **do** place everything in a "www" folder it works in the odd manner I describe above.... it is the ONLY way I can get my assets to load.
I'm telling you, PGB makes no sense to me and IMO its broken. I may as well go somewhere else.
I guess you're right.
It must be a sheer miracle that thousands of other developers can still build with PGB without directory juggling.
... and now I can't reproduce what I was seeing all day yesterday. Let me guess, someone at Adobe was standing on a cable while playing pokemon go and has jut now decided to go take a shower.
ok, so as of right now everything is as Adobe/the docs/VectorP claims - its working fine as of right now. I have made three builds with all assets back in the root - its working. No weirdness, no errors, nothing for me to chase down and puzzle over.
Lets see how long this lasts.
Didnt last all that long.
I think that some of the issues start with my build process, am using "gulp-zip" to build the zip for upload. PGB doesnt seem to like zip files built using it. Although, sometimes it does work.
If I manually zip the files the upload works most of the time. If i get a "no index.html" found almost always the solution is to delete and create a new project.
I have managed to upload zips without index.html in the root and PGB has accepted them... but for now I'll modify my build process and just delete projects when needed.
You mention that you're creating the zip file using gulp-zip. Would you care to share the code you're using to do this? This might be why you've had problems with references and such.
Your PGB zips should always look similar to the following -- note that config.xml and index.html are always at the top level in the hierarchy.
I have doubts about the correct hierarchy. Can you help me?
Where is the www/ directory in your example?
When you create a new app in PhoneGap desktop (v.0.3.5) "simulator", the initial hierarchy that´s created is:
and inside www directory:
But I´ve read some VectorP post saying that
must be in the root directory (not in /www!).
Which one is correct?
The other html files can be in the same directory as the index.html?
The structure as I and @VectorP have listed is the correct structure. index.html, config.xml, etc. should be in the top level of the zip file. You should not have a "www" directory in the zip you provide to PGB. The root level of the zip file is the "www" directory.
The structure created from PG Desktop is NOT compatible with PGB by default. Converting the structure to something PGB can use would typically follow this form (using some *nix commands here):
1. mv config.xml www/
2. edit config.xml (to fix up paths; they are relative to the new location)
3. ensure splash.png and icon.png files are in www/
3. cd www
4. zip -r ../app.zip * ← zips everything in current directory (www/) and puts it in app.zip in the parent directory
5. upload app.zip (in the parent directory) to PGB
Should you then unzip that file (say unzip app.zip /tmp/app), you'd get this (in /tmp/app):
Other than index.html, your other HTML files can be wherever you like. I typically put them under a "html" subdirectory (to match "css", "js", etc.)
My build structure is always correct - I've opened the gulp-created zip file to ensure that is the case many times. Also, your posted list is helpful and yes, I am conforming to that where it matters (index and config). Questions:
- you have an "HTML/some-page.html".... in the spirit of SPA's the root-level "index.html" should be our app, is this just an example of "anything else" that an app might contain (templates, perhaps?)
- splash and icon png in the archive root - how is this different than what we specify within the "res" folder?
I dont know that posting up my gulp file and directory info would be all that helpful.
I have concluded via trail and error that PGB does not like gulp-zip. I wonder if other people with upload/no-index issues are suffering from their preferred zip packager not being a flavor that PGB likes. You can test this for us
var gulp = require('gulp');
var zip = require('gulp-zip');
// package everything for phonegap build
then: gulp package-files