dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.25k stars 1.58k forks source link

pub not working #8090

Closed DartBot closed 9 years ago

DartBot commented 11 years ago

This issue was originally filed by @unicomp21


What steps will reproduce the problem?

  1. I uploaded a package name RadTextures via pub, no errors
  2. repo is available here https://github.com/unicomp21/RadTextures
  3. I cannot see the package on pub.dartlang.org

What is the expected output? What do you see instead? pub.dartlang.org should show the RadTextures package. It is not displayed.

What version of the product are you using? On what operating system? latest, windows, linux

Please provide any additional information below.

munificent commented 11 years ago

Can you try again using:

$ pub --verbose publish

And include the output here? That will help us figure out what's going on. Thanks!


Set owner to @munificent. Added this to the M3 milestone. Added Area-Pub, Triaged labels.

DartBot commented 11 years ago

This comment was originally written by @unicomp21


I give permission from the browser window, but I don't think it's caching the creds locally.

MSG : Publishing "rad_textures" 1.0.0:     | |-- .gitignore     | |-- LICENSE     | |-- README.md     | |-- lib     | | |-- rad_textures.dart     | | '-- src     | | |-- musgrave.dart     | | |-- simplex_noise.dart     | | |-- util.dart     | | '-- vector3.dart     | |-- log.txt     | |-- pubspec.yaml     | '-- web     | |-- RadTextures.css     | |-- RadTextures.dart     | '-- RadTextures.html     | Looks great! Are you ready to upload your package (y/n)? MSG : Pub needs your authorization to upload packages on your behalf.     | In a web browser, go to https://accounts.google.com/o/oauth2/auth?access_type=offline&approval_prompt=force&response_type=code&client_id=818368855108-8grd2eg9tj9f38os6f1urbcvsq399u8n.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%3A37091&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email     | Then click "Allow access".     |     | Waiting for your authorization... MSG : Authorization received, processing...

DartBot commented 11 years ago

This comment was originally written by @unicomp21


BTW, I'm running ubuntu 12.10

munificent commented 11 years ago

Removed this from the M3 milestone. Added this to the M4 milestone.

munificent commented 11 years ago

We can't reproduce this, but I'd like to understand what's going on here. Do you know if there's anything unusual about your networking setup? The way this works is:

  1. Pub starts up its own local webserver.
  2. It queries the authentication server. That returns a URL you open in your browser to authenticate.
  3. When you go to that page, it redirects to the URL of your local server.
  4. Pub gets that HTTP request with the credentials and saves them.

Do you have any ideas why that may fail on your machine?


Added NeedsInfo label.

DartBot commented 11 years ago

This comment was originally written by @tomyeh


I got a similar issue and the verbose log is as follows. It worked fine before I upgraded to 0.4.0.0_r18915.

IO : Begin delete directory C:\usr\cygwin\tmp\tempdir-5c704cc5-7fd1-11e2-8fbf-002643faf5b6. IO : End delete directory C:\usr\cygwin\tmp\tempdir-5c704cc5-7fd1-11e2-8fbf-002643faf5b6. y FINE: Loading OAuth2 credentials. FINE: Saving OAuth2 credentials. FINE: Ensuring directory C:\Users\tomyeh\AppData\Roaming\Pub\Cache exists. IO : Writing 284 characters to text file C:\Users\tomyeh\AppData\Roaming\Pub\Cache\credentials.json. FINE: Got response 400 Bad Request. FINE: Saving OAuth2 credentials. FINE: Ensuring directory C:\Users\tomyeh\AppData\Roaming\Pub\Cache exists. IO : Writing 284 characters to text file C:\Users\tomyeh\AppData\Roaming\Pub\Cache\credentials.json. FINE: Clean up system cache temp directory C:\Users\tomyeh\AppData\Roaming\Pub\Cache_temp.

DartBot commented 11 years ago

This comment was originally written by @tomyeh


It works after I delete credentials.json (and redo authorization). Hope the information helps.

DartBot commented 11 years ago

This comment was originally written by ross.dart.lan...@gmail.com


I'm seeing the same issue on Windows 64 with 0.4.1_r19425 but unfortunately deleting the credentials.json doesn't work for me. It sends me to the auth link, I accept, it says everything is ok (Authorization received, processing...) and that's it. No new credentials.json and no publish :/ I have a pretty shaky internet connection at present so i'll try again later when I've got more bandwidth.

DartBot commented 11 years ago

This comment was originally written by ross.dart.lang...@gmail.com


FWIW I got it working once my internet connection was more reliable (with the delete credentials workaround). thanks!

nex3 commented 11 years ago

This should be fixed by r19734. Let us know if you're still seeing this.


Added Fixed label.

DartBot commented 9 years ago

This issue has been moved to dart-lang/pub#418.