JoshDSommer / nativescript-ngx-shadow

Angular directive to apply shadows to native elements according to the elevation level guidelines of material design specification
Apache License 2.0
9 stars 6 forks source link

Nativescript 5.0 IOS Error: View already has a parent #10

Closed victorevox closed 5 years ago

victorevox commented 5 years ago

Which platform(s) does your issue occur on?

IOS

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

"nativescript": { "tns-android": { "version": "5.0.0" }, "tns-ios": { "version": "5.1.0" } }, "dependencies": { "@angular/animations": "~7.0.0", "@angular/common": "~7.0.0", "@angular/compiler": "~7.0.0", "@angular/core": "~7.0.0", "@angular/forms": "~7.0.0", "@angular/http": "~7.0.0", "@angular/platform-browser": "~7.0.0", "@angular/platform-browser-dynamic": "~7.0.0", "@angular/router": "~7.0.0", "@types/base-64": "^0.1.2", "@types/moment": "^2.13.0", "@types/utf8": "^2.1.5", "base-64": "^0.1.0", "moment": "^2.18.1", "nativescript-angular": "^7.0.3", "nativescript-angular-snapshot": "^1.5.2-5.5.372.32", "nativescript-appversion": "^1.4.1", "nativescript-carousel": "^3.1.1", "nativescript-geolocation": "^4.3.1", "nativescript-google-maps-sdk": "^2.6.0", "nativescript-google-maps-utils": "^0.1.3", "nativescript-google-places": "0.0.3", "nativescript-iqkeyboardmanager": "^1.3.0", "nativescript-loading-indicator": "^2.4.0", "nativescript-ngx-fonticon": "^4.2.0", "nativescript-ngx-shadow": "^6.4.0", "nativescript-ngx-slides": "^6.0.0", "nativescript-phone": "^1.3.1", "nativescript-plugin-firebase": "^7.4.6", "nativescript-pulltorefresh": "^2.1.1", "nativescript-social-share": "^1.5.0", "nativescript-theme-core": "^1.0.4", "nativescript-ui-sidedrawer": "^4.1.1", "reflect-metadata": "~0.1.8", "rxjs": "^6.3.3", "rxjs-compat": "^6.2.1", "tns-core-modules": "^5.0.5", "utf8": "^2.1.2", "zone.js": "^0.8.26" }, "devDependencies": { "@angular/compiler-cli": "~6.1.0", "@ngtools/webpack": "~6.2.0", "@types/chai": "^4.0.2", "@types/mocha": "^2.2.41", "@types/node": "^7.0.5", "babel-traverse": "6.4.5", "babel-types": "6.4.5", "babylon": "6.4.5", "lazy": "1.0.11", "mobile-devices-controller": "^2.4.8", "nativescript-dev-appium": "^3.3.0", "nativescript-dev-sass": "^1.5.0", "nativescript-dev-typescript": "^0.7.8", "nativescript-dev-webpack": "^0.17.0", "tns-platform-declarations": "~4.0.0", "typescript": "~3.1.1" }

Please, tell us how to recreate the issue in as much detail as possible.

After upgrading from tns 4.2.3 to 5.1, application fails whenever it renders a layout with the "shadow" directive, error is the following:

[native code]: ERROR Error: View already has a parent. View: StackLayout(106) Parent: StackLayout(105)

Is there any code involved?

`

</StackLayout>

`

edusperoni commented 5 years ago

I'm not able to reproduce this using the demo project. Could you maybe provide a project so I could test?

Try upgrading tns-core-modules as well.

Edit: also, our app is using shadow basically everwhere, and we're on 5.1

JoshDSommer commented 5 years ago

Sorry, I missed this, could it be a spelling error StakLayout?

JoshDSommer commented 5 years ago

Going to close this for the time being, feel free to re-open if needed @victorevox