Not find cordova.js, may not loading


#1

cordova.js this in compiled or unloaded at runtime?


#2

Hi,

Not sure if I understand your question. The cordova.js and all related cordova scripts are automatically added when your app is compiled. So you don’t need to upload them in your zip file as they are going to be copied in the right location when compiled. You just need to add the script tag including the cordova.js and you have already done that.

The same applies for the Developer App, you don’t need to have the cordova scripts in your zip file or remote server as the Developer App will use the scripts bundled inside the app.

Hope that helps.


#3

Yes, but as you can see it appears in the first picture, I thought it might be a problem with my data plan cell phone, so I wonder if cordov.js downloaded at runtime.

I made this test also :

if(window.cordoba){
        document.addEventListener("deviceready",init, false);
        console.log("run over cordoba");
    }else{
        window.addEventListener('load',init,false);
        console.log("run over normal");
    }

the console wrote :
run over normal

well not if the folder structure of the game, I think that structure is that it is unclear whether one should climb assets compressed game or create that structure (typical of Cordova) and upload it, the first time I climbed the hize compressed only with the active game, the last time believed that structure (given that the first did not work)


#4

cordova.js not the script in the zip file

the log is from dev app


[Solved] About migration
#5

here a similar problem

but does not apply to my case


#6

plase see this :

I’m not sure my directory okay


#7

it may be why I have removed this plugin?
It was installed by default

here specifies that I can remove it:


#8

Hi,

From your file explorer above, you just need to zip the www folder. Regarding your test, not sure if it’s a typo but you are checking for “window.cordoba” and it should be “window.cordova”.

It would be really helpful that you attach here a zipped file with the code that is not working or a testcase with a minimum error case, that way we could try it here and what’s happening.


#9

True, there is an error, however it’s not that it was the “devicerady” outside if to prove:

the error continues .

I’m not sure up my source code, if you so I can send a private message, I can?


#10

the zipped game

i sent the pass in PM


#11

Hi,

Strange, I have tried you zip and I didn’t have any problem, I can run the game without any issues. Maybe you are not using the correct url?. From the Developer App you have to point to the content of the www folder, in your case would be something like: http://youripadress/FREE/www/. When uploading to the cloud compiler you can zip the whole Cordova project or the content of the www folder only.

Let us know if that works.


#12

No, the error must be in the app dev.

url not use the dev app, I use the .zip

so:

the following is as if when running the app dev the cordova.js file is downloaded from the Internet (from any repository), would be subject to the restrictions of the network, some data plans that leave download (sail only) no would be no cordova.js file

I remember the error that has me stuck is this:

another thing is to remove the whitelist plugin which I understand has to do with resources :

that:
cordova-plugin-whitelist

*remove it by appearing: “no content secure policy”


Cocoon.Ad.createBanner returns undefined
Cocoon.Ad.createBanner returns undefined
#13

advertising work properly?


#14

I created a project with the staff of advertising (the phaser), runs and starts well, but get the same problem :

Could not find cordoba.js script tag. Plugin loading may fail

display is black, only show fps counter


#15

Ok, I think I know what is happening. You are compressing the www folder, no the content of the www folder. When launching from the Developer App you have to zip the actual app, not the folder that includes the app. I’ve made a test using the compressed folder and I get the same error as you so just zip the content of the www folder not the folder itself and the problem should be solved.


#16

yes, for now the problem is solved in the phaser example, i will try on my game

thank you very much :smile: :smiley:


#17

Solved many thanks, the ads work fine, (but almost) :smile: