mm2
mm2
  • 发布:2025-01-04 16:32
  • 更新:2025-01-04 20:02
  • 阅读:82

鸿蒙上架提示jscrash异常

分类:鸿蒙Next

HBuildeX 4.29下开发, mate60下测试.

上架鸿蒙市场时, 审核人员给的信息.
[jscrash异常,原因:Generated by HiviewDFX@OpenHarmony___at (entry/src/main/ets/uni-app/WebViewBuilder.ets:42:3)],
华为给的日志.
Device info:HUAWEI Mate 60
PreInstalled:No
Foreground:Yes
Pid:15903
Uid:20020014
Reason:TypeError
Error name:TypeError
Error message:Cannot read property getStyle of undefined
Stacktrace:
Cannot get SourceMap info, dump raw stack:
at anonymous (entry|entry|1.0.0|src/main/resources/rawfile/uni-app/uni-app-harmony-framework-dev.js:21369:1)
at anonymous (entry|entry|1.0.0|src/main/ets/uni-app/components/WebView.ts:100:1)
at (entry/src/main/ets/uni-app/WebViewBuilder.ets:10:5)
at (entry/src/main/ets/uni-app/WebViewBuilder.ets:42:3)
==============
查到uni-app-harmony-framework-dev.js:21369的地方,发现是getLocation的地方 (即 latitude: res.latitude, 这一行)
function subscribeGetLocation() {
registerServiceMethod(API_GET_LOCATION, (args, resolve2) => {
getLocation({
type: args.type,
altitude: args.altitude,
highAccuracyExpireTime: args.highAccuracyExpireTime,
isHighAccuracy: args.isHighAccuracy,
success(res) {
resolve2({
latitude: res.latitude,
longitude: res.longitude,
speed: res.speed,
accuracy: res.accuracy,
altitude: res.altitude,
verticalAccuracy: res.verticalAccuracy,
horizontalAccuracy: res.horizontalAccuracy
});
},

关键是我的APP没有涉及到定位, 没申请定位权限,,
着急上架, 大神帮忙看下.

2025-01-04 16:32 负责人:无 分享
已邀请:
DCloud_uniCloud_WYQ

DCloud_uniCloud_WYQ

你的web-view内加载的页面使用到了定位,间接的调用到了原生的定位。建议使用更新的HBuilderX发行你的项目

DCloud_UNI_GSQ

DCloud_UNI_GSQ

可以尝试升级到新版

  • mm2 (作者)

    新版解决了这个问题吗? 新版本无法在window下开启模拟器

    2025-01-04 20:41

要回复问题请先登录注册