a14n / dart-google-maps

A library to use Google Maps JavaScript API v3 from Dart scripts.
Apache License 2.0
130 stars 66 forks source link

Error: 'IdentityCodec' is not a subtype of expected type 'Codec<String, dynamic>' #59

Closed jbhsoftware closed 6 years ago

jbhsoftware commented 6 years ago

Hello, I am having some trouble with this. I created a bare bones AngularDart app and installed the maps library, but I am still getting the following error:

dart_sdk.js:101409 EXCEPTION: Type 'IdentityCodec' is not a subtype of expected type 'Codec<String, dynamic>'.
STACKTRACE: 
dart:sdk_internal 3969:19                                      as_C
package:js_wrapping/adapter/js_list.dart 29:39                 created
package:js_wrapping/util/codec.dart 122:32                     asJsObject
package:js_wrapping/util/codec.dart 77:56                      convert
dart:sdk_internal 34270:29                                     encode
package:google_maps/src/google_maps_src_places.g.dart 64:41    set types
package:google_address/src/google_maps/google_maps.dart 39:45  ngOnInit
package:google_address/app_component.template.dart 64:22       detectChangesInternal
package:angular/src/core/linker/app_view.dart 418:7            detectCrash
package:angular/src/core/linker/app_view.dart 395:7            detectChanges
package:google_address/app_component.template.dart 98:16       detectChangesInternal
package:angular/src/core/linker/app_view.dart 418:7            detectCrash
package:angular/src/core/linker/app_view.dart 395:7            detectChanges
package:angular/src/core/change_detection/host.dart 192:13     [_runTickGuarded]
package:angular/src/core/change_detection/host.dart 149:27     tick
package:angular/src/core/application_ref.dart 104:5            [_loadComponent]
package:angular/src/core/application_ref.dart 97:21            src__runtime__optimizations.unsafeCast.run.dart.fn
package:angular/src/core/change_detection/host.dart 250:18     runInZone.dart.fn
package:angular/src/core/zone/ng_zone.dart 178:16              parent.run.dart.fn
dart:sdk_internal 28844:14                                     run
package:angular/src/core/zone/ng_zone.dart 175:18              [_run]
dart:sdk_internal 29045:14                                     run
package:angular/src/core/zone/ng_zone.dart 327:22              run
package:angular/src/core/application_ref.dart 138:49           runInZone
package:angular/src/core/change_detection/host.dart 248:5      run
package:angular/src/core/application_ref.dart 67:23            bootstrap
package:angular/src/bootstrap/run.dart 188:16                  runApp
main.dart 5:3                                                  main
main.dart.bootstrap.js 668:12                                  <fn>
dart:sdk_internal 1717:29                                      onScriptLoad

Here is a link to a bare bones repro of the issue: Google Address AutoComplete

Thank you in advance for any guidance!

a14n commented 6 years ago

Thanks for your report. The issue was actually in js_wrapping package.

After a pub upgrade the issue should have disappear.

jbhsoftware commented 6 years ago

This works now, thank you!