Skip to content

pub failing when using google_oauth2_client package #789

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 5, 2015 · 18 comments
Closed

pub failing when using google_oauth2_client package #789

DartBot opened this issue Jun 5, 2015 · 18 comments
Labels
closed-cannot-reproduce Closed as we were unable to reproduce the reported issue type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@DartBot
Copy link

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/3472245?v=3" align="left" width="96" height="96"hspace="10"> Issue by markhats
Originally opened as dart-lang/sdk#15709


When using the google_oauth2_client package (http://pub.dartlang.org/packages/google_oauth2_client) pub get/upgrade now seems to fail. This worked until recently.

I have attached the output from "pub --verbose get".


Attachment:
pub.zip (951.91 KB)

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

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


Actually, this may be an interaction between the google_oauth2_client and polymer packages. Adding one or the other is fine but adding both causes the failure.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

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


I have the same problem but with the combination of spectre and polymer. This user has the same issue, too: https://github.com/johnmccutchan/spectre/issues/129

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

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


Attachment:
pub_upgrade.log (194.74 KB)

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

This comment was originally written by everton.ma...@gmail.com


I'm hitting this pub get error as well.

How to reproduce:

C:\tmp\devel>git clone https://github.com/johnmccutchan/spectre
C:\tmp\devel>cd spectre

C:\tmp\devel\spectre>c:\dart\dart-sdk\bin\pub get
Resolving dependencies.....................................................................
Incompatible version constraints on 'polymer':

'polymer' depends on version >=0.9.0 <0.10.0
C:\tmp\devel\spectre>

System is:
Windows 7 on 64-bit
Dart Editor version 1.1.0.dev_04_00 (DEV)
Dart SDK version 1.1.0-dev.4.0

pubspec.yaml is:

name: spectre
version: 0.7.0
author: John McCutchan <john@johnmccutchan.com>
description: Graphics Library
homepage: https://github.com/johnmccutchan/spectre
documentation: http://johnmccutchan.github.io/spectre/
environment:
  sdk: '>=1.0.0 <2.0.0'
dependencies:
  asset_pack:
    git: https://github.com/johnmccutchan/asset_pack.git
  logging: '>=0.9.0 <0.10.0'
  polymer: '>=0.9.0 <0.10.0'
  path: '>=0.9.0 <0.10.0'
  vector_math:
    git: https://github.com/johnmccutchan/vector_math.git
dev_dependencies:
  browser: '>=0.9.0 <0.10.0'
  game_loop:
    git: https://github.com/johnmccutchan/game_loop.git
  hop: '>=0.28.1+2'
  unittest: '>=0.9.0 <0.10.0'

Reported here:
https://github.com/johnmccutchan/spectre/issues/129

@DartBot DartBot added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) closed-cannot-reproduce Closed as we were unable to reproduce the reported issue Priority-Medium labels Jun 5, 2015
@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

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


The "incompatible version constraints" error is different. That's like a real version conflict that's being reported incorrectly. The reporting issue has been fixed, but I'm unsure if the fix has made it into a released SDK yet.

The "connection closed" error is trickier. Mark, does this reproduce in an empty project with just polymer and google_oauth2_client in the pubspec?


Added Area-Pub, Triaged labels.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

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


Yes it does seem to.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

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


I'm not sure exactly which constraint is the ultimate cause of the conflict, but I did figure out that if I remove the version constraints on:

  logging: any # '>=0.9.0 <0.10.0'
  polymer: any # '>=0.9.0 <0.10.0'
  path: any # '>=0.9.0 <0.10.0'
dev_dependencies:
  hop: any # '>=0.28.1+2'
  unittest: any # '>=0.9.0 <0.10.0'

Then pub is able to find a good set of dependencies for spectre. My guess is that it's stuck on an older version of hop or maybe unittest, that eventually ends up forcing a version of barback too old to work with your current SDK.

To fix this, I think spectre just needs to upgrade itself to newer versions of its dependencies. Because pub uses barback, your Dart SDK will require certain versions of it. As you upgrade to newer Dart SDKs, that forces you to upgrade your dependencies if they ultimately end up depending on barback (which polymer does).

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

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


I'm going to close this bug out. I think there are a few things going on here:

  1. You're getting a connection closed error. That, I believe, is just a transient networking error, and not a bug in the pub code.
  2. The error message is confusing/wrong. This was a result of two bugs that are fixed on bleeding edge now.
  3. There's some nasty dependency constraint in spectre's graph that's forcing it to do a ton of backtracking. This isn't a bug, it's just pub struggling to find a good solution to a hard problem. Upgrading spectre to use newer versions of its dependencies should help.

So, I could be wrong, but I don't think there's anything here we need to take action on (that we haven't already). If I missed something, though, please do let me know.


Added WontFix label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

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


So does an empty project with just polymer and google_oauth2_client in the pubspec work for you? I'm still getting the same issue with this, and have been consistently for a few days, so I can't see it being a transient networking issue.

Or is this what has been fixed on bleeding edge?

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

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


The same for me with dart-polymer-dart-examples which has a dependency on google_oauth2_client. I suspect their 'path' dependency '<=0.10.0'.
I have posted an issued for google_oauth2_client to publish an updated release.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

This comment was originally written by everton.ma...@gmail.com


I can consistently reproduce the "connection closed" error as well:

C:\tmp\devel\eraseme\empty>c:\dart\dart-sdk\bin\pub get
Resolving dependencies..........................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
.......Connection closed before full header was received.
C:\tmp\devel\eraseme\empty>

How to reproduce:

  1. Create a new app with Dart Editor
  2. Add the dependencies:

pubspec.yaml:

name: empty
description: A sample web application
dependencies:
  browser: any
  google_oauth2_client: '>=0.2.18'
  polymer: any

  1. Run pub get

System:

Dart Editor version 1.1.0.dev_04_00 (DEV)
Dart SDK version 1.1.0-dev.4.0
Windows 7 on 64-bit

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

This comment was originally written by everton.ma...@gmail.com


Reproduced with newer SDK:

C:\tmp\devel\eraseme\empty2>c:\dart\dart-sdk\bin\pub get
Resolving dependencies..........................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
.................................Connection closed before full header was receiv
edUncaught Error: FormatException: Couldn't parse VM stack trace line 'null'.
Stack trace:
null
Stack Trace:
#­0 Trace.Trace.parse (package:stack_trace/src/trace.dart:123)
#­1 Trace.Trace.from.<anonymous closure> (package:stack_trace/src/trace.dart:97)
#­2 LazyTrace._trace (package:stack_trace/src/lazy_trace.dart:23)
#­3 LazyTrace.terse.<anonymous closure> (package:stack_trace/src/lazy_trace.dart:29)
#­4 LazyTrace._trace (package:stack_trace/src/lazy_trace.dart:23)
#­5 LazyTrace.frames (package:stack_trace/src/lazy_trace.dart:27)
#­6 Chain.terse.<anonymous closure> (package:stack_trace/src/chain.dart:163)

#­7 WhereIterator.moveNext (dart:_collection-dev/iterable.dart:416)
#­8 IterableBase.isEmpty (dart:collection/iterable.dart:291)
#­9 Chain.terse (package:stack_trace/src/chain.dart:168)
#­10 PubCommand.run.handleError (file:///e:/b/build/slave/dart-editor-win-dev/build/dart/sdk/lib/_internal/pub/lib/src/command.dart:101)
#­11 _invokeErrorHandler (dart:async/async_error.dart:10)
#­12 _Future._propagateToListeners.<anonymous closure> (dart:async/future_impl.dart:469)
#­13 _rootRun (dart:async/zone.dart:683)
#­14 _RootZone.run (dart:async/zone.dart:832)
#­15 _Future._propagateToListeners (dart:async/future_impl.dart:445)
#­16 _Future._completeError (dart:async/future_impl.dart:315)
#­17 _Future._asyncCompleteError.<anonymous closure> (dart:async/future_impl.dart:367)
#­18 _asyncRunCallback (dart:async/schedule_microtask.dart:18)
#­19 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:119)

Unhandled exception:
FormatException: Couldn't parse VM stack trace line 'null'.
Stack trace:
null
#­0 _rootHandleUncaughtError.<anonymous closure>.<anonymous closure> (dart:async/zone.dart:677)
#­1 _asyncRunCallback (dart:async/schedule_microtask.dart:18)
#­2 _asyncRunCallback (dart:async/schedule_microtask.dart:21)
#­3 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:119)

C:\tmp\devel\eraseme\empty2>

Reproduced with same steps:

  1. Create a new app with Dart Editor
  2. Add the dependencies:

pubspec.yaml:

name: empty
description: A sample web application
dependencies:
  browser: any
  google_oauth2_client: '>=0.2.18'
  polymer: any

  1. Run pub get

System:

Dart Editor version 1.1.0.dev_05_00 (DEV)
Dart SDK version 1.1.0-dev.5.0
Windows 7 on 64-bit

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

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


OK, this looks like it's still a real problem. Re-opening. Sorry for the pain. We'll see what we can figure out.


Added Triaged label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 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 with the current bleeding-edge SDK (1.1.0-edge.31502). "pub get" completes successfully.

It's worth noting that the FormatException is a stack trace parse error caused by issue dart-lang/sdk#15920. The "connection closed" error is real, though, and I'm not sure what would cause it for one user but not others.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

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


Removed Priority-Unassigned label.
Added Priority-Medium label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

This comment was originally written by everton.marq...@gmail.com


I no longer hit this issue with build 31329.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

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


Added CannotReproduce label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

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


Confirmed, also works fine for me now on 31329.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-cannot-reproduce Closed as we were unable to reproduce the reported issue type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

1 participant