maplibre / flutter-maplibre-gl

Customizable, performant and vendor-free vector and raster maps, flutter wrapper for maplibre-native and maplibre-gl-js (fork of flutter-mapbox-gl/maps)
https://pub.dev/packages/maplibre_gl
Other
226 stars 125 forks source link

"User Interface" example gives Error: Unexpected null value. when debugged on Chrome #268

Open dbdean opened 1 year ago

dbdean commented 1 year ago

I'm trying to develop an cross-platform app using flutter maplibre gl, and while I've got it working on Android, debugging using Chrome gives an "Error: Unexpected null value". Using VSCode for debugging, Chrome 114.0.5735.198 on Ubuntu 23.04.

I've noticed that I can replicate the same error in the examples provided in this repository. Open the example folder as a project in VSCode and then debug it using Chrome. The main screen loads fine, but the error occurs when you enter the "User interface" example.

Exception has occurred.
"Error: Unexpected null value.
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 288:49      throw_
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 606:63  nullCheck
packages/maplibre_gl/src/mapbox_map.dart 307:40                                   <fn>
packages/maplibre_gl/src/controller.dart 131:9                                    <fn>
packages/maplibre_gl_platform_interface/src/callbacks.dart 28:18                  call
packages/maplibre_gl_web/src/mapbox_web_gl_platform.dart 406:29                   [_onStyleLoaded]
packages/maplibre_gl_dart/src/util/evented.dart 63:30                             <fn>
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 367:37  _checkAndCall
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 372:39  dcall
https://unpkg.com/maplibre-gl@latest/dist/maplibre-gl.js 31:8898                  fire
https://unpkg.com/maplibre-gl@latest/dist/maplibre-gl.js 35:378974                _render
https://unpkg.com/maplibre-gl@latest/dist/maplibre-gl.js 35:380648                <fn>