Nativescript: New app with tns-template-master-detail-ng does not work properly on iOS

Created on 19 Jul 2018  路  7Comments  路  Source: NativeScript/NativeScript

Which platform(s) does your issue occur on?

iOS

Please provide the following version numbers that your issue occurs with:

  • CLI: (run tns --version to fetch it) 4.1.2
  • Cross-platform modules: (check the 'version' attribute in the
    node_modules/tns-core-modules/package.json file in your project) 4.1.0
  • Runtime(s): (look for the "tns-android" and "tns-ios" properties in the
    package.json file of your project) 4.1.1
  • Plugin(s): (look for the version number in the package.json file of your
    project)

After a fresh installation of nativescript, I run:

tns create my-app-name --template tns-template-master-detail-ng

Then i run 'tns run ios'. This opens correctly the simulator, but on the console i see a lot of errors, such as

CONSOLE ERROR [native code]: ERROR TypeError: undefined is not an object (evaluating '_v.context.item.name')
CONSOLE ERROR [native code]: ERROR CONTEXT {
"view": {
"def": {
"nodeFlags": 1,
"rootNodeFlags": 1,
"nodeMatchedQueries": 0,
"flags": 0,
"nodes": [
{
"nodeIndex": 0,
"parent": null,
"renderParent": null,
"bindingIndex": 0,
"outputIndex": 0,
"checkIndex": 0,
"flags": 1,
"childFlags": 1,
"directChildFlags": 1,
"childMatchedQueries": 0,
"matchedQueries": {},
"matchedQueryIds": 0,
"references": {},
"ngContentIndex": null,
"childCount": 23,
"bindings": [],
"bindingFlags": 0,
"outputs": [],
"element": {
"ns": "",
"name": "StackLayout",
"attrs": [
[
"",
"class",
"list-group-item"
]
],
"template": null,
"componentProvider": null,

Due to this errors the app is laggy. The problem does not happen on a fresh install on android platform.

done ios template

All 7 comments

Glad I'm not the only one seeing this. I haven't yet figured out a workaround. It also breaks any nsRouterLinks defined in the ng-template.

I fixed by 'pinning' versions, use this one as your package.json

{ "description": "NativeScript Application", "license": "SEE LICENSE IN <your-license-filename>", "readme": "NativeScript Application", "repository": "<fill-your-repository-here>", "nativescript": { "id": "org.nativescript.yourapp", "tns-android": { "version": "4.1.3" }, "tns-ios": { "version": "4.1.1" } }, "scripts": { "lint": "tslint \"app/**/*.ts\"" }, "dependencies": { "@angular/animations": "6.0.9", "@angular/common": "6.0.9", "@angular/compiler": "6.0.9", "@angular/core": "6.0.9", "@angular/forms": "6.0.9", "@angular/http": "6.0.9", "@angular/platform-browser": "6.0.9", "@angular/platform-browser-dynamic": "6.0.9", "@angular/router": "6.0.9", "nativescript-angular": "6.0.6", "nativescript-imagepicker": "5.0.0", "nativescript-plugin-firebase": "6.0.0", "nativescript-theme-core": "1.0.4", "nativescript-ui-listview": "3.5.0", "reflect-metadata": "0.1.10", "rxjs": "6.1.0", "tns-core-modules": "4.1.0", "zone.js": "0.8.26" }, "devDependencies": { "@angular-devkit/build-angular": "0.6.8", "@angular/compiler-cli": "6.0.9", "@ngtools/webpack": "6.0.8", "codelyzer": "4.3.0", "nativescript-dev-sass": "1.6.0", "nativescript-dev-typescript": "0.7.0", "nativescript-dev-webpack": "0.14.0", "tslint": "5.10.0", "typescript": "2.7.2", "ajv": "6.4.0" } }

Agreed, thanks! I came back here to mention the problematic dependency version. The problem was introduced in [email protected]. Rolling back to 3.5.9 resolves it.

I'll log it over on the nativescript-ui feedback repo.

Am seeing this issue too with 3.5.10

@nickcabral did downgrading to 3.5.9 resolve it for you? I am still getting the error on IOS even after downgrading to 3.5.9.

Edit - please ignore downgrading to 3.5.9 has fixed it for me too

The issue is resolved with the latest nativescript-ui-listview version

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings