Skip to content

pub get / pub serve threw "The null object does not have a getter 'pubspec'." #19

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

Closed
DartBot opened this issue Jun 4, 2015 · 6 comments
Labels
closed-duplicate Closed in favor of an existing report type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@DartBot
Copy link

DartBot commented Jun 4, 2015

Originally opened as dart-lang/sdk#23417

This issue was originally filed by [email protected]


What steps will reproduce the problem?

  1. create a project
  2. add bwu_fontawesome_iconset_svg: any in pubspec.yaml
    3.

What is the expected output? What do you see instead?
pub can successfully get bwu_fontawesome_iconset_svg, and pub serve runs successfully

What version of the product are you using?
I tried both 1.10.0 and 1.10.0-dev.1.10

On what operating system?
Mac OS X 10.10.3

What browser (if applicable)?

Please provide any additional information below.
Without bwu_fontawesome_iconset_svg, my project works fine.

Here is the details when add bwu_fontawesome_iconset_svg.

Loading source assets...
The null object does not have a getter 'pubspec'.

NoSuchMethodError: method not found: 'pubspec'
Receiver: null
Arguments: []
dart:core Object.noSuchMethod
/Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/dependency_computer.dart 251 _PackageDependencyComputer._PackageDependencyComputer
/Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/dependency_computer.dart 199 DependencyComputer._loadPackageComputer
/Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/dependency_computer.dart 107 DependencyComputer._transformersNeededByTransformer
/Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/dependency_computer.dart 258 _PackageDependencyComputer._PackageDependencyComputer
/Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/dependency_computer.dart 199 DependencyComputer._loadPackageComputer
dart:core List.forEach
/Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/dependency_computer.dart 53 DependencyComputer.DependencyComputer
/Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/load_all_transformers.dart 33 loadAllTransformers.<async>
dart:isolate _RawReceivePortImpl._handleMessage
===== asynchronous gap ===========================
dart:async _Completer.completeError
/Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/load_all_transformers.dart 127 loadAllTransformers.<async>
dart:isolate _RawReceivePortImpl._handleMessage
===== asynchronous gap ===========================
dart:async Future.Future.microtask
/Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/load_all_transformers.dart loadAllTransformers
/Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart 512 AssetEnvironment._load.<fn>.<async>.<fn>.<async>.<fn>.<async>
dart:isolate _RawReceivePortImpl._handleMessage
===== asynchronous gap ===========================
/Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart AssetEnvironment._load.<fn>.<async>.<fn>.<async>.<fn>
/Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/log.dart 378 progress
/Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart 511 AssetEnvironment._load.<fn>.<async>.<fn>.<async>
dart:isolate _RawReceivePortImpl._handleMessage
===== asynchronous gap ===========================
dart:async Future.Future.sync
/Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart 671 AssetEnvironment._withStreamErrors
/Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart 510 AssetEnvironment._load.<fn>.<async>
dart:async _SyncCompleter.complete
/Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart 672 AssetEnvironment._withStreamErrors.<fn>
dart:isolate _RawReceivePortImpl._handleMessage
===== asynchronous gap ===========================
dart:async _Future.then
/Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart 488 AssetEnvironment._load.<fn>.<async>
dart:isolate _RawReceivePortImpl._handleMessage
===== asynchronous gap ===========================
dart:async _Future.then
/Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart 477 AssetEnvironment._load.<fn>.<async>
dart:isolate _RawReceivePortImpl._handleMessage
===== asynchronous gap ===========================
dart:async Future.Future.microtask
/Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart AssetEnvironment._load.<fn>
/Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/log.dart 378 progress
/Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart 459 AssetEnvironment._load
/Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart 82 AssetEnvironment.create.<fn>.<async>
dart:isolate _RawReceivePortImpl._handleMessage
===== asynchronous gap ===========================
dart:async _Future.then
/Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart 74 AssetEnvironment.create.<fn>.<async>
dart:isolate _RawReceivePortImpl._handleMessage
===== asynchronous gap ===========================
dart:async Future.Future.microtask
/Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart AssetEnvironment.create.<fn>
/Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/log.dart 378 progress
/Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart 73 AssetEnvironment.create
/Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/command/serve.dart 91 ServeCommand.onRunTransformerCommand.<async>
dart:isolate _RawReceivePortImpl._handleMessage
===== asynchronous gap ===========================
dart:async Future.Future.microtask
/Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/command/serve.dart ServeCommand.onRunTransformerCommand
/Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/command/barback.dart 58 BarbackCommand.run
package:args/command_runner.dart 179 CommandRunner.runCommand.<fn>
dart:async Future.Future.sync
package:args/command_runner.dart 132 CommandRunner.runCommand
/Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/command_runner.dart 122 PubCommandRunner.runCommand.<async>.<fn>
dart:async Future.Future.sync
/Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/utils.dart 107 captureErrors.<fn>
package:stack_trace/src/chain.dart 78 Chain.capture
/Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/utils.dart 121 captureErrors
/Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/command_runner.dart 122 PubCommandRunner.runCommand.<async>
dart:isolate _RawReceivePortImpl._handleMessage

---- Log transcript ----
FINE: Pub 1.10.0
FINE: Loading asset environment...
FINE: Loading package graph...
FINE: Loading package graph finished (0.4s).
FINE: Initializing barback...
FINE: Serving packages on localhost:0.
FINE: Providing sources for toolkit|lib.
FINE: Providing sources for adl_lib|lib.
FINE: Providing sources for bwu_fontawesome_iconset_svg|lib.
FINE: Providing sources for adl_client|lib.
FINE: Loading source assets finished (0.4s).
FINE: Provided sources.
FINE: Loading transformers...
FINE: Loading transformers finished (0.3s).
FINE: Initializing barback finished (0.8s).
FINE: Loading asset environment finished (1.3s).
ERR : The null object does not have a getter 'pubspec'.
    |
    | NoSuchMethodError: method not found: 'pubspec'
    | Receiver: null
    | Arguments: []
FINE: Exception type: NoSuchMethodError
ERR : dart:core Object.noSuchMethod
    | /Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/dependency_computer.dart 251 _PackageDependencyComputer._PackageDependencyComputer
    | /Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/dependency_computer.dart 199 DependencyComputer._loadPackageComputer
    | /Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/dependency_computer.dart 107 DependencyComputer._transformersNeededByTransformer
    | /Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/dependency_computer.dart 258 _PackageDependencyComputer._PackageDependencyComputer
    | /Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/dependency_computer.dart 199 DependencyComputer._loadPackageComputer
    | dart:core List.forEach
    | /Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/dependency_computer.dart 53 DependencyComputer.DependencyComputer
    | /Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/load_all_transformers.dart 33 loadAllTransformers.<async>
    | dart:isolate _RawReceivePortImpl._handleMessage
    | ===== asynchronous gap ===========================
    | dart:async _Completer.completeError
    | /Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/load_all_transformers.dart 127 loadAllTransformers.<async>
    | dart:isolate _RawReceivePortImpl._handleMessage
    | ===== asynchronous gap ===========================
    | dart:async Future.Future.microtask
    | /Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/load_all_transformers.dart loadAllTransformers
    | /Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart 512 AssetEnvironment._load.<fn>.<async>.<fn>.<async>.<fn>.<async>
    | dart:isolate _RawReceivePortImpl._handleMessage
    | ===== asynchronous gap ===========================
    | /Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart AssetEnvironment._load.<fn>.<async>.<fn>.<async>.<fn>
    | /Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/log.dart 378 progress
    | /Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart 511 AssetEnvironment._load.<fn>.<async>.<fn>.<async>
    | dart:isolate _RawReceivePortImpl._handleMessage
    | ===== asynchronous gap ===========================
    | dart:async Future.Future.sync
    | /Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart 671 AssetEnvironment._withStreamErrors
    | /Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart 510 AssetEnvironment._load.<fn>.<async>
    | dart:async _SyncCompleter.complete
    | /Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart 672 AssetEnvironment._withStreamErrors.<fn>
    | dart:isolate _RawReceivePortImpl._handleMessage
    | ===== asynchronous gap ===========================
    | dart:async _Future.then
    | /Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart 488 AssetEnvironment._load.<fn>.<async>
    | dart:isolate _RawReceivePortImpl._handleMessage
    | ===== asynchronous gap ===========================
    | dart:async _Future.then
    | /Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart 477 AssetEnvironment._load.<fn>.<async>
    | dart:isolate _RawReceivePortImpl._handleMessage
    | ===== asynchronous gap ===========================
    | dart:async Future.Future.microtask
    | /Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart AssetEnvironment._load.<fn>
    | /Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/log.dart 378 progress
    | /Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart 459 AssetEnvironment._load
    | /Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart 82 AssetEnvironment.create.<fn>.<async>
    | dart:isolate _RawReceivePortImpl._handleMessage
    | ===== asynchronous gap ===========================
    | dart:async _Future.then
    | /Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart 74 AssetEnvironment.create.<fn>.<async>
    | dart:isolate _RawReceivePortImpl._handleMessage
    | ===== asynchronous gap ===========================
    | dart:async Future.Future.microtask
    | /Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart AssetEnvironment.create.<fn>
    | /Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/log.dart 378 progress
    | /Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart 73 AssetEnvironment.create
    | /Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/command/serve.dart 91 ServeCommand.onRunTransformerCommand.<async>
    | dart:isolate _RawReceivePortImpl._handleMessage
    | ===== asynchronous gap ===========================
    | dart:async Future.Future.microtask
    | /Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/command/serve.dart ServeCommand.onRunTransformerCommand
    | /Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/command/barback.dart 58 BarbackCommand.run
    | package:args/command_runner.dart 179 CommandRunner.runCommand.<fn>
    | dart:async Future.Future.sync
    | package:args/command_runner.dart 132 CommandRunner.runCommand
    | /Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/command_runner.dart 122 PubCommandRunner.runCommand.<async>.<fn>
    | dart:async Future.Future.sync
    | /Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/utils.dart 107 captureErrors.<fn>
    | package:stack_trace/src/chain.dart 78 Chain.capture
    | /Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/utils.dart 121 captureErrors
    | /Volumes/data/b/build/slave/dart-editor-mac-stable/build/dart/sdk/lib/_internal/pub/lib/src/command_runner.dart 122 PubCommandRunner.runCommand.<async>
    | dart:isolate _RawReceivePortImpl._handleMessage

---- End log transcript ----

@DartBot DartBot added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) closed-duplicate Closed in favor of an existing report labels Jun 4, 2015
@DartBot
Copy link
Author

DartBot commented Jun 4, 2015

This comment was originally written by [email protected]


More info.

It works if I change pubspec.yaml to get bwu_fontawesome_iconset_svg from git.

@DartBot
Copy link
Author

DartBot commented Jun 4, 2015

<img src="https://avatars.githubusercontent.com/u/405837?v=3" align="left" width="48" height="48"hspace="10"> Comment by zoechi


The similar issue you linked to on SO mentioned that deleting the ~/.pub-cache directory solved it. Did you try that. Some issues can't be fixed by pub cache repair.

@DartBot
Copy link
Author

DartBot commented Jun 4, 2015

This comment was originally written by [email protected]


No, deleting ~/.pub-cache does not help.

It is not work from git either. It only works if I point it to my fork branch

https://github.com/kzhdev/bwu_fontawesome_iconset_svg/tree/update_core_element_version

hopefully that help.

@DartBot
Copy link
Author

DartBot commented Jun 4, 2015

This comment was originally written by [email protected]


This works:
bwu_fontawesome_iconset_svg:
    git:
      url: [email protected]:kzhdev/bwu_fontawesome_iconset_svg.git
      ref: update_core_element_version

This does not work:
bwu_fontawesome_iconset_svg:
    git: [email protected]:kzhdev/bwu_fontawesome_iconset_svg.git

but it works if I point it to my local folder:
bwu_fontawesome_iconset_svg:
    path: ../bwu_fontawesome_iconset_svg

@DartBot
Copy link
Author

DartBot commented Jun 4, 2015

<img src="https://avatars.githubusercontent.com/u/8631949?v=3" align="left" width="48" height="48"hspace="10"> Comment by floitschG


Added Area-Pub, Triaged labels.

@DartBot
Copy link
Author

DartBot commented Jun 4, 2015

<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3


I can't reproduce this on bleeding_edge. Instead, I see:

Resolving dependencies... (3.7s)

  • analyzer 0.25.0+1
  • args 0.13.0
  • barback 0.15.2+4
  • browser 0.10.0+2
  • bwu_fontawesome_iconset_svg 0.1.3
  • cli_util 0.0.1+1
  • code_transformers 0.2.9
  • collection 1.1.1
  • core_elements 0.7.1+2
  • csslib 0.12.0
  • dart_style 0.1.8
  • glob 1.0.4
  • html 0.12.1+1
  • initialize 0.6.1
  • logging 0.9.3 (0.11.1 available)
  • matcher 0.12.0
  • observe 0.13.1+1
  • path 1.3.5
  • polymer 0.16.3+2
  • polymer_expressions 0.13.1
  • polymer_interop 0.1.1
  • pool 1.0.1
  • quiver 0.21.3+1
  • smoke 0.3.3+1
  • source_maps 0.10.1
  • source_span 1.1.2
  • stack_trace 1.3.2
  • string_scanner 0.1.3+1
  • template_binding 0.14.0+2
  • utf 0.9.0+2
  • watcher 0.9.5
  • web_components 0.11.4
  • when 0.2.0
  • which 0.1.3
  • yaml 2.1.2
    Changed 35 dependencies!
    Precompiling dependencies...
    Loading source assets...
    Error on line 1, column 1 of https://pub.dartlang.org/api/packages/bwu_fontawesome_iconset_svg: Error loading transformer "test/pub_serve": package "test" is not a dependency.

I suspect this is the same as issue #1183, and that my fix (r45414) hasn't yet made it into the version of pub you're using.


Added Duplicate label.
Marked as being merged into #1183.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-duplicate Closed in favor of an existing report type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

1 participant