Uncaught ReferenceError: WL is not defined in MobileFirst Migrated app

Prerak Tiwari

I am in process of migrating the MFP app from V7.1 to V8.0. I ran the migration tool and it created the cordova project and then I migrated my code from common directory of MFP V7.1 project to the www of newly created cordova project. I made the changes mentioned in this page. I register my app on the server and then did mfpdev app pull and mfpdev app push then cordova prepare and then I ran the app preview using 'mfpdev app preview'. When the app opens on the browser, I am getting below error:

http://localhost:10081/android/assets/www/worklight/worklight.css Failed to load resource: the server responded with a status of 404 (Not Found)
AuthRealmChallangeProcesser.js:7 Uncaught ReferenceError: WL is not defined
jquery-2.1.1.js:8554 Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
browser-sync-client.2.11.1.js:129 Uncaught TypeError: Cannot read property 'data1469206076574' of null
http://localhost:10081/android/assets/www/cordova.js Failed to load resource: the server responded with a status of 404 (Not Found)_mbs_cordova_sim_load_js @ cordova.js:2198
cordova.js:1186 Channel not fired: onPluginsReady
cordova.js:1186 Channel not fired: onCordovaReady

following are the files which are getting referenced in the index.html file in the script tag:

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="worklight/worklight.css">
    <link rel="stylesheet" href="css/main.css">
    <script type="text/javascript" src="cordova.js"></script>
    <script src="jqueryMobile/jquery-2.1.1.js"></script>
    <script src="https://maps.googleapis.com/maps/api/js?key=mykey"></script>
    <title>My App</title>
    <script src="jqueryMobile/jquery.mobile-1.4.2.js"></script>
    <link rel="apple-touch-icon" href="images/apple-touch-icon.png">
    <link rel="stylesheet" href="css/themes/jBlue/jBlue.css" />
    <link rel="stylesheet" href="css/themes/jBlue/jquery.mobile.icons.min.css">
    <link rel="stylesheet" href="jqueryMobile/jquery.mobile.structure-1.4.2.css" />
    <!-- Uncomment Below for default theme and change data-theme to "a"-->
    <link rel="stylesheet" href="jqueryMobile/jquery.mobile-1.4.2.css" />
    <script src="js/AuthRealmChallangeProcesser.js"></script>
Idan Adar

I register my app on the server and then did mfpdev app pull and mfpdev app push

You only do mfpdev app pull/push if you have existing configuration on the server that you want to take (pull) and use elsewhere (push). It has nothing to do with migrating your Hybrid application to a Cordova application.

http://localhost:10081/android/assets/www/worklight/worklight.css Failed to load resource: the server responded with a status of 404 (Not Found)

From the error it looks like you are referring to a non-existing file. Double-check that it is actually there.

http://localhost:10081/android/assets/www/cordova.js Failed to load resource: the server responded with a status of 404 (Not Found)_mbs_cordova_sim_load_js @ cordova.js:2198

Did you also copy this file? You should not. You should only reference it in the index.html file. Cordova takes care of this.

You also did not specify if you have followed the additional remaining steps, such as step 3.2. mentioned here: https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/migration-cookbook/#migrating-applications

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Code not working when migrated into function : "Uncaught ReferenceError: svg is not defined"?

From Dev

Uncaught ReferenceError: app is not defined in Angularjs

From Dev

Typescript Angularjs Uncaught ReferenceError: app is not defined

From Dev

Uncaught ReferenceError: app is not defined at Controllers.js

From Dev

ReferenceError: $ is not defined or Uncaught ReferenceError: $ is not defined

From Dev

Uncaught Error: [$injector:modulerr] & Uncaught ReferenceError: app is not defined

From Dev

Uncaught ReferenceError: [functionName] is not defined

From Dev

Uncaught ReferenceError: WebKitPoint is not defined

From Dev

Uncaught ReferenceError: getPrice is not defined

From Dev

Uncaught ReferenceError: Collection is not defined

From Dev

Uncaught ReferenceError: 'functionName' not defined

From Dev

Uncaught ReferenceError: i is not defined

From Dev

Uncaught ReferenceError: grecaptcha is not defined

From Dev

Uncaught ReferenceError: $$ is not defined

From Java

Uncaught ReferenceError: React is not defined

From Dev

Uncaught ReferenceError: React is not defined

From Dev

Uncaught ReferenceError: $scope is not defined

From Dev

Uncaught ReferenceError: FB is not defined

From Dev

Uncaught ReferenceError: Promise is not defined

From Dev

Uncaught ReferenceError: Foundation is not defined

From Dev

Uncaught ReferenceError: block is not defined

From Dev

Uncaught ReferenceError: mountNode is not defined

From Dev

Uncaught ReferenceError: stageCounter is not defined

From Dev

Karma: uncaught ReferenceError $ is not defined

From Dev

Uncaught ReferenceError: '' is not defined

From Dev

Uncaught ReferenceError: Backbone is not defined

From Dev

Uncaught ReferenceError: refresh is not defined

From Dev

Uncaught ReferenceError: io is not defined

From Dev

Uncaught ReferenceError: testString is not defined

Related Related

  1. 1

    Code not working when migrated into function : "Uncaught ReferenceError: svg is not defined"?

  2. 2

    Uncaught ReferenceError: app is not defined in Angularjs

  3. 3

    Typescript Angularjs Uncaught ReferenceError: app is not defined

  4. 4

    Uncaught ReferenceError: app is not defined at Controllers.js

  5. 5

    ReferenceError: $ is not defined or Uncaught ReferenceError: $ is not defined

  6. 6

    Uncaught Error: [$injector:modulerr] & Uncaught ReferenceError: app is not defined

  7. 7

    Uncaught ReferenceError: [functionName] is not defined

  8. 8

    Uncaught ReferenceError: WebKitPoint is not defined

  9. 9

    Uncaught ReferenceError: getPrice is not defined

  10. 10

    Uncaught ReferenceError: Collection is not defined

  11. 11

    Uncaught ReferenceError: 'functionName' not defined

  12. 12

    Uncaught ReferenceError: i is not defined

  13. 13

    Uncaught ReferenceError: grecaptcha is not defined

  14. 14

    Uncaught ReferenceError: $$ is not defined

  15. 15

    Uncaught ReferenceError: React is not defined

  16. 16

    Uncaught ReferenceError: React is not defined

  17. 17

    Uncaught ReferenceError: $scope is not defined

  18. 18

    Uncaught ReferenceError: FB is not defined

  19. 19

    Uncaught ReferenceError: Promise is not defined

  20. 20

    Uncaught ReferenceError: Foundation is not defined

  21. 21

    Uncaught ReferenceError: block is not defined

  22. 22

    Uncaught ReferenceError: mountNode is not defined

  23. 23

    Uncaught ReferenceError: stageCounter is not defined

  24. 24

    Karma: uncaught ReferenceError $ is not defined

  25. 25

    Uncaught ReferenceError: '' is not defined

  26. 26

    Uncaught ReferenceError: Backbone is not defined

  27. 27

    Uncaught ReferenceError: refresh is not defined

  28. 28

    Uncaught ReferenceError: io is not defined

  29. 29

    Uncaught ReferenceError: testString is not defined

HotTag

Archive