目录

当跳转到新页面时提示登录超时,随后应用闪退

问题现象

应用加载新页面时,出现登录超时的弹窗,随后闪退。

背景知识

问题定位

  1. 从faultlogger目录下获取到应用的JS Crash故障日志,故障原因是自定义错误类Error,故障信息为Internal error. UI execution context not found,错误码为100001。
    Reason:Error
    Error name:Error
    Error message:Internal error. UI execution context not found.
    Error code:100001
    Stacktrace:
    Cannot get SourceMap info, dump raw stack:
        at gotoLoginPage (entry|entry|1.0.0|src/main/ets/viewmodel/login/QuickLoginManager.ts:474:1)
        at anonymous (entry|entry|1.0.0|src/main/ets/h5common/plugin/JXPluginAlertInfo.ts:94:1)
        at anonymous (entry|entry|1.0.0|src/main/ets/widget/dialog/CustomWindowDialog.ts:67:1)
        at anonymous (entry|entry|1.0.0|src/main/ets/widget/dialog/CustomWindowDialog.ts:89:1)
        at (entry/src/main/ets/h5common/page/H5Page.ets:227:11)
  2. 异常信息UI execution context not found表示没有获取到UI的执行上下文。排查栈顶函数gotoLoginPage是否直接使用了router跳转页面,此情况可能导致UI上下文不明确的问题。

分析结论

router没有获取到UI的执行上下文,导致页面闪退。

修改建议