Let me start by saying that this does look like an older issue, but this just popped up when I upgraded to flutter 1.9.1+2 I was having an issue getting webdev to run, so I was using [flutter pub run build_runner serve] to get my flutter_web project to load. Now I ran flutter pub upgrade and retried booting the server, and this is the error I am getting.
From a previous thread in 2018, I tried:
flutter packages pub run build_runner clean
flutter packages pub run build_runner build --delete-conflicting-outputs
No joy ;(
[SEVERE] Failed to snapshot build script .dart_tool/build/entrypoint/build.dart.
This is likely caused by a misconfigured builder definition.
[SEVERE] ../../../.pub-cache/hosted/pub.dartlang.org/protobuf-0.13.16/lib/src/protobuf/builder_info.dart:43:34: Error: Method not found: 'MapFieldInfo.map'. _addField(MapFieldInfo<K, V>.map(name, tagNumber, index, PbFieldType.M, ^^^../../../.pub-cache/hosted/pub.dartlang.org/protobuf-0.13.16/lib/src/protobuf/field_info.dart:45:9: Error: '_mapEntryBuilderInfo' isn't an instance field of this class. _mapEntryBuilderInfo = null { ^^^^^^^^^^^^^^^^^^^^../../../.pub-cache/hosted/pub.dartlang.org/protobuf-0.13.16/lib/src/protobuf/field_info.dart:61:9: Error: '_mapEntryBuilderInfo' isn't an instance field of this class. _mapEntryBuilderInfo = null; ^^^^^^^^^^^^^^^^^^^^../../../.pub-cache/hosted/pub.dartlang.org/protobuf-0.13.16/lib/src/protobuf/field_info.dart:68:9: Error: '_mapEntryBuilderInfo' isn't an instance field of this class. _mapEntryBuilderInfo = null { ^^^^^^^^^^^^^^^^^^^^../../../.pub-cache/hosted/pub.dartlang.org/protobuf-0.13.16/lib/src/protobuf/field_info.dart:82:12: Error: '_mapEntryBuilderInfo' isn't an instance field of this class. this._mapEntryBuilderInfo]) ^^^^^^^^^^^^^^^^^^^^../../../.pub-cache/hosted/pub.dartlang.org/protobuf-0.13.16/lib/src/protobuf/field_info.dart:199:9: Error: Superclass has no constructor named 'FieldInfo._'. : super._( ^^^^^../../../.pub-cache/hosted/pub.dartlang.org/protobuf-0.13.16/lib/src/protobuf/field_info.dart:195:21: Error: Final field '_mapEntryBuilderInfo' is not initialized.Try to initialize the field in the declaration or in every constructor. final BuilderInfo _mapEntryBuilderInfo; ^^^^^^^^^^^^^^^^^^^^
In order to route, prioritize, and act on this as soon as possible please include:
Dart VM version: 2.5.0-dev.2.1 (Unknown timestamp) on "linux_x64"build_runner 0.7.12)pubspec_lock .txt
pubspec _yaml.txt
Yes, we are working on fixing this now. The root cause is https://github.com/dart-lang/protobuf/issues/284.
The workaround is to pin protobuf to <0.13.16:
dependency_overrides:
protobuf: <0.13.16
We are going to mitigate for now by releasing a new bazel_worker package that works with the latest protobuf, and then this proto version will need to be rolled back as the longer term fix but that likely won't happen until tomorrow.
We have now published bazel_worker version 0.1.22 which allows proto 0.14.x and should also resolve the issue if you pub upgrade (assuming you don't have other packages blocking the latest proto).
I added the protobuf override and build worked - THANKS!
Thanks @jakemac53 for the quick response!
Nothing like a major breakage to get the blood pumping in the morning!
still happening with protobuf: ^1.0.1 on ubuntu. any updates?
name: dart_pad
author: Dart Team <[email protected]>
description: The UI client for a web based interactive Dart service.
homepage: https://github.com/dart-lang/dart-pad
environment:
sdk: ">=2.2.0 <3.0.0"
dependencies:
codemirror: ^0.5.0
# TODO(jcollins-g): return to haikunator pub package after it is
# published with https://github.com/Atrox/haikunatordart/pull/1
#haikunator: ^0.1.0
haikunator:
path: third_party/pkg/haikunatordart/
http: ">=0.11.1 <0.13.0"
logging: ">=0.9.0 <0.12.0"
markdown: ^2.0.0
meta: ^1.1.7
octicons_css: ^0.0.1
primer_css: ^0.0.1
protobuf: ^1.0.1
route_hierarchical:
path: third_party/pkg/route.dart/
split: ^0.0.6
html_unescape: ^1.0.0
sass_builder: ^2.1.0
mdc_web: ^0.5.0-pre
yaml: ^2.2.0
dev_dependencies:
build_runner: any
build_test: any
build_web_compilers: any
collection: ^1.14.10
git: ^1.0.0
grinder: ^0.8.0
pedantic: ^1.9.0
shelf: ^0.7.5
shelf_static: ^0.2.8
test: ^1.3.4
tuneup: any
@softmarshmallow - are you getting the latest bazel_worker?
You might see if pub outdated helps at all.
Most helpful comment
Nothing like a major breakage to get the blood pumping in the morning!