NativeScript / NativeScript/plugins

Upgraded app fails to load in iOS, Assertion failed

未关闭
#504 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
TypeScript
星标
206
派生
123
平均合并
2 天 1 小时
30 天内合并 PR
1

描述

I tried to upgrade a running app from 7.x to 8.5.2. The app fails to load on iOS (simulator and device) - log below. Here's the environment:
nativescript 8.5.3
@nativescript/core 8.5.3
@nativescript/ios 8.5.2
nativescript-ui-listview 15.2.3

The app fails to load, after the launch event completes, with this log:

====== Assertion failed ======
Native stack trace:
1 0x10db14b9d tns::Assert(bool, v8::Isolate*, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) + 164
2 0x10db2f5b5 tns::Interop::WriteValue(v8::Localv8::Context, tns::TypeEncoding const*, void*, v8::Localv8::Value) + 5825
3 0x10db2deda tns::Interop::SetFFIParams(v8::Localv8::Context, tns::TypeEncoding const*, tns::FFICall*, int, int, tns::V8Args&) + 110
4 0x10db2da53 tns::Interop::CallFunctionInternal(tns::MethodCall&) + 401
5 0x10dad7d2a tns::ArgConverter::Invoke(v8::Localv8::Context, objc_class*, v8::Localv8::Object, tns::V8Args&, tns::MethodMeta const*, bool) + 1170
6 0x10daf8d2e tns::MetadataBuilder::InvokeMethod(v8::Localv8::Context, tns::MethodMeta const*, v8::Localv8::Object, tns::V8Args&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, bool) + 76
7 0x10daf87b9 tns::MetadataBuilder::PropertySetterCallback(v8::FunctionCallbackInfov8::Value const&) + 389
8 0x10dc19f31 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) + 385
9 0x10dc194df v8::internal::MaybeHandlev8::internal::Object v8::internal::(anonymous namespace)::HandleApiCallHelper(v8::internal::Isolate*, v8::internal::Handlev8::internal::HeapObject, v8::internal::Handlev8::internal::HeapObject, v8::internal::Handlev8::internal::FunctionTemplateInfo, v8::internal::Handlev8::internal::Object, v8::internal::BuiltinArguments) + 735
10 0x10dc18e09 v8::internal::Builtins::InvokeApiFunction(v8::internal::Isolate*, bool, v8::internal::Handlev8::internal::HeapObject, v8::internal::Handlev8::internal::Object, int, v8::internal::Handlev8::internal::Object, v8::internal::Handlev8::internal::HeapObject) + 777
11 0x10e04016d v8::internal::Object::SetPropertyWithAccessor(v8::internal::LookupIterator
, v8::internal::Handlev8::internal::Object, v8::Maybev8::internal::ShouldThrow) + 477
12 0x10e045eca v8::internal::Object::SetPropertyInternal(v8::internal::LookupIterator*, v8::internal::Handlev8::internal::Object, v8::Maybev8::internal::ShouldThrow, v8::internal::StoreOrigin, bool*) + 602
13 0x10e04656f v8::internal::Object::SetSuperProperty(v8::internal::LookupIterator*, v8::internal::Handlev8::internal::Object, v8::internal::StoreOrigin, v8::Maybev8::internal::ShouldThrow) + 79
14 0x10e046008 v8::internal::Object::SetPropertyInternal(v8::internal::LookupIterator*, v8::internal::Handlev8::internal::Object, v8::Maybev8::internal::ShouldThrow, v8::internal::StoreOrigin, bool*) + 920
15 0x10e045c2a v8::internal::Object::SetProperty(v8::internal::LookupIterator*, v8::internal::Handlev8::internal::Object, v8::internal::StoreOrigin, v8::Maybev8::internal::ShouldThrow) + 58
16 0x10decf0ee v8::internal::StoreIC::Store(v8::internal::Handlev8::internal::Object, v8::internal::Handlev8::internal::Name, v8::internal::Handlev8::internal::Object, v8::internal::StoreOrigin) + 1214
17 0x10ded52c9 v8::internal::Runtime_StoreIC_Miss(int, unsigned long*, v8::internal::Isolate*) + 393
18 0x10e5866f9 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit + 57
JavaScript stack trace:
at get ios (file: node_modules/nativescript-ui-listview/index.ios.js:20:0)
at syncListViewLayout (file: node_modules/nativescript-ui-listview/index.ios.js:1032:0)
at initNativeView (file: node_modules/nativescript-ui-listview/index.ios.js:891:0)
at setNativeView (file: node_modules/@nativescript/core/ui/core/view-base/index.js:746:0)
at _setupUI (file: node_modules/@nativescript/core/ui/core/view-base/index.js:719:0)
at (file: node_modules/@nativescript/core/ui/core/view-base/index.js:726:0)
at eachChildView (file: node_modules/@nativescript/core/ui/content-view/index.js:65:0)
at eachChild (file: node_modules/@nativescript/core/ui/core/view/view-common.js:811:0)
at _setupUI (file: node_modules/@nativescript/core/ui/core/view-base/index.js:725:0)
at (file: node_modules/@nativescript/core/ui/core/view-base/index.js:726:0)

