nativescript-community / ui-material-components

Monorepo that contains all of the NativeScript Material Design plugins.
https://nativescript-community.github.io/ui-material-components/
Apache License 2.0
219 stars 80 forks source link

Tabs Android TypeError: Cannot read property 'onSelectedPositionChange' of undefined #300

Closed felixkrautschuk closed 3 years ago

felixkrautschuk commented 3 years ago

Make sure to check the demo app(s) for sample usage

no Tabs example in the docs

Make sure to check the existing issues in this repository

checked

If the demo apps cannot help and there is no issue for your problem, tell us about it

When binding the selectedIndex to an Observable, like this:

<mdt:Tabs selectedIndex="{{ selectedTabIndex }}">
   ...
</mdt:Tabs>
export function onPageNavigatingTo(args: EventData) {
  const page = <Page>args.object;
  page.bindingContext = fromObject({
    selectedTabIndex: 2
  });
}

... I see the following error in the console (Android only):

TypeError: Cannot read property 'onSelectedPositionChange' of undefined

However, the selectedIndex is applied correctly. I decided to create this issue anyway, as those kinds of binding errors can lead to problems in the future.

Which platform(s) does your issue occur on?

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

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

Open the app

Is there any code involved?

nsmaterialtabs.zip

felixkrautschuk commented 3 years ago

I just noticed that this error exists since Plugin version 5.2.27

farfromrefug commented 3 years ago

@felixkrautschuk could you share the full error stack?

felixkrautschuk commented 3 years ago

@farfromrefug not sure what you mean, because I only see this one line in the logs when running the app.

But I can provide the logcat from Android studio if that helps:

2021-05-27 12:14:11.701 0-0/? I/logd: logdr: UID=2000 GID=2000 PID=4886 b tail=0 logMask=99 pid=0 start=0ns deadline=0ns

--------- beginning of main

2021-05-27 12:14:12.416 415-415/? W/adbd: timeout expired while flushing socket, closing 2021-05-27 12:14:12.776 997-997/com.google.android.apps.nexuslauncher D/TaplEvents: Main / Touch event: MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=686.9641, y[0]=1087.9486, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=META_NUM_LOCK_ON, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=313517, downTime=313517, deviceId=7, source=0x1002, displayId=0, eventId=37706379 } 2021-05-27 12:14:12.799 724-792/com.android.systemui V/PipMenuActController: Not going to move PiP, either menu or its parent is not created. 2021-05-27 12:14:12.800 997-997/com.google.android.apps.nexuslauncher D/AllAppsContainerView: onDraw at = 1622110452800 2021-05-27 12:14:12.816 997-1447/com.google.android.apps.nexuslauncher D/EGL_emulation: app_time_stats: avg=333.75ms min=1.13ms max=4984.33ms count=15 2021-05-27 12:14:12.870 997-997/com.google.android.apps.nexuslauncher D/TaplEvents: Main / Touch event: MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=748.95996, y[0]=620.9198, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=META_NUM_LOCK_ON, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=313611, downTime=313517, deviceId=7, source=0x1002, displayId=0, eventId=127385212 } 2021-05-27 12:14:13.036 724-813/com.android.systemui D/EGL_emulation: app_time_stats: avg=12993.77ms min=12993.77ms max=12993.77ms count=1 2021-05-27 12:14:13.038 724-813/com.android.systemui D/EGL_emulation: app_time_stats: avg=194.55ms min=9.00ms max=6081.68ms count=34 2021-05-27 12:14:13.165 997-1025/com.google.android.apps.nexuslauncher W/FrameTracker: Missed App frame:16 2021-05-27 12:14:13.165 997-1025/com.google.android.apps.nexuslauncher W/FrameTracker: Missed App frame:80 2021-05-27 12:14:13.165 997-1025/com.google.android.apps.nexuslauncher W/FrameTracker: Missed App frame:80 2021-05-27 12:14:13.165 997-1025/com.google.android.apps.nexuslauncher W/FrameTracker: Missed App frame:80 2021-05-27 12:14:13.165 997-1025/com.google.android.apps.nexuslauncher W/FrameTracker: Missed App frame:80 2021-05-27 12:14:13.165 997-1025/com.google.android.apps.nexuslauncher W/FrameTracker: Missed App frame:80 2021-05-27 12:14:13.165 997-1025/com.google.android.apps.nexuslauncher W/FrameTracker: Missed App frame:80 2021-05-27 12:14:13.165 997-1025/com.google.android.apps.nexuslauncher W/FrameTracker: Missed App frame:80 2021-05-27 12:14:13.165 997-1025/com.google.android.apps.nexuslauncher W/FrameTracker: Missed App frame:80 2021-05-27 12:14:13.165 997-1025/com.google.android.apps.nexuslauncher W/FrameTracker: Missed App frame:80 2021-05-27 12:14:13.165 997-1025/com.google.android.apps.nexuslauncher W/FrameTracker: Missed App frame:80 2021-05-27 12:14:13.165 997-1025/com.google.android.apps.nexuslauncher W/FrameTracker: Missed App frame:80 2021-05-27 12:14:13.165 997-1025/com.google.android.apps.nexuslauncher W/FrameTracker: Missed App frame:80 2021-05-27 12:14:13.165 997-1025/com.google.android.apps.nexuslauncher W/FrameTracker: Missed App frame:80 2021-05-27 12:14:13.165 997-1025/com.google.android.apps.nexuslauncher W/FrameTracker: Missed App frame:80 2021-05-27 12:14:13.165 997-1025/com.google.android.apps.nexuslauncher W/FrameTracker: Missed App frame:80 2021-05-27 12:14:13.166 997-1025/com.google.android.apps.nexuslauncher W/FrameTracker: Missed App frame:80 2021-05-27 12:14:13.167 997-1025/com.google.android.apps.nexuslauncher W/FrameTracker: Missed App frame:80 2021-05-27 12:14:13.167 997-1025/com.google.android.apps.nexuslauncher W/FrameTracker: Missed App frame:80 2021-05-27 12:14:13.167 997-1427/com.google.android.apps.nexuslauncher V/PerfettoTrigger: Triggering /system/bin/trigger_perfetto com.android.telemetry.interaction-jank-monitor-25 2021-05-27 12:14:14.401 997-997/com.google.android.apps.nexuslauncher D/TaplEvents: Main / Touch event: MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=885.97046, y[0]=1059.9554, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=META_NUM_LOCK_ON, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=315141, downTime=315141, deviceId=7, source=0x1002, displayId=0, eventId=570859001 } 2021-05-27 12:14:14.495 997-997/com.google.android.apps.nexuslauncher D/TaplEvents: Main / Touch event: MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=885.97046, y[0]=1059.9554, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=META_NUM_LOCK_ON, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=315236, downTime=315141, deviceId=7, source=0x1002, displayId=0, eventId=560844286 } 2021-05-27 12:14:14.516 997-997/com.google.android.apps.nexuslauncher D/TaplEvents: Main / start: startAppShortcutOrInfoActivity 2021-05-27 12:14:14.520 997-1447/com.google.android.apps.nexuslauncher D/EGL_emulation: app_time_stats: avg=23.22ms min=1.52ms max=954.93ms count=46

