Skip to content

google_maps: 8.0.0 - TypeError: Cannot read properties of undefined (reading 'x') #133

@Rexios80

Description

@Rexios80
 ══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
 The following JSNoSuchMethodError was thrown running a test:
 TypeError: Cannot read properties of undefined (reading 'x')
 
 When the exception was thrown, this was the stack:
 https://maps.googleapis.com/maps/api/js?key=redacted&libraries=geometry 363:449  fromLatLngToPoint
 packages/google_maps/src/generated/image_overlay/projection.dart 26:18                                          <fn>
 packages/google_maps_flutter_web/src/third_party/to_screen_location/to_screen_location.dart 44:42               toScreenLocation
 packages/google_maps_flutter_web/src/google_maps_controller.dart 406:9                                          getScreenCoordinate
 dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 84:54                                              runBody
 dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 127:5                                              _async
 packages/google_maps_flutter_web/src/google_maps_controller.dart 401:47                                         getScreenCoordinate
 packages/google_maps_flutter_web/src/google_maps_flutter_web.dart 163:22                                        getScreenCoordinate
 packages/google_maps_flutter/src/controller.dart 216:10                                                         getScreenCoordinate
 projection_test.dart 147:29                                                                                     <fn>
 dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 45:50                                              <fn>
 dart-sdk/lib/async/zone.dart 1407:47                                                                            _rootRunUnary
 dart-sdk/lib/async/zone.dart 1308:19                                                                            runUnary
 dart-sdk/lib/async/future_impl.dart 163:18                                                                      handleValue
 dart-sdk/lib/async/future_impl.dart 861:44                                                                      handleValueCallback
 dart-sdk/lib/async/future_impl.dart 890:13                                                                      _propagateToListeners
 dart-sdk/lib/async/future_impl.dart 666:5                                                                       [_completeWithValue]
 dart-sdk/lib/async/future_impl.dart 736:7                                                                       <fn>
 dart-sdk/lib/async/zone.dart 1399:13                                                                            _rootRun
 dart-sdk/lib/async/zone.dart 1301:19                                                                            run
 dart-sdk/lib/async/zone.dart 1209:7                                                                             runGuarded
 dart-sdk/lib/async/zone.dart 1249:23                                                                            callback
 dart-sdk/lib/async/schedule_microtask.dart 40:11                                                                _microtaskLoop
 dart-sdk/lib/async/schedule_microtask.dart 49:5                                                                 _startMicrotaskLoop
 dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 181:7                                              <fn>
 
 The test description was:
   target of map is in center of widget
 ════════════════════════════════════════════════════════════════════════════════════════════════════

I get this when running the following command in packages/google_maps_flutter/google_maps_flutter_web/example:

flutter drive -d web-server --web-port=7357 --browser-name=chrome --web-renderer=html --driver test_driver/integration_test.dart --target integration_test/projection_test.dart

This is the repo: https://github.com/Rexios80/packages_flutter

Branch: google-maps-package-web-migration

It kind of seems like the issue isn't with the function getter itself but something else. Maybe an initialization issue? But I'm not sure what because the test runs fine on the main branch. Also this is the only getter with an issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions