I got some error when I try to use selector on another component (ReusableComponent)


Here is an error.
1 0x109712a6b NativeScript::FFICallbackNativeScript::ObjCMethodCallback::ffiClosureCallback(ffi_cif*, void*, void**, void*)
2 0x109e9290e ffi_closure_unix64_inner
3 0x109e932c2 ffi_closure_unix64
4 0x1108fabf8 -[CALayer layoutSublayers]
5 0x1108ee440 CA::Layer::layout_if_needed(CA::Transaction*)
6 0x1108ee2be CA::Layer::layout_and_display_if_needed(CA::Transaction*)
7 0x11087c318 CA::Context::commit_transaction(CA::Transaction*)
8 0x1108a93ff CA::Transaction::commit()
9 0x1108a9d6f CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*)
11 0x10d2c01d7 __CFRunLoopDoObservers
12 0x10d2a4f8e __CFRunLoopRun
13 0x10d2a4884 CFRunLoopRunSpecific
14 0x110107a6f GSEventRunModal
15 0x10aa78c68 UIApplicationMain
16 0x109e9311d ffi_call_unix64
17 0x129951870
file:///app/tns_modules/ui/core/view.js:96:124: JS ERROR Error: onMeasure() did not set the measured dimension by calling setMe
asuredDimension() ProxyViewContainer(7)

It only has the error with iOS Simulator.
There is no problem with Android Simulator.


I think we need more context here, to help you debug


I have seen this as well when I have tried creating a reusable custom component in NativeScript angular (crashes on iOS, fine on android).

What seems to help is to wrap the custom component tag at the point of use in a StackLayout.


I think it is related to the ProxyViewContainer issue mentioned in ListView can’t hold directives alone in template but not positive.