--------- beginning of system

2021-05-27 12:14:14.522 556-1209/system_process I/ActivityTaskManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.nativescript.nsmaterialtabs/com.tns.NativeScriptActivity bnds=[841,956][1043,1267]} from uid 10163 2021-05-27 12:14:14.524 556-1209/system_process D/CompatibilityChangeReporter: Compat change id reported: 174042980; UID 10178; state: DISABLED 2021-05-27 12:14:14.527 556-1209/system_process D/CompatibilityChangeReporter: Compat change id reported: 168419799; UID 10178; state: DISABLED 2021-05-27 12:14:14.531 556-556/system_process W/ActivityManager: Unable to start service Intent { act=android.service.appprediction.AppPredictionService cmp=com.google.android.as/com.google.android.apps.miphone.aiai.app.AiAiPredictionService } U=0: not found 2021-05-27 12:14:14.531 556-556/system_process W/RemoteAppPredictionService: could not bind to Intent { act=android.service.appprediction.AppPredictionService cmp=com.google.android.as/com.google.android.apps.miphone.aiai.app.AiAiPredictionService } using flags 67112961 2021-05-27 12:14:14.536 556-582/system_process D/CompatibilityChangeReporter: Compat change id reported: 135634846; UID 10178; state: DISABLED 2021-05-27 12:14:14.537 556-592/system_process D/CompatibilityChangeReporter: Compat change id reported: 143937733; UID 10178; state: ENABLED 2021-05-27 12:14:14.544 330-330/? D/Zygote: Forked child process 4892 2021-05-27 12:14:14.555 4892-4892/? I/.nsmaterialtab: Late-enabling -Xcheck:jni 2021-05-27 12:14:14.557 556-592/system_process I/ActivityManager: Start proc 4892:org.nativescript.nsmaterialtabs/u0a178 for pre-top-activity {org.nativescript.nsmaterialtabs/com.tns.NativeScriptActivity} 2021-05-27 12:14:14.573 4892-4892/? W/.nsmaterialtab: Unexpected CPU variant for X86 using defaults: x86_64 2021-05-27 12:14:14.583 415-437/? I/adbd: jdwp connection from 4892 2021-05-27 12:14:14.602 556-1209/system_process W/InputReader: Device virtio_input_multi_touch_11 is associated with display ADISPLAY_ID_NONE. 2021-05-27 12:14:14.603 556-1209/system_process W/InputReader: Device virtio_input_multi_touch_7 is associated with display ADISPLAY_ID_NONE. 2021-05-27 12:14:14.603 556-1209/system_process W/InputReader: Device virtio_input_multi_touch_8 is associated with display ADISPLAY_ID_NONE. 2021-05-27 12:14:14.603 556-1209/system_process W/InputReader: Device virtio_input_multi_touch_2 is associated with display ADISPLAY_ID_NONE. 2021-05-27 12:14:14.603 556-1209/system_process W/InputReader: Device virtio_input_multi_touch_4 is associated with display ADISPLAY_ID_NONE. 2021-05-27 12:14:14.603 556-1209/system_process W/InputReader: Device virtio_input_multi_touch_6 is associated with display ADISPLAY_ID_NONE. 2021-05-27 12:14:14.603 556-1209/system_process W/InputReader: Device virtio_input_multi_touch_3 is associated with display ADISPLAY_ID_NONE. 2021-05-27 12:14:14.603 556-1209/system_process W/InputReader: Device virtio_input_multi_touch_5 is associated with display ADISPLAY_ID_NONE. 2021-05-27 12:14:14.603 556-1209/system_process W/InputReader: Device virtio_input_multi_touch_9 is associated with display ADISPLAY_ID_NONE. 2021-05-27 12:14:14.603 556-1209/system_process W/InputReader: Device virtio_input_multi_touch_10 is associated with display ADISPLAY_ID_NONE. 2021-05-27 12:14:14.603 556-1209/system_process W/InputReader: Device virtio_input_multi_touch_11 is associated with display ADISPLAY_ID_NONE. 2021-05-27 12:14:14.603 556-1209/system_process W/InputReader: Device virtio_input_multi_touch_7 is associated with display ADISPLAY_ID_NONE. 2021-05-27 12:14:14.603 556-1209/system_process W/InputReader: Device virtio_input_multi_touch_8 is associated with display ADISPLAY_ID_NONE. 2021-05-27 12:14:14.603 556-1209/system_process W/InputReader: Device virtio_input_multi_touch_2 is associated with display ADISPLAY_ID_NONE. 2021-05-27 12:14:14.603 556-1209/system_process W/InputReader: Device virtio_input_multi_touch_4 is associated with display ADISPLAY_ID_NONE. 2021-05-27 12:14:14.603 556-1209/system_process W/InputReader: Device virtio_input_multi_touch_6 is associated with display ADISPLAY_ID_NONE. 2021-05-27 12:14:14.603 556-1209/system_process W/InputReader: Device virtio_input_multi_touch_3 is associated with display ADISPLAY_ID_NONE. 2021-05-27 12:14:14.603 556-1209/system_process W/InputReader: Device virtio_input_multi_touch_5 is associated with display ADISPLAY_ID_NONE. 2021-05-27 12:14:14.603 556-1209/system_process W/InputReader: Device virtio_input_multi_touch_9 is associated with display ADISPLAY_ID_NONE. 2021-05-27 12:14:14.603 556-1209/system_process W/InputReader: Device virtio_input_multi_touch_10 is associated with display ADISPLAY_ID_NONE. 2021-05-27 12:14:14.628 4892-4892/org.nativescript.nsmaterialtabs D/CompatibilityChangeReporter: Compat change id reported: 171979766; UID 10178; state: DISABLED 2021-05-27 12:14:14.641 390-688/? D/AF::TrackHandle: OpPlayAudio: track:55 usage:13 not muted 2021-05-27 12:14:14.643 390-688/? D/AF::TrackHandle: OpPlayAudio: track:55 usage:13 not muted 2021-05-27 12:14:14.644 390-688/? D/AF::TrackHandle: OpPlayAudio: track:55 usage:13 not muted 2021-05-27 12:14:14.646 390-688/? D/AF::TrackHandle: OpPlayAudio: track:55 usage:13 not muted 2021-05-27 12:14:14.647 390-688/? D/AF::TrackHandle: OpPlayAudio: track:55 usage:13 not muted 2021-05-27 12:14:14.648 390-688/? D/AF::TrackHandle: OpPlayAudio: track:55 usage:13 not muted 2021-05-27 12:14:14.649 390-688/? D/AF::TrackHandle: OpPlayAudio: track:55 usage:13 not muted 2021-05-27 12:14:14.651 390-688/? D/AF::TrackHandle: OpPlayAudio: track:55 usage:13 not muted 2021-05-27 12:14:14.651 390-688/? D/AF::TrackHandle: OpPlayAudio: track:55 usage:13 not muted 2021-05-27 12:14:14.652 390-688/? D/AF::TrackHandle: OpPlayAudio: track:55 usage:13 not muted 2021-05-27 12:14:14.653 390-688/? D/AF::TrackHandle: OpPlayAudio: track:55 usage:13 not muted 2021-05-27 12:14:14.654 390-688/? D/AF::TrackHandle: OpPlayAudio: track:55 usage:13 not muted 2021-05-27 12:14:14.654 390-688/? D/AF::TrackHandle: OpPlayAudio: track:55 usage:13 not muted 2021-05-27 12:14:14.656 390-688/? D/AF::TrackHandle: OpPlayAudio: track:55 usage:13 not muted 2021-05-27 12:14:14.658 390-505/? D/AF::TrackHandle: OpPlayAudio: track:55 usage:13 not muted 2021-05-27 12:14:14.658 390-505/? D/AF::TrackHandle: OpPlayAudio: track:55 usage:13 not muted 2021-05-27 12:14:14.669 348-381/? D/goldfish-address-space: allocate: Ask for block of size 0x9a3f80 2021-05-27 12:14:14.670 348-381/? D/goldfish-address-space: allocate: ioctl allocate returned offset 0x3f6a77000 size 0x9a5000 2021-05-27 12:14:14.685 348-381/? D/goldfish-address-space: allocate: Ask for block of size 0x9a3f80 2021-05-27 12:14:14.686 348-381/? D/goldfish-address-space: allocate: ioctl allocate returned offset 0x3f475b000 size 0x9a5000 2021-05-27 12:14:14.695 348-382/? D/goldfish-address-space: allocate: Ask for block of size 0x9a3f80 2021-05-27 12:14:14.696 348-382/? D/goldfish-address-space: allocate: ioctl allocate returned offset 0x3f3db6000 size 0x9a5000 2021-05-27 12:14:14.721 348-382/? D/goldfish-address-space: allocate: Ask for block of size 0x9a3f80 2021-05-27 12:14:14.721 348-382/? D/goldfish-address-space: allocate: ioctl allocate returned offset 0x3f475b000 size 0x9a5000 2021-05-27 12:14:14.736 348-382/? D/goldfish-address-space: allocate: Ask for block of size 0x9a3f80 2021-05-27 12:14:14.736 348-382/? D/goldfish-address-space: allocate: ioctl allocate returned offset 0x3f3db6000 size 0x9a5000 2021-05-27 12:14:14.764 349-349/? W/RanchuHwc: validateDisplay: layer 47 CompositionType 1, fallback 2021-05-27 12:14:14.767 349-349/? W/RanchuHwc: presentDisplay display has no layers to compose, flushing client target buffer. 2021-05-27 12:14:14.767 4892-4892/org.nativescript.nsmaterialtabs I/TetheringManager: registerTetheringEventCallback:org.nativescript.nsmaterialtabs 2021-05-27 12:14:14.770 4892-4892/org.nativescript.nsmaterialtabs V/GraphicsEnvironment: ANGLE Developer option for 'org.nativescript.nsmaterialtabs' set to: 'default' 2021-05-27 12:14:14.770 4892-4892/org.nativescript.nsmaterialtabs V/GraphicsEnvironment: Neither updatable production driver nor prerelease driver is supported. 2021-05-27 12:14:14.773 4892-4892/org.nativescript.nsmaterialtabs D/NetworkSecurityConfig: No Network Security Config specified, using platform default 2021-05-27 12:14:14.773 4892-4892/org.nativescript.nsmaterialtabs D/NetworkSecurityConfig: No Network Security Config specified, using platform default 2021-05-27 12:14:14.780 349-349/? W/RanchuHwc: validateDisplay: layer 47 CompositionType 1, fallback 2021-05-27 12:14:14.783 349-349/? W/RanchuHwc: presentDisplay display has no layers to compose, flushing client target buffer. 2021-05-27 12:14:14.788 4892-4892/org.nativescript.nsmaterialtabs I/TNS.Runtime: NativeScript Runtime Version 7.0.1, commit no commit sha was provided by build.gradle build 2021-05-27 12:14:14.797 349-349/? W/RanchuHwc: validateDisplay: layer 47 CompositionType 1, fallback 2021-05-27 12:14:14.799 349-349/? W/RanchuHwc: presentDisplay display has no layers to compose, flushing client target buffer. 2021-05-27 12:14:14.814 349-349/? W/RanchuHwc: validateDisplay: layer 47 CompositionType 1, fallback 2021-05-27 12:14:14.816 349-349/? W/RanchuHwc: presentDisplay display has no layers to compose, flushing client target buffer. 2021-05-27 12:14:14.830 349-349/? W/RanchuHwc: validateDisplay: layer 47 CompositionType 1, fallback 2021-05-27 12:14:14.832 349-349/? W/RanchuHwc: presentDisplay display has no layers to compose, flushing client target buffer. 2021-05-27 12:14:14.847 349-349/? W/RanchuHwc: validateDisplay: layer 47 CompositionType 1, fallback 2021-05-27 12:14:14.850 349-349/? W/RanchuHwc: presentDisplay display has no layers to compose, flushing client target buffer. 2021-05-27 12:14:14.855 4892-4892/org.nativescript.nsmaterialtabs D/TNS.Runtime: V8 version 8.3.110.9 2021-05-27 12:14:14.864 349-349/? W/RanchuHwc: validateDisplay: layer 47 CompositionType 1, fallback 2021-05-27 12:14:14.867 349-349/? W/RanchuHwc: presentDisplay display has no layers to compose, flushing client target buffer. 2021-05-27 12:14:14.881 349-349/? W/RanchuHwc: validateDisplay: layer 47 CompositionType 1, fallback 2021-05-27 12:14:14.883 349-349/? W/RanchuHwc: presentDisplay display has no layers to compose, flushing client target buffer. 2021-05-27 12:14:14.898 349-349/? W/RanchuHwc: validateDisplay: layer 47 CompositionType 1, fallback 2021-05-27 12:14:14.901 349-349/? W/RanchuHwc: presentDisplay display has no layers to compose, flushing client target buffer. 2021-05-27 12:14:14.914 349-349/? W/RanchuHwc: validateDisplay: layer 47 CompositionType 1, fallback 2021-05-27 12:14:14.917 349-349/? W/RanchuHwc: presentDisplay display has no layers to compose, flushing client target buffer. 2021-05-27 12:14:14.931 349-349/? W/RanchuHwc: validateDisplay: layer 47 CompositionType 1, fallback 2021-05-27 12:14:14.933 349-349/? W/RanchuHwc: presentDisplay display has no layers to compose, flushing client target buffer. 2021-05-27 12:14:14.947 349-349/? W/RanchuHwc: validateDisplay: layer 47 CompositionType 1, fallback 2021-05-27 12:14:14.951 349-349/? W/RanchuHwc: presentDisplay display has no layers to compose, flushing client target buffer. 2021-05-27 12:14:14.952 724-813/com.android.systemui D/EGL_emulation: app_time_stats: avg=212.81ms min=14.72ms max=1782.90ms count=9 2021-05-27 12:14:14.953 724-813/com.android.systemui D/EGL_emulation: app_time_stats: avg=212.75ms min=14.77ms max=1782.37ms count=9 2021-05-27 12:14:14.964 349-349/? W/RanchuHwc: validateDisplay: layer 47 CompositionType 1, fallback 2021-05-27 12:14:14.967 349-349/? W/RanchuHwc: presentDisplay display has no layers to compose, flushing client target buffer. 2021-05-27 12:14:14.980 349-349/? W/RanchuHwc: validateDisplay: layer 47 CompositionType 1, fallback 2021-05-27 12:14:14.983 349-349/? W/RanchuHwc: presentDisplay display has no layers to compose, flushing client target buffer. 2021-05-27 12:14:14.997 349-349/? W/RanchuHwc: validateDisplay: layer 47 CompositionType 1, fallback 2021-05-27 12:14:15.000 349-349/? W/RanchuHwc: presentDisplay display has no layers to compose, flushing client target buffer. 2021-05-27 12:14:15.014 349-349/? W/RanchuHwc: validateDisplay: layer 47 CompositionType 1, fallback 2021-05-27 12:14:15.017 349-349/? W/RanchuHwc: presentDisplay display has no layers to compose, flushing client target buffer. 2021-05-27 12:14:15.031 349-349/? W/RanchuHwc: validateDisplay: layer 47 CompositionType 1, fallback 2021-05-27 12:14:15.034 349-349/? W/RanchuHwc: presentDisplay display has no layers to compose, flushing client target buffer. 2021-05-27 12:14:15.048 349-349/? W/RanchuHwc: validateDisplay: layer 47 CompositionType 1, fallback 2021-05-27 12:14:15.050 349-349/? W/RanchuHwc: presentDisplay display has no layers to compose, flushing client target buffer. 2021-05-27 12:14:15.065 349-349/? W/RanchuHwc: validateDisplay: layer 47 CompositionType 1, fallback 2021-05-27 12:14:15.067 349-349/? W/RanchuHwc: presentDisplay display has no layers to compose, flushing client target buffer. 2021-05-27 12:14:15.080 349-349/? W/RanchuHwc: validateDisplay: layer 47 CompositionType 1, fallback 2021-05-27 12:14:15.083 349-349/? W/RanchuHwc: presentDisplay display has no layers to compose, flushing client target buffer. 2021-05-27 12:14:15.097 349-349/? W/RanchuHwc: validateDisplay: layer 47 CompositionType 1, fallback 2021-05-27 12:14:15.100 349-349/? W/RanchuHwc: presentDisplay display has no layers to compose, flushing client target buffer. 2021-05-27 12:14:15.114 349-349/? W/RanchuHwc: validateDisplay: layer 47 CompositionType 1, fallback 2021-05-27 12:14:15.116 349-349/? W/RanchuHwc: presentDisplay display has no layers to compose, flushing client target buffer. 2021-05-27 12:14:15.131 349-349/? W/RanchuHwc: validateDisplay: layer 47 CompositionType 1, fallback 2021-05-27 12:14:15.134 349-349/? W/RanchuHwc: presentDisplay display has no layers to compose, flushing client target buffer. 2021-05-27 12:14:15.147 349-349/? W/RanchuHwc: validateDisplay: layer 47 CompositionType 1, fallback 2021-05-27 12:14:15.151 349-349/? W/RanchuHwc: presentDisplay display has no layers to compose, flushing client target buffer. 2021-05-27 12:14:15.181 395-395/? E/ClientCache: failed to get buffer, invalid buffer id 2021-05-27 12:14:15.181 395-395/? E/ClientCache: failed to register erased recipient, could not retrieve buffer 2021-05-27 12:14:15.196 395-395/? E/ClientCache: failed to get buffer, invalid buffer id 2021-05-27 12:14:15.196 395-395/? E/ClientCache: failed to register erased recipient, could not retrieve buffer 2021-05-27 12:14:15.221 997-1427/com.google.android.apps.nexuslauncher W/FrameTracker: Missed App frame:80 2021-05-27 12:14:15.222 997-1427/com.google.android.apps.nexuslauncher V/PerfettoTrigger: Not triggering com.android.telemetry.interaction-jank-monitor-8 - not enough time since last trigger 2021-05-27 12:14:15.422 4892-4921/org.nativescript.nsmaterialtabs D/libEGL: loaded /vendor/lib64/egl/libEGL_emulation.so 2021-05-27 12:14:15.425 4892-4921/org.nativescript.nsmaterialtabs D/libEGL: loaded /vendor/lib64/egl/libGLESv1_CM_emulation.so 2021-05-27 12:14:15.431 4892-4921/org.nativescript.nsmaterialtabs D/libEGL: loaded /vendor/lib64/egl/libGLESv2_emulation.so 2021-05-27 12:14:15.605 4892-4892/org.nativescript.nsmaterialtabs W/.nsmaterialtab: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (unsupported, reflection, allowed) 2021-05-27 12:14:15.606 4892-4892/org.nativescript.nsmaterialtabs W/.nsmaterialtab: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (unsupported, reflection, allowed) 2021-05-27 12:14:15.700 4892-4892/org.nativescript.nsmaterialtabs E/JS: Binding: Binding error while setting property selectedIndex of Tabs(4)@main-page.xml:6:5;: TypeError: Cannot read property 'onSelectedPositionChange' of undefined 2021-05-27 12:14:15.738 4892-4919/org.nativescript.nsmaterialtabs D/HostConnection: createUnique: call 2021-05-27 12:14:15.739 4892-4919/org.nativescript.nsmaterialtabs D/HostConnection: HostConnection::get() New Host Connection established 0x7971d4b60ed0, tid 4919 2021-05-27 12:14:15.744 4892-4919/org.nativescript.nsmaterialtabs D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer ANDROID_EMU_sync_buffer_data GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_async_frame_commands ANDROID_EMU_gles_max_version_3_0 2021-05-27 12:14:15.747 194-194/? I/hwservicemanager: getTransport: Cannot find entry android.hardware.configstore@1.0::ISurfaceFlingerConfigs/default in either framework or device VINTF manifest. 2021-05-27 12:14:15.749 4892-4919/org.nativescript.nsmaterialtabs W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without... 2021-05-27 12:14:15.750 4892-4919/org.nativescript.nsmaterialtabs W/OpenGLRenderer: Failed to initialize 101010-2 format, error = EGL_SUCCESS 2021-05-27 12:14:15.752 4892-4919/org.nativescript.nsmaterialtabs D/EGL_emulation: eglCreateContext: 0x7971e4b14010: maj 3 min 0 rcv 3 2021-05-27 12:14:15.755 4892-4919/org.nativescript.nsmaterialtabs D/EGL_emulation: eglMakeCurrent: 0x7971e4b14010: ver 3 0 (tinfo 0x7973ebca1080) (first time) 2021-05-27 12:14:15.762 395-410/? E/HWComposer: getSupportedContentTypes: getSupportedContentTypes failed for display 4619827259835644672: Unsupported (8) 2021-05-27 12:14:15.764 194-194/? I/hwservicemanager: getTransport: Cannot find entry android.hardware.graphics.mapper@4.0::IMapper/default in either framework or device VINTF manifest. 2021-05-27 12:14:15.764 4892-4919/org.nativescript.nsmaterialtabs I/Gralloc4: mapper 4.x is not supported 2021-05-27 12:14:15.766 4892-4919/org.nativescript.nsmaterialtabs D/HostConnection: createUnique: call 2021-05-27 12:14:15.766 4892-4919/org.nativescript.nsmaterialtabs D/HostConnection: HostConnection::get() New Host Connection established 0x7971d4b62190, tid 4919 2021-05-27 12:14:15.767 4892-4919/org.nativescript.nsmaterialtabs D/goldfish-address-space: allocate: Ask for block of size 0x100 2021-05-27 12:14:15.767 4892-4919/org.nativescript.nsmaterialtabs D/goldfish-address-space: allocate: ioctl allocate returned offset 0x3fd1bb000 size 0x2000 2021-05-27 12:14:15.769 194-194/? I/hwservicemanager: getTransport: Cannot find entry android.hardware.graphics.allocator@4.0::IAllocator/default in either framework or device VINTF manifest. 2021-05-27 12:14:15.769 4892-4919/org.nativescript.nsmaterialtabs W/Gralloc4: allocator 4.x is not supported 2021-05-27 12:14:15.771 348-382/? D/goldfish-address-space: allocate: Ask for block of size 0x9a3f80 2021-05-27 12:14:15.772 348-382/? D/goldfish-address-space: allocate: ioctl allocate returned offset 0x3fecb4000 size 0x9a5000 2021-05-27 12:14:15.785 4892-4919/org.nativescript.nsmaterialtabs D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer ANDROID_EMU_sync_buffer_data GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_async_frame_commands ANDROID_EMU_gles_max_version_3_0 2021-05-27 12:14:15.786 348-382/? D/goldfish-address-space: allocate: Ask for block of size 0x9a3f80 2021-05-27 12:14:15.786 348-382/? D/goldfish-address-space: allocate: ioctl allocate returned offset 0x3f6a77000 size 0x9a5000 2021-05-27 12:14:15.795 348-382/? D/goldfish-address-space: allocate: Ask for block of size 0x9a3f80 2021-05-27 12:14:15.796 348-382/? D/goldfish-address-space: allocate: ioctl allocate returned offset 0x3f60d2000 size 0x9a5000 2021-05-27 12:14:15.818 556-590/system_process I/ActivityTaskManager: Displayed org.nativescript.nsmaterialtabs/com.tns.NativeScriptActivity: +1s295ms 2021-05-27 12:14:15.834 556-4360/system_process W/InputManager-JNI: Input channel object '9db861e Splash Screen org.nativescript.nsmaterialtabs (client)' was disposed without first being removed with the input manager! 2021-05-27 12:14:15.836 4892-4892/org.nativescript.nsmaterialtabs D/CompatibilityChangeReporter: Compat change id reported: 171228096; UID 10178; state: ENABLED 2021-05-27 12:14:15.864 395-395/? E/ClientCache: failed to get buffer, invalid buffer id 2021-05-27 12:14:15.864 395-395/? E/ClientCache: failed to register erased recipient, could not retrieve buffer 2021-05-27 12:14:15.965 724-813/com.android.systemui D/EGL_emulation: app_time_stats: avg=18.66ms min=10.15ms max=128.57ms count=54 2021-05-27 12:14:16.013 348-382/? D/goldfish-address-space: allocate: Ask for block of size 0x9a3f80 2021-05-27 12:14:16.013 348-382/? D/goldfish-address-space: allocate: ioctl allocate returned offset 0x3f6a77000 size 0x9a5000 2021-05-27 12:14:16.071 348-382/? D/goldfish-address-space: allocate: Ask for block of size 0x9a3f80 2021-05-27 12:14:16.071 348-382/? D/goldfish-address-space: allocate: ioctl allocate returned offset 0x3f60d2000 size 0x9a5000 2021-05-27 12:14:16.087 1265-1265/com.google.android.inputmethod.latin I/GoogleInputMethodService: GoogleInputMethodService.onFinishInput():3341 2021-05-27 12:14:16.087 1265-1265/com.google.android.inputmethod.latin I/GoogleInputMethodService: GoogleInputMethodService.onStartInput():1906 2021-05-27 12:14:16.091 348-382/? D/goldfish-address-space: allocate: Ask for block of size 0x9a3f80 2021-05-27 12:14:16.091 348-382/? D/goldfish-address-space: allocate: ioctl allocate returned offset 0x3f572d000 size 0x9a5000 2021-05-27 12:14:16.105 1517-2056/com.google.android.googlequicksearchbox I/PBSessionCacheImpl: Deleted sessionId[6673458667509584] from persistence. 2021-05-27 12:14:16.112 1517-1908/com.google.android.googlequicksearchbox W/SearchServiceCore: Abort, client detached. 2021-05-27 12:14:16.119 1517-1908/com.google.android.googlequicksearchbox I/MicroDetectionState: Should stop hotword detection immediately - true 2021-05-27 12:14:18.349 556-581/system_process I/DropBoxManagerService: add tag=system_server_strictmode isTagEnabled=true flags=0x2 2021-05-27 12:14:18.350 556-581/system_process I/DropBoxManagerService: add tag=system_server_strictmode isTagEnabled=true flags=0x2 2021-05-27 12:14:18.351 556-581/system_process I/DropBoxManagerService: add tag=system_server_strictmode isTagEnabled=true flags=0x2 2021-05-27 12:14:18.351 556-581/system_process I/DropBoxManagerService: add tag=system_server_strictmode isTagEnabled=true flags=0x2 2021-05-27 12:14:18.352 556-581/system_process I/DropBoxManagerService: add tag=system_server_strictmode isTagEnabled=true flags=0x2 2021-05-27 12:14:18.353 556-581/system_process I/DropBoxManagerService: add tag=system_server_strictmode isTagEnabled=true flags=0x2 2021-05-27 12:14:18.353 556-581/system_process I/DropBoxManagerService: add tag=system_server_strictmode isTagEnabled=true flags=0x2 2021-05-27 12:14:18.354 556-581/system_process I/DropBoxManagerService: add tag=system_server_strictmode isTagEnabled=true flags=0x2 2021-05-27 12:14:18.355 556-581/system_process I/DropBoxManagerService: add tag=system_server_strictmode isTagEnabled=true flags=0x2 2021-05-27 12:14:18.356 556-581/system_process I/DropBoxManagerService: add tag=system_server_strictmode isTagEnabled=true flags=0x2

