1
votes

Worklight version v6.0.0.20130917-1749, Dojo 1.9

When I run the preview of an android project when 'provide library resources' is disabled I get the following errors:

    "NetworkError: 404 Not Found - http://10.99.8.72:10080/Klappr/apps/services/preview/Klappr/android/1.0/default/main.js"
    main.js
    "NetworkError: 404 Not Found - http://10.99.8.72:10080/Klappr/apps/services/preview/Klappr/android/1.0/default/typematic.js"
    typematic.js

In android this results in a 'scriptError:21'.

I copied all necessary files from the toolkit to my www-folder. enter image description here

main.js and typematic.js are never required in my js-files. I don't know why it still searches for it, and not in my www/dojo folder, but instead in the android/1.0/default folder.


Here you see that typematic.js is included. Still I get the error.

enter image description here


I updated Worklight to 6.0.0.1 fix, and still get the error.

1
Please always mention what is your Worklight version. Did you manually rename your JS to "main.js"? This file exists by default in any Worklight project, but only starting Worklight 6.1.0, not yet available. - Idan Adar
You also mention that you copied all files - are you sure you've copied them to the correct locations, perhaps this matters. Could be that the files are being incorrectly referenced. - Idan Adar
@IdanAdar I mentioned my Worklight version - Ken Vernaillen
@IdanAdar I didn't manually rename my js to main.js, it was the name of the project I think - Ken Vernaillen
Can you be a bit more certain, please? Also, which "v6"? build number? Is this a brand new app with Dojo with no alterations? - Idan Adar

1 Answers

1
votes

Using the Worklight project Fred emailed me I could see the mentioned errors as well.
I then:

  1. Removed the "dojo" and "dijit" folders from the www folder
  2. Re-added them from the dojoLib folder in the workspace
  3. Re-built and deployed the application
  4. Previewed via Worklight Console

The errors from before are gone and I could now pass the "splash image" and see the actual app.
I do not think this is related to "Require Library Resources", but to ... something, else.

When looking at the dev tools console, there are now all sort of other errors, but I suspect those are due to dumping the entirety of the dojo and dijit folders into the www folder, and could use some optimization and fixing, but the actual hurdle mentioned in the question is lifted.

http://i.stack.imgur.com/UF9L4.png enter image description here