Build: [SEVERE] Failed to snapshot build script .dart_tool/build/entrypoint/build.dart.

Created on 12 Sep 2019  路  7Comments  路  Source: dart-lang/build

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 SDK Version Dart VM version: 2.5.0-dev.2.1 (Unknown timestamp) on "linux_x64"
  • What package(s) from this repo you are using, and the version (i.e. build_runner 0.7.12)
    build:
    dependency: transitive
    description:
    name: build
    url: "https://pub.dartlang.org"
    source: hosted
    version: "1.1.6"
    build_config:
    dependency: transitive
    description:
    name: build_config
    url: "https://pub.dartlang.org"
    source: hosted
    version: "0.4.0"
    build_daemon:
    dependency: transitive
    description:
    name: build_daemon
    url: "https://pub.dartlang.org"
    source: hosted
    version: "1.1.0"
    build_modules:
    dependency: transitive
    description:
    name: build_modules
    url: "https://pub.dartlang.org"
    source: hosted
    version: "2.5.0"
    build_resolvers:
    dependency: transitive
    description:
    name: build_resolvers
    url: "https://pub.dartlang.org"
    source: hosted
    version: "1.0.7"
    build_runner:
    dependency: "direct dev"
    description:
    name: build_runner
    url: "https://pub.dartlang.org"
    source: hosted
    version: "1.6.1"
    build_runner_core:
    dependency: transitive
    description:
    name: build_runner_core
    url: "https://pub.dartlang.org"
    source: hosted
    version: "3.1.1"
    build_test:
    dependency: "direct dev"
    description:
    name: build_test
    url: "https://pub.dartlang.org"
    source: hosted
    version: "0.10.8"
    build_web_compilers:
    dependency: "direct dev"
    description:
    name: build_web_compilers
    url: "https://pub.dartlang.org"
    source: hosted
    version: "2.3.0"

pubspec_lock .txt
pubspec _yaml.txt

  • Linux Ubuntu x64 v19
  • Chrome
  • Straight Flutter Web project, trying to get my icons to appear.

Most helpful comment

Nothing like a major breakage to get the blood pumping in the morning!

All 7 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

greglittlefield-wf picture greglittlefield-wf  路  4Comments

natebosch picture natebosch  路  5Comments

Fjnova picture Fjnova  路  6Comments

zgramming picture zgramming  路  6Comments

kentcb picture kentcb  路  7Comments