farfromrefug commented 3 years ago

@felixkrautschuk the error is triggered from here https://github.com/Nativescript/NativeScript/blob/master/packages/core/ui/core/bindable/index.ts#L639 I think, but i am not sure that it means you did not define onSelectedPositionChange in you component and thus would not get notified on prop change. Seems specific to core ui and and it checks on your instance (the xml one) and not the View created by my plugin.

felixkrautschuk commented 3 years ago

As I only updated the plugin version from 5.2.26 to 5.2.27 and the error meesage suddenly appears in the log without any other code changes, I am pretty sure that there is some change in the plugin that is causing this error for some reason.

And I think the error message doesn't say that onSelectedPositionChange is missing on my side (I cannot see anything in the docs about defining such a callback), but the object that is trying to call it is undefined.

I tried to define a onSelectedPositionChange callback (also selectedPositionChange), but it has no effect.

Bezlepkin commented 3 years ago

As I only updated the plugin version from 5.2.26 to 5.2.27 and the error meesage suddenly appears in the log without any other code changes, I am pretty sure that there is some change in the plugin that is causing this error for some reason.

And I think the error message doesn't say that onSelectedPositionChange is missing on my side (I cannot see anything in the docs about defining such a callback), but the object that is trying to call it is undefined.

I tried to define a onSelectedPositionChange callback (also selectedPositionChange), but it has no effect.

