简体   繁体   English

未捕获的ReferenceError:在MobileFirst Migrated应用程序中未定义WL

[英]Uncaught ReferenceError: WL is not defined in MobileFirst Migrated app

I am in process of migrating the MFP app from V7.1 to V8.0. 我正在将MFP应用程序从V7.1迁移到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. 我运行了迁移工具并创建了cordova项目,然后将代码从MFP V7.1项目的公共目录迁移到了新创建的cordova项目的www 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'. 我在服务器上注册了我的应用程序,然后执行了mfpdev app pullmfpdev app push然后是cordova准备,然后使用“ mfpdev应用程序预览”运行了应用程序预览。 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: 以下是script标记中index.html文件中引用的文件:

    <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>

I register my app on the server and then did mfpdev app pull and mfpdev app push 我在服务器上注册了我的应用程序,然后执行了mfpdev app pull和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). 如果要在服务器上进行(拉)并在其他地方使用(推)的现有配置,则仅执行mfpdev app pull/push It has nothing to do with migrating your Hybrid application to a Cordova application. 它与将Hybrid应用程序迁移到Cordova应用程序无关。

http://localhost:10081/android/assets/www/worklight/worklight.css Failed to load resource: the server responded with a status of 404 (Not Found) http:// localhost:10081 / android / assets / www / worklight / worklight.css加载资源失败:服务器响应状态为404(未找到)

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 http:// localhost:10081 / android / assets / www / cordova.js无法加载资源:服务器以404(未找到)状态响应_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. 您只应在index.html文件中引用它。 Cordova takes care of this. 科尔多瓦负责这项工作。

You also did not specify if you have followed the additional remaining steps, such as step 3.2. 您还没有指定是否执行了其余的其他步骤,例如步骤3.2。 mentioned here: https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/migration-cookbook/#migrating-applications 在这里提到: https : //mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/migration-cookbook/#migrating-applications

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 离子IBM MobileFirst Platform 8.0 sqladapter ReferenceError:未定义WL - ionic IBM MobileFirst platform 8.0 sqladapter ReferenceError: WL is not defined IBM MobileFirst 7.0 - 未捕获的ReferenceErrors:未定义WLJQ,未定义WL - IBM MobileFirst 7.0 - Uncaught ReferenceErrors: WLJQ is not defined, WL is not defined ReferenceError:WL未定义 - ReferenceError: WL is not defined ReferenceError:在MobileFirst中未定义cordova - ReferenceError: cordova is not defined in MobileFirst mobilefirst js以离子服务开头(未定义WL) - mobilefirst js starts with ionic serve (WL is not defined) 未捕获的ReferenceError:wlInitOptions未定义 - Uncaught ReferenceError: wlInitOptions is not defined IBM Worklight 6.1 - 未捕获的ReferenceErrors:未定义WLJQ,未定义WL - IBM Worklight 6.1 - Uncaught ReferenceErrors: WLJQ is not defined, WL is not defined 在MobileFirst 8中未调用WL方法 - WL methods not getting called in MobileFirst 8 获取ReferenceError:使用MobileFirst EnablePushNotification时未定义IBMBluemix - Getting ReferenceError: IBMBluemix is not defined when using MobileFirst EnablePushNotification WL.App.close在Windows Phone8 Mobilefirst 6.3应用程序中不起作用 - WL.App.close doesnt work in a windows phone8 mobilefirst 6.3 app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM