JavaScript SECURITY_ERR: DOM Exception 18: An attempt was made to break through the security policy of the user agent., line ...

testing and application I'm stuck with this log error:

2011/01/05 06:21:39, ERROR, ElementsActivity, onConsole, JavaScript SECURITY_ERR: DOM Exception 18: An attempt was made to break through the security policy of the user agent., line 0: undefined

The app is written with sencha touch 2 and downloads a 2-3MBs of data in the app cache (I've put the limit to 10MB from the initial 5MBs).

On the ET1, after an initial pause downloading the files, I see the spinning wheel for a couple of seconds. Then I'm left with a white screen.

Any suggestion on how to bypass this?

Pietro

Pietro Francesc...
Just to add some info.I'm

Just to add some info.

I'm trying now the same app inside RhoElements v2.0.5.27 and I've seen that the culprit seems an openDatabase call:

this._db = openDatabase('xtel.sm1', '1.0', 'xtel.sm1', 20000000);

can be a problem with the name of the database? (no, I can't change it on the fly to test )

regards

Pietro

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Pietro Francesc...
Final bit of info.At the end

Final bit of info.

At the end it was not a problem of the name of the database.

The problem was the requested size for the database. Changing in the config.xml accordingly to the request in the code solved the issue (from the original 5MB to 25MB).

The warning in the log was probably not one of the clearest, but with version 2 of RhoElements at least it reported the corrected line where the issue was found instead of the "line 0" reported by version 1.

Hope this helps others that sometimes needs to test other people code.

Regards

Pietro

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Darryn Campbell
Thanks for sharing Pietro.

Thanks for sharing Pietro.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments