Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad state: No element when running pub run build_runner build #3157

Closed
tmatrai opened this issue Jul 29, 2021 · 2 comments
Closed

Bad state: No element when running pub run build_runner build #3157

tmatrai opened this issue Jul 29, 2021 · 2 comments

Comments

@tmatrai
Copy link

tmatrai commented Jul 29, 2021

[](flutter pub run build_runner build --delete-conflicting-outputs
[INFO] Generating build script...
[INFO] Generating build script completed, took 454ms

[INFO] Precompiling build script......
[INFO] Precompiling build script... completed, took 5.7s

You have hit a bug in build_runner
Please file an issue with reproduction steps at https://github.com/dart-lang/build/issues

Bad state: No element
dart:core Iterable.first
package:swagger_dart_code_generator/swagger_dart_code_generator.dart 36:20 _generateExtensions
package:swagger_dart_code_generator/swagger_dart_code_generator.dart 50:32 SwaggerDartCodeGenerator.buildExtensions
package:build_runner_core/src/package_graph/apply_builders.dart 399:33 _validateBuilder
package:build_runner_core/src/package_graph/apply_builders.dart 181:9 new BuilderApplication.forBuilder..
package:build_runner_core/src/package_graph/apply_builders.dart 342:27 _createBuildPhasesForBuilderInCycle..
dart:core Iterable.toList
package:build_runner_core/src/package_graph/apply_builders.dart 289:8 createBuildPhases
package:build_runner_core/src/generate/build_impl.dart 110:29 BuildImpl.create
package:build_runner_core/src/generate/build_runner.dart 34:42 BuildRunner.create
package:build_runner/src/generate/build.dart 109:35 build
package:build_runner/src/entrypoint/build.dart 35:18 BuildCommand._run
package:args/command_runner.dart 209:13 CommandRunner.runCommand
package:build_runner/src/entrypoint/run.dart 26:18 run
.dart_tool/build/entrypoint/build.dart 31:16 main

pub finished with exit code 1)

@tmatrai
Copy link
Author

tmatrai commented Jul 29, 2021

Detailed info by running -v option

flutter pub run build_runner build --delete-conflicting-outputs -v
[ +79 ms] executing: sysctl hw.optional.arm64
[ +14 ms] Exit code 1 from: sysctl hw.optional.arm64
[ ] sysctl: unknown oid 'hw.optional.arm64'
[ +5 ms] executing: [/Users/mt/developer/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +14 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[ ] f4abaa0735eba4dfd8f33f73363911d63931fe03
[ ] executing: [/Users/mt/developer/flutter/] git tag --points-at f4abaa0735eba4dfd8f33f73363911d63931fe03
[ +24 ms] Exit code 0 from: git tag --points-at f4abaa0735eba4dfd8f33f73363911d63931fe03
[ ] 2.2.3
[ +6 ms] executing: [/Users/mt/developer/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[ +14 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[ ] origin/stable
[ ] executing: [/Users/mt/developer/flutter/] git ls-remote --get-url origin
[ +13 ms] Exit code 0 from: git ls-remote --get-url origin
[ ] https://github.com/flutter/flutter.git
[ +105 ms] executing: [/Users/mt/developer/flutter/] git rev-parse --abbrev-ref HEAD
[ +17 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ ] stable
[ +5 ms] executing: sw_vers -productName
[ +12 ms] Exit code 0 from: sw_vers -productName
[ ] macOS
[ ] executing: sw_vers -productVersion
[ +13 ms] Exit code 0 from: sw_vers -productVersion
[ ] 11.5.1
[ ] executing: sw_vers -buildVersion
[ +13 ms] Exit code 0 from: sw_vers -buildVersion
[ ] 20G80
[ +63 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ +2 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +38 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[ ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[ ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[ ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'PubDependencies' is not required, skipping update.
[ +31 ms] Using /Users/mt/developer/flutter/.pub-cache for the pub cache.
[ ] executing: /Users/mt/developer/flutter/bin/cache/dart-sdk/bin/pub run build_runner build --delete-conflicting-outputs -v
[INFO] Entrypoint:Generating build script...
[INFO] Entrypoint:Generating build script completed, took 403ms

[WARNING] Bootstrap:
Invalidated precompiled build script due to missing asset graph.
[INFO] Bootstrap:Precompiling build script......
[INFO] Bootstrap:Precompiling build script... completed, took 722ms

You have hit a bug in build_runner
Please file an issue with reproduction steps at https://github.com/dart-lang/build/issues

Bad state: No element
dart:core Iterable.first
package:swagger_dart_code_generator/swagger_dart_code_generator.dart 36:20 _generateExtensions
package:swagger_dart_code_generator/swagger_dart_code_generator.dart 50:32 SwaggerDartCodeGenerator.buildExtensions
package:build_runner_core/src/package_graph/apply_builders.dart 399:33 _validateBuilder
package:build_runner_core/src/package_graph/apply_builders.dart 181:9 new BuilderApplication.forBuilder..
package:build_runner_core/src/package_graph/apply_builders.dart 342:27 _createBuildPhasesForBuilderInCycle..
dart:core Iterable.toList
package:build_runner_core/src/package_graph/apply_builders.dart 289:8 createBuildPhases
package:build_runner_core/src/generate/build_impl.dart 110:29 BuildImpl.create
package:build_runner_core/src/generate/build_runner.dart 34:42 BuildRunner.create
package:build_runner/src/generate/build.dart 109:35 build
package:build_runner/src/entrypoint/build.dart 35:18 BuildCommand._run
package:args/command_runner.dart 209:13 CommandRunner.runCommand
package:build_runner/src/entrypoint/run.dart 26:18 run
.dart_tool/build/entrypoint/build.dart 31:16 main

[+2313 ms] "flutter run" took 2 411ms.
[ +6 ms] pub finished with exit code 1
[ +1 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 _DefaultPub.interactively (package:flutter_tools/src/dart/pub.dart:368:7)

#2 PackagesForwardCommand.runCommand (package:flutter_tools/src/commands/packages.dart:241:5)

#3 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:1043:27)

#4 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#5 CommandRunner.runCommand (package:args/command_runner.dart:196:13)

#6 FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:284:9)

#7 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#8 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:232:5)

#9 run.. (package:flutter_tools/runner.dart:62:9)

#10 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#11 main (package:flutter_tools/executable.dart:91:3)

[ +149 ms] ensureAnalyticsSent: 147ms
[ +1 ms] Running shutdown hooks
[ ] Shutdown hooks complete
[ ] exiting with code 1

@jakemac53
Copy link
Contributor

This looks like an issue with the swagger_dart_code_generator package, please file an issue at https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/issues/new.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants