com.tns.NativeScriptException: Calling js method onCreateView failed\n\nError: View already has a parent. View: Page(13) Parent: Frame(0)\ File: \"/data/data/com.abc.abc/files/app/tns_modules/ui/core/view-common.js, line: 909, column: 12 StackTrace: \n\tFrame: function:'View._addView', file:'/data/data/com.abc.abc/files/app/tns_modules/ui/core/view-common.js', line: 909, column: 19 Frame: function:'onFragmentShown', file:'/data/data/com.abc.abc/files/app/tns_modules/ui/frame/frame.js', line: 38, column: 11 Frame: function:'FragmentClass.onCreateView', file:'/data/data/com.abc.abc/files/app/tns_modules/ui/frame/frame.js', line: 538, column: 13

GitHub | Daxito | 12 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Error: View already has a parent. View: Page(13)

    GitHub | 12 months ago | Daxito
    com.tns.NativeScriptException: Calling js method onCreateView failed\n\nError: View already has a parent. View: Page(13) Parent: Frame(0)\ File: \"/data/data/com.abc.abc/files/app/tns_modules/ui/core/view-common.js, line: 909, column: 12 StackTrace: \n\tFrame: function:'View._addView', file:'/data/data/com.abc.abc/files/app/tns_modules/ui/core/view-common.js', line: 909, column: 19 Frame: function:'onFragmentShown', file:'/data/data/com.abc.abc/files/app/tns_modules/ui/frame/frame.js', line: 38, column: 11 Frame: function:'FragmentClass.onCreateView', file:'/data/data/com.abc.abc/files/app/tns_modules/ui/frame/frame.js', line: 538, column: 13
  2. 0

    tns-core-modules@next is giving me errors.

    GitHub | 7 months ago | 9thwall
    com.tns.NativeScriptException: Calling js method onCreateView failed TypeError: Cannot read property 'LayoutParams' of undefined File: "/data/data/org.nativescript.app/files/app/tns_modules/ui/core/view.js, line: 507, column: 68 StackTrace: Frame: function:'ViewStyler.setNativeLayoutParamsProperty', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/view.js', line: 507, column: 69 Frame: function:'StylePropertyChangedHandler.applyProperty', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/styling/style.js', line: 1263, column: 14 Frame: function:'Style._applyStyleProperty', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/styling/style.js', line: 1036, column: 25 Frame: function:'Style._applyProperty', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/styling/style.js', line: 999, column: 14 Frame: function:'Style._onPropertyChanged', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/styling/style.js', line: 980, column: 14 Frame: function:'DependencyObservable._setValueInternal', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/dependency-observable.js', line: 307, column: 18 Frame: function:'DependencyObservable._setValue', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/dependency-observable.js', line: 133, column: 14 Frame: function:'onLayoutParamsChanged', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/styling/style.js', line: 130, column: 11 Frame: function:'DependencyObservable._onPropertyChanged', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/dependency-observable.js', line: 213, column: 13 Frame: function:'Style._onPropertyChanged', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/styling/style.js', line: 978, column: 45 Frame: function:'DependencyObservable._setValueInternal', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/dependency-observable.js', line: 307, column: 18 Frame: function:'DependencyObservable._setValue', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/dependency-observable.js', line: 133, column: 14 Frame: function:'Object.defineProperty.set', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/styling/style.js', line: 856, column: 18 Frame: function:'Object.defineProperty.set', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/view-common.js', line: 521, column: 42 Frame: function:'Page._addViewToNativeVisualTree', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/page/page.js', line: 102, column: 41 Frame: function:'eachChild', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/view.js', line: 160, column: 61 Frame: function:'Page._eachChildView', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/page/page-common.js', line: 286, column: 9 Frame: function:'View._onAttached', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/view.js', line: 165, column: 18 Frame: function:'View._addViewCore', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/view.js', line: 126, column: 18 Frame: function:'View._addView', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/view-common.js', line: 1136, column: 14 Frame: function:'onFragmentShown', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/frame/frame.js', line: 40, column: 11 Frame: function:'FragmentCallbacksImplementation.onCreateView', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/frame/frame.js', line: 612, column: 13 Frame: function:'FragmentClass.onCreateView', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/frame/fragment.js', line: 23, column: 38
  3. 0

    tns-core-modules@next is giving me errors.

    GitHub | 7 months ago | hdeshev
    com.tns.NativeScriptException: Calling js method onCreateView failed TypeError: Cannot read property 'LayoutParams' of undefined File: "/data/data/org.nativescript.app/files/app/tns_modules/ui/core/view.js, line: 507, column: 68 StackTrace: Frame: function:'ViewStyler.setNativeLayoutParamsProperty', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/view.js', line: 507, column: 69 Frame: function:'StylePropertyChangedHandler.applyProperty', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/styling/style.js', line: 1263, column: 14 Frame: function:'Style._applyStyleProperty', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/styling/style.js', line: 1036, column: 25 Frame: function:'Style._applyProperty', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/styling/style.js', line: 999, column: 14 Frame: function:'Style._onPropertyChanged', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/styling/style.js', line: 980, column: 14 Frame: function:'DependencyObservable._setValueInternal', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/dependency-observable.js', line: 307, column: 18 Frame: function:'DependencyObservable._setValue', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/dependency-observable.js', line: 133, column: 14 Frame: function:'onLayoutParamsChanged', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/styling/style.js', line: 130, column: 11 Frame: function:'DependencyObservable._onPropertyChanged', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/dependency-observable.js', line: 213, column: 13 Frame: function:'Style._onPropertyChanged', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/styling/style.js', line: 978, column: 45 Frame: function:'DependencyObservable._setValueInternal', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/dependency-observable.js', line: 307, column: 18 Frame: function:'DependencyObservable._setValue', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/dependency-observable.js', line: 133, column: 14 Frame: function:'Object.defineProperty.set', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/styling/style.js', line: 856, column: 18 Frame: function:'Object.defineProperty.set', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/view-common.js', line: 521, column: 42 Frame: function:'Page._addViewToNativeVisualTree', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/page/page.js', line: 102, column: 41 Frame: function:'eachChild', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/view.js', line: 160, column: 61 Frame: function:'Page._eachChildView', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/page/page-common.js', line: 286, column: 9 Frame: function:'View._onAttached', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/view.js', line: 165, column: 18 Frame: function:'View._addViewCore', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/view.js', line: 126, column: 18 Frame: function:'View._addView', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/view-common.js', line: 1136, column: 14 Frame: function:'onFragmentShown', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/frame/frame.js', line: 40, column: 11 Frame: function:'FragmentCallbacksImplementation.onCreateView', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/frame/frame.js', line: 612, column: 13 Frame: function:'FragmentClass.onCreateView', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/frame/fragment.js', line: 23, column: 38
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    TabView crashes the app when Don't keep activities option is turned on

    GitHub | 1 year ago | vchimev
    java.lang.RuntimeException: Unable to start activity ComponentInfo{org.nativescript.TestApp/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onCreate failed Error: View already has a parent. View: GridLayout(41) Parent: TabView(40) File: "/data/data/org.nativescript.TestApp/files/app/tns_modules/ui/core/view-common.js, line: 884, column: 12 StackTrace: Frame: function:'View._addView', file:'/data/data/org.nativescript.TestApp/files/app/tns_modules/ui/core/view-common.js', line: 884, column: 19 Frame: function:'', file:'/data/data/org.nativescript.TestApp/files/app/tns_modules/ui/tab-view/tab-view.js', line: 199, column: 23 Frame: function:'TabView._onItemsPropertyChangedSetNativeValue', file:'/data/data/org.nativescript.TestApp/files/app/tns_modules/ui/tab-view/tab-view.js', line: 194, column: 19 Frame: function:'itemsProperty.metadata.onSetNativeValue', file:'/data/data/org.nativescript.TestApp/files/app/tns_modules/ui/tab-view/tab-view-common.js', line: 80, column: 13 Frame: function:'ProxyObject._trySetNativeValue', file:'/data/data/org.nativescript.TestApp/files/app/tns_modules/ui/core/proxy.js', line: 81, column: 27 Frame: function:'eachPropertyCallback', file:'/data/data/org.nativescript.TestApp/files/app/tns_modules/ui/core/proxy.js', line: 57, column: 18 Frame: function:'DependencyObservable._eachSetProperty', file:'/data/data/org.nativescript.TestApp/files/app/tns_modules/ui/core/dependency-observable.js', line: 384, column: 22 Frame: function:'ProxyObject._syncNativeProperties', file:'/data/data/org.nativescript.TestApp/files/app/tns_modules/ui/core/proxy.js', line: 60, column: 14 Frame: function:'View._syncNativeProperties', file:'/data/data/org.nativescript.TestApp/files/app/tns_modules/ui/core/view-common.js', line: 953, column: 48 Frame: function:'View._onContextChanged', file:'/data/data/org.nativescript.TestApp/files/app/tns_modules/ui/core/view.js', line: 211, column: 14 Frame: function:'View._onAttached', file:'/data/data/org.nativescript.TestApp/files/app/tns_modules/ui/core/view.js', line: 163, column: 14 Frame: function:'eachChild', file:'/data/data/org.nativescript.TestApp/files/app/tns_modules/ui/core/view.js', line: 168, column: 23 Frame: function:'ContentView._eachChildView', file:'/data/data/org.nativescript.TestApp/files/app/tns_modules/ui/content-view/content-view.js', line: 44, column: 13 Frame: function:'Page._eachChildView', file:'/data/data/org.nativescript.TestApp/files/app/tns_modules/ui/page/page-common.js', line: 235, column: 41 Frame: function:'View._onAttached', file:'/data/data/org.nativescript.TestApp/files/app/tns_modules/ui/core/view.js', line: 174, column: 18 Frame: function:'eachChild', file:'/data/data/org.nativescript.TestApp/files/app/tns_modules/ui/core/view.js', line: 168, column: 23 Frame: function:'Frame._eachChildView', file:'/data/data/org.nativescript.TestApp/files/app/tns_modules/ui/frame/frame-common.js', line: 296, column: 13 Frame: function:'View._onAttached', file:'/data/data/org.nativescript.TestApp/files/app/tns_modules/ui/core/view.js', line: 174, column: 18 Frame: function:'Frame._onActivityCreated', file:'/data/data/org.nativescript.TestApp/files/app/tns_modules/ui/frame/frame.js', line: 240, column: 14 Frame: function:'NativeActivity.onCreate', file:'/data/data/org.nativescript.TestApp/files/app/tns_modules/ui/frame/frame.js', line: 332, column: 20
  6. 0

    GitHub comment 2733#258642199

    GitHub | 7 months ago | viniciodeltoro
    com.tns.NativeScriptException: Calling js method onCreateView failed TypeError: Cannot read property 'LayoutParams' of undefined File: "/data/data/org.nativescript.gopost/files/app/tns_modules/ui/core/view.js, line: 507, column: 68 StackTrace: Frame: function:'ViewStyler.setNativeLayoutParamsProperty', file:'/data/data/org.nativescript.gopost/files/app/tns_modules/ui/core/view.js', line: 507, column: 69 Frame: function:'StylePropertyChangedHandler.applyProperty', file:'/data/data/org.nativescript.gopost/files/app/tns_modules/ui/styling/style.js', line: 1326, column: 14 Frame: function:'Style._applyStyleProperty', file:'/data/data/org.nativescript.gopost/files/app/tns_modules/ui/styling/style.js', line: 1086, column: 25 Frame: function:'Style._applyProperty', file:'/data/data/org.nativescript.gopost/files/app/tns_modules/ui/styling/style.js', line: 1049, column: 14 Frame: function:'Style._onPropertyChanged', file:'/data/data/org.nativescript.gopost/files/app/tns_modules/ui/styling/style.js', line: 1030, column: 14 Frame: function:'DependencyObservable._setValueInternal', file:'/data/data/org.nativescript.gopost/files/app/tns_modules/ui/core/dependency-observable.js', line: 307, column: 18 Frame: function:'DependencyObservable._setValue', file:'/data/data/org.nativescript.gopost/files/app/tns_modules/ui/core/dependency-observable.js', line: 133, column: 14 Frame: function:'onLayoutParamsChanged', file:'/data/data/org.nativescript.gopost/files/app/tns_modules/ui/styling/style.js', line: 130, column: 11 Frame: function:'DependencyObservable._onPropertyChanged', file:'/data/data/org.nativescript.gopost/files/app/tns_modules/ui/core/dependency-observable.js', line: 213, column: 13 Frame: function:'Style._onPropertyChanged', file:'/data/data/org.nativescript.gopost/files/app/tns_modules/ui/styling/style.js', line: 1028, column: 45 Frame: function:'DependencyObservable._setValueInternal', file:'/data/data/org.nativescript.gopost/files/app/tns_modules/ui/core/dependency-observable.js', line: 307, column: 18 Frame: function:'DependencyObservable._setValue', file:'/data/data/org.nativescript.gopost/files/app/tns_modules/ui/core/dependency-observable.js', line: 133, column: 14 Frame: function:'Object.defineProperty.set', file:'/data/data/org.nativescript.gopost/files/app/tns_modules/ui/styling/style.js', line: 856, column: 18 Frame: function:'Object.defineProperty.set', file:'/data/data/org.nativescript.gopost/files/app/tns_modules/ui/core/view-common.js', line: 527, column: 42 Frame: function:'Page._addViewToNativeVisualTree', file:'/data/data/org.nativescript.gopost/files/app/tns_modules/ui/page/page.js', line: 102, column: 41 Frame: function:'eachChild', file:'/data/data/org.nativescript.gopost/files/app/tns_modules/ui/core/view.js', line: 160, column: 61 Frame: function:'Page._eachChildView', file:'/data/data/org.nativescript.gopost/files/app/tns_modules/ui/page/page-common.js', line: 286, column: 9 Frame: function:'View._onAttached', file:'/data/data/org.nativescript.gopost/files/app/tns_modules/ui/core/view.js', line: 165, column: 18 Frame: function:'View._addViewCore', file:'/data/data/org.nativescript.gopost/files/app/tns_modules/ui/core/view.js', line: 126, column: 18 Frame: function:'View._addView', file:'/data/data/org.nativescript.gopost/files/app/tns_modules/ui/core/view-common.js', line: 1163, column: 14 Frame: function:'onFragmentShown', file:'/data/data/org.nativescript.gopost/files/app/tns_modules/ui/frame/frame.js', line: 40, column: 11 Frame: function:'FragmentCallbacksImplementation.onCreateView', file:'/data/data/org.nativescript.gopost/files/app/tns_modules/ui/frame/frame.js', line: 612, column: 13 Frame: function:'FragmentClass.onCreateView', file:'/data/data/org.nativescript.gopost/files/app/tns_modules/ui/frame/fragment.js', line: 23, column: 38

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.tns.NativeScriptException

      Calling js method onCreateView failed Error: View already has a parent. View: Page(13) Parent: Frame(0) File: \"/data/data/com.abc.abc/files/app/tns_modules/ui/core/view-common.js, line: 909, column: 12 StackTrace: \n\tFrame: function:'View._addView', file:'/data/data/com.abc.abc/files/app/tns_modules/ui/core/view-common.js', line: 909, column: 19 Frame: function:'onFragmentShown', file:'/data/data/com.abc.abc/files/app/tns_modules/ui/frame/frame.js', line: 38, column: 11 Frame: function:'FragmentClass.onCreateView', file:'/data/data/com.abc.abc/files/app/tns_modules/ui/frame/frame.js', line: 538, column: 13

      at com.tns.Platform.callJSMethodNative()
    2. com.tns
      Platform.callJSMethodNative
      1. com.tns.Platform.callJSMethodNative(Native Method)
      1 frame