nativescript-mapbox icon indicating copy to clipboard operation
nativescript-mapbox copied to clipboard

"Cannot read property ' ' of null" Error on Android after upgrade to 5.0.1

Open madmas opened this issue 5 years ago • 1 comments

Hi, after upgrading to the latest version of the plugin, I get the error below when the component showing the map is initialized.

JS: ERROR TypeError: Cannot read property ' ' of null

followed by a

JS: ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'destroy' of undefined
JS: TypeError: Cannot read property 'destroy' of undefined
JS:     at MapboxView.<anonymous> (file: node_modules/nativescript-mapbox/mapbox.android.js:92:0)
JS:     at step (file: node_modules/tslib/tslib.es6.js:100:0)
JS:     at Object.next (file: node_modules/tslib/tslib.es6.js:81:44)
JS:     at file: node_modules/tslib/tslib.es6.js:74:0
JS:     at new ZoneAwarePromise (file: node_modules/@nativescript/angular/zone-js/dist/zone-nativescript.js:902:0)
JS:     at __awaiter (file: node_modules/tslib/tslib.es6.js:70:0)
JS:     at MapboxView.push.../node_modules/nativescript-mapbox/mapbox.js.MapboxView.disposeNativeView (file: node_modules/nativescript-mapbox/mapbox.android.js:86:0)
JS:     at MapboxView.push.../node_modules/@nativescript/core/ui/core/view-base/view-base.js.ViewBase._tearDownUI (file: node_modules/@nativescript/core/ui/core/view-base/view-base.js:583:0)
JS:     at file:///data/data...

I'm using {N} 6.5 with Angular. The error also occurs with the demo app included in the repo. But not on the first view, that loads nicely, but when I use the ToggleMapTest view, it crashes with the same error.

madmas avatar May 05 '20 11:05 madmas

Found the reason for the error, still have to get the map showing again, yet.

madmas avatar May 05 '20 11:05 madmas