最近将应用程序从worklight 6.2迁移到7.0。所有这些都适用于本地运行的移动Web应用程序预览。什么不起作用是使用mobilefirst在eclipse上的android预览。启动画面无法完全加载。我目前看到的唯一错误是
ReferenceError: shouldStartProvisioning is not defined
initCallback/<()
worklight.js:9680
WL.DeviceAuth.__isCertificateExists()
worklight.js:18942
initCallback()
worklight.js:9667
__WLClient/this.createProvisioningChallengeHandler/challengeHandler.handleChallenge/<()
worklight.js:9643
__WLDeviceAuth/this.init/<()
worklight.js:6662
WL.DeviceAuth.__initDeviceAuthManager()
worklight.js:18953
__WLDeviceAuth/this.init()
worklight.js:6662
__WLClient/this.createProvisioningChallengeHandler/challengeHandler.handleChallenge()
worklight.js:9642
AbstractChallengeHandler/this.startChallengeHandling()
worklight.js:9358
executeChallenge()
worklight.js:9281
__WLClient/this.checkResponseForChallenges()
worklight.js:9183
window.WLJSX.Ajax.WLRequest<.onWlFailure()
worklight.js:3606
bind/<()
worklight.js:957
window.WLJSX.Ajax.Request<.respondToReadyState()
worklight.js:1177
window.WLJSX.Ajax.Request<.onStateChange()
worklight.js:1112
这是来自worklight.js
function initCallback(result) {
if (challengeHandler.isCertificateChallengeResponse(challenge)) {
WL.DeviceAuth.saveCertificate(
//success callback
function() {
var deviceAuthSettings = {
token : challenge.ID.token,
isProvisioningEnabled : true,
provisioningEntity : challenge.ID.entity
};
challengeHandler.getDeviceAuthDataAsync(deviceAuthSettings);
},
//failure callback
function(err) {
WL.DiagnosticDialog.showDialog(WL.ClientMessages.wlclientInitFailure, WL.ClientMessages.saveCertificateFailure, false, true, {}, err);
}, challenge.ID.entity, challenge.certificate, challengeHandler.realm);
//handle save certificate
} else {
//handler device auth
WL.DeviceAuth.__isCertificateExists(challenge.ID.entity,
// success callback
function(result) {
var isCertificateExists = WL.Utils.getCordovaPluginResponseObject(result, "isCertificateExists");
isCertificateExists = ("true" == isCertificateExists);
if (isCertificateExists) {
var deviceAuthSettings = {
token : challenge.ID.token,
isProvisioningEnabled : true,
provisioningEntity : challenge.ID.entity
};
challengeHandler.getDeviceAuthDataAsync(deviceAuthSettings);
} else {
shouldStartProvisioning();
};
},
// failure callback
function() {
WL.DiagnosticDialog.showDialog(WL.ClientMessages.wlclientInitFailure, WL.ClientMessages.deviceAuthenticationFail, false, true, challenge);
});
function shouldStartProvisioning() {
if (!challenge.ID.allowed) {
//submiting an empty answer so it will resend, and then get the 401 again, hopefully is allowed
challengeHandler.submitChallengeAnswer();
} else {
if (challengeHandler.createCustomCsr != undefined) {
challengeHandler.createCustomCsr(challenge.ID);
} else {
WL.Logger.warn("Function createJsonCsr() is deprecated. Use createCustomCsr() instead.");
challengeHandler.createJsonCsr(challenge.ID.entity, challengeHandler.realm, {token:challenge.ID.token});
}
}
}
}
}
};
答案 0 :(得分:0)
我已经完成了一些内部和外部搜索,但没有找到此类问题的任何先前报告。我有一些建议可能有助于进一步诊断问题。首先,新项目或仅迁移项目是否会出现问题?您是否可以检查公共资源预览的输出以查看是否发生相同的错误?只是想确保错误是失败方案所特有的。接下来,您正在使用的MobileFirst的完整构建级别是什么?在eclipse中,选择Help - &gt;关于 - &gt; [MobileFirst图标]。