same issue!

cjohn001 commented 3 years ago

+1

farfromrefug commented 3 years ago

@felixkrautschuk @cjohn001 @Bezlepkin can you confirm you dont have the issue with 5.2.26 but you have it with 5.2.27 ?

cjohn001 commented 3 years ago

@farfromrefug : Yes, I can confirm. I am not seeing the issue with 5.2.26, but from 5.2.27 onwards up to the current 5.3.10 version.

farfromrefug commented 3 years ago

@cjohn001 ok thanks i ll try and see what changed in 5.2.27

cjohn001 commented 3 years ago

@farfromrefug : Are there any news on the issue? I am currently playing with the next version of ns-angular.

https://github.com/NativeScript/angular/issues/21#issuecomment-899129888

With the new library, the bug now results in a crash an android:

JS: ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'onSelectedPositionChange' of undefined
JS: TypeError: Cannot read property 'onSelectedPositionChange' of undefined
JS:     at Tabs.onSelectedIndexChanged (file: node_modules/@nativescript-community/ui-material-tabs/tabs.android.js:374:29)
JS:     at valueChanged (file: node_modules/@nativescript-community/ui-material-core/tab-navigation-base/tab-navigation-base/index.js:192:15)
JS:     at Tabs.selectedIndex (file: node_modules/@nativescript/core/ui/core/properties/index.js:343:24)
JS:     at ViewUtil.setPropertyInternal (file: node_modules/@nativescript/angular/fesm2015/nativescript-angular.js:1515:30)
JS:     at ViewUtil.setProperty (file: node_modules/@nativescript/angular/fesm2015/nativescript-angular.js:1467:17)
JS:     at EmulatedRenderer.setProperty (file: node_modules/@nativescript/angular/fesm2015/nativescript-angular.js:2064:22)
JS:     at BaseAnimationRenderer.setProperty (file: node_modules/@angular/platform-browser/fesm2015/animations.js:301:26)
JS:     at elementPropertyInternal (file: node_modules/@angular/core/fesm2015/core.js:10026:21)
JS:     at Object.ɵɵproperty (file:///da...
^C
farfromrefug commented 3 years ago

@cjohn001 sorry kind of forgot about this one. Thanks for your callstack could not have found the issue without it! should be fixed in 5.3.18

cjohn001 commented 3 years ago

@farfromrefug : Great ! :)

cjohn001 commented 3 years ago

@farfromrefug : I can confirm that your fix is working. I think we can close the issue then. Thanks a lot for the quick action!