I've done an ns clean, blown away the package-lock.json, all the usual things clearing hooks, node_modules and platforms. No dice. Please help!

Here's the package.json:

{
  "android": {
    "markingMode": "none"
  },
  "description": "whatever",
  "license": "UNLICENSED",
  "readme": "whatever",
  "id": "com.<-->.<-->",
  "v8Flags": "--expose_gc --use_strict",
  "dependencies": {
    "@nativescript/animated-circle": "^1.1.7",
    "@nativescript/apple-sign-in": "^1.0.0",
    "@nativescript/camera": "^5.0.15",
    "@nativescript/core": "^8.4.2",
    "@nativescript/firebase": "^11.1.3",
    "@nativescript/geolocation": "^8.1.0",
    "@nativescript/local-notifications": "^6.0.0",
    "@nativescript/social-share": "^2.3.0",
    "@nstudio/nativescript-cardview": "^2.0.1",
    "@nstudio/nativescript-checkbox": "^2.0.5",
    "@nstudio/nativescript-floatingactionbutton": "^3.0.4",
    "@proplugins/nativescript-dom": "^2.2.3",
    "child_process": "^1.0.2",
    "cookie": "^0.3.1",
    "crypto-js": "^3.1.9-1",
    "deepmerge-json": "^1.3.2",
    "delay": "^4.3.0",
    "email-validator": "^2.0.4",
    "fs-extra": "^10.1.0",
    "html-entities": "^1.2.1",
    "https-proxy-agent": "^3.0.0",
    "hydra-page-previewer": "^0.2.1",
    "jsdom": "^22.1.0",
    "linkifyjs": "^2.1.8",
    "moment": "^2.14.1",
    "moment-timezone": "^0.5.25",
    "nativescript-clipboard": "^2.1.1",
    "nativescript-drawingpad": "^3.1.0",
    "nativescript-drop-down": "^6.0.2",
    "nativescript-exit": "^1.0.1",
    "nativescript-menu": "^1.1.7",
    "nativescript-modal-datetimepicker": "^2.1.5",
    "nativescript-multi-select": "^1.0.6",
    "nativescript-popup": "^1.5.0",
    "nativescript-remote-builds": "^1.1.1",
    "nativescript-timedatepicker": "^1.2.1",
    "nativescript-ui-calendar": "^14.2.1",
    "nativescript-ui-chart": "^14.2.1",
    "nativescript-ui-listview": "^15.2.1",
    "nativescript-ui-sidedrawer": "^14.2.1",
    "nativescript-urlhandler": "^1.3.0",
    "nativescript-videorecorder-x": "^1.0.4",
    "net": "^1.0.2",
    "node-html-parser": "^1.1.16",
    "os": "^0.1.2",
    "promise-map-series": "^0.2.3",
    "tls": "0.0.1",
    "util": "^0.12.5"
  },
  "devDependencies": {
    "@nativescript/android": "~8.5.0",
    "@nativescript/ios": "8.5.2",
    "@nativescript/webpack": "~5.0.0"
  },
  "main": "./app/app.js"
}

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

在模拟器或设备上使用列出的 NativeScript 和 iOS 软件包版本重现升级过程。从 node_modules/nativescript-ui-listview/index.ios.js:20 开始,跟踪经过 syncListViewLayout 和 initNativeView 的调用,并比较相关的 @nativescript/core 路径。升级后的应用能够在没有 assertion 的情况下加载即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
ios, javascript
领域
mobile-dev
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。