PeterStaev / NativeScript-Drop-Down

A NativeScript DropDown widget.
Apache License 2.0
105 stars 65 forks source link

iOS error - undefined is not an object (evaluating 'this._listPicker.reloadAllComponents') #204

Closed YaakovDavid closed 5 years ago

YaakovDavid commented 5 years ago

I'm using this plugin for both iOS and Android and it's been working great, but yesterday I realized that three pages in my app weren't working on iOS.

When I comment out the plugin these pages work fine. The error message also points to this plugin.

error message:

CONSOLE LOG file:///app/tns_modules/tns-core-modules/trace/trace.js:169:28: Error: Nativescript Error: TypeError: undefined is not an object (evaluating 'this._listPicker.reloadAllComponents')
CONSOLE WARN file:///app/tns_modules/tns-core-modules/application/application.js:277:26: Fatal JavaScript exception - application has been terminated.

file:///app/tns_modules/nativescript-drop-down/drop-down.js:93:25: JS ERROR TypeError: undefined is not an object (evaluating 'this._listPicker.reloadAllComponents')
YaakovDavid commented 5 years ago

My app is built in nativescript core with Typescript

app info

16:43 $ tns plugin
Dependencies:
┌──────────────────────────────────┬─────────┐
│ Plugin                           │ Version │
│ @types/base-64                   │ ^0.1.3  │
│ @types/utf8                      │ ^2.1.6  │
│ base-64                          │ ^0.1.0  │
│ nativescript-camera              │ ^4.4.0  │
│ nativescript-checkbox            │ ^3.0.3  │
│ nativescript-clipboard           │ ^1.1.7  │
│ nativescript-drop-down           │ ^5.0.0  │
│ nativescript-fingerprint-auth    │ ^6.2.0  │
│ nativescript-folding-list-view   │ ^1.2.0  │
│ nativescript-https               │ ^1.0.3  │
│ nativescript-local-notifications │ ^3.1.2  │
│ nativescript-mapbox              │ ^4.4.1  │
│ nativescript-masked-text-field   │ ^4.0.1  │
│ nativescript-menu                │ ^1.0.3  │
│ nativescript-orientation         │ ^2.2.1  │
│ nativescript-pdf-view            │ ^2.0.1  │
│ nativescript-platform-css        │ ^1.6.7  │
│ nativescript-secure-storage      │ ^2.4.0  │
│ nativescript-social-share        │ ^1.5.1  │
│ nativescript-stripe              │ ^5.0.8  │
│ nativescript-toasty              │ ^1.3.0  │
│ nativescript-ui-listview         │ ^6.1.0  │
│ nativescript-ui-sidedrawer       │ ^6.0.0  │
│ nativescript-videoplayer         │ ^4.2.1  │
│ nativescript-wonderpush          │ ^0.1.1  │
│ rxjs                             │ ~6.3.0  │
│ tns-core-modules                 │ ^5.4.0  │
│ utf8                             │ ^3.0.0  │
└──────────────────────────────────┴─────────┘
Dev Dependencies:
┌─────────────────────────────┬─────────┐
│ Plugin                      │ Version │
│ nativescript-dev-sass       │ ^1.7.0  │
│ nativescript-dev-typescript │ ~0.7.0  │
│ nativescript-dev-webpack    │ ^0.22.0 │
│ nativescript-theme-core     │ ^1.0.4  │
│ node-sass                   │ ^4.11.0 │
│ tns-platform-declarations   │ ^5.2.0  │
│ tslint                      │ ~5.11.0 │
└─────────────────────────────┴─────────┘
PeterStaev commented 5 years ago

Hey @YaakovDavid , please provide a reproducible example via the NativeScript playground so you can isolate the problem. Or if you ca reproduce the problem with the demo apps attached in this repo. Otherwise I cannot provide much of an assistance.

YaakovDavid commented 5 years ago

I tried to reproduce this problem once today in a new app and just with this plugin in it and it worked, on the other hand, it didn't work in my current app, and when I took it out my app started working again, so I'm going to try and reproduce it and I'll get back to you.

PeterStaev commented 5 years ago

No further response so closing this one for now. In case you still have problems, please provide more details.

PeterStaev commented 5 years ago

Hey @YaakovDavid , a quick follow up on this - seems to be the same as #209. It was traced to be the the combination of the drop down and orientation plugins that was causing this exception in some specific cases. The fix is now available on npm with version 5.0.1 so please give it a shot 😉

YaakovDavid commented 5 years ago

Oh, thanks!