Skip to content

unable to publish #230

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
devoncarew opened this issue Jul 19, 2017 · 14 comments
Closed

unable to publish #230

devoncarew opened this issue Jul 19, 2017 · 14 comments

Comments

@devoncarew
Copy link
Member

From @devoncarew on July 13, 2017 20:9

I was unable to publish a package w/ the most recent SDK:

Looks great! Are you ready to upload your package (y/n)? y
Uploading... 
Failed to upload the package.

This was for Pub 1.25.0-dev.6.0. @pq was able to publish the same package, using a 1.25.0-dev.4.0 version of the sdk. The repo in question is https://github.com/dart-lang/cli_util.

Copied from original issue: dart-lang/pub#1666

@devoncarew
Copy link
Member Author

From @nex3 on July 13, 2017 20:13

I'm guessing this is a server-side issue, but just in case what do you see if you run with --verbose?

@devoncarew
Copy link
Member Author

IO  : HTTP response 400 Bad Request for POST https://storage.googleapis.com
    | took 0:00:00.067320
    | date: Thu, 13 Jul 2017 20:21:21 GMT
    | x-guploader-upload-result: invalid_content_type
    | x-google-backends: /bns/pf/borg/pf/bns/blobstore2/bitpusher/196.scotty,acseae16:443
    | x-google-gfe-response-code-details-trace: response_code_set_by_backend
    | x-guploader-uploadid: AEnB2UpfJpQq0DtIRgPObTBYuTFG0QteOanl--GUKVCON0S2aBlsBt5afFMiJ6s3AQGFTtFT7rLBH7Yc9ZCz09iWIeEUsTWzRPAuEnd5W8qlOd-XEHQBryc
    | x-google-shellfish-status: CA0gBEBJ
    | content-type: text/html; charset=UTF-8
    | x-google-service: bitpusher-cloud-storage
    | x-guploader-request-result: invalid_content_type
    | server: UploadServer
    | x-google-gfe-request-trace: acseae16:443,/bns/pf/borg/pf/bns/blobstore2/bitpusher/196.scotty,acseae16:443
    | alt-svc: quic=":443"; ma=2592000; v="39,38,37,36,35"
    | x-google-gfe-service-trace: bitpusher-cloud-storage
    | x-google-gfe-backend-request-info: eid=QdZnWYe1FcGniQOFnavQBA
    | x-google-netmon-label: /bns/pf/borg/pf/bns/blobstore2/bitpusher/196:caf3
    | content-length: 40
    | x-guploader-customer: cloud-storage
    | x-google-dos-service-trace: main:apps-upload-cloud-storage-unified
FINE: Uploading finished (0.806s).
FINE: Saving OAuth2 credentials.
IO  : Writing 365 characters to text file /Users/devoncarew/.pub-cache/credentials.json.
ERR : Failed to upload the package.
FINE: Exception type: ApplicationException
FINE: package:pub/src/utils.dart 815                                                fail
    | package:pub/src/command/lish.dart 106                                         LishCommand._publish
    | package:pub/src/command/lish.dart 145                                         LishCommand.run
    | package:args/command_runner.dart 194                                          CommandRunner.runCommand
    | package:pub/src/command_runner.dart 168                                       PubCommandRunner.runCommand.<fn>

@devoncarew
Copy link
Member Author

From @pq on July 13, 2017 20:46

FWIW, Pub 1.25.0-edge.e41c56580a402dd450ee291233e2ca9cc295d135 failed for me too before 1.25.0-dev.4.0 worked.

@devoncarew
Copy link
Member Author

From @nex3 on July 13, 2017 20:54

dart-lang/sdk@e41c565 is much older than 1.25.0-dev.4.0. Could this have been a bug that has since been fixed?

@devoncarew
Copy link
Member Author

From @pq on July 13, 2017 21:7

Maybe. But Pub 1.25.0-dev.6.0 wasn't working for Devon either.

@devoncarew
Copy link
Member Author

From @nex3 on July 13, 2017 21:37

Between 1.25.0-dev.4.0 and 1.25.0-dev.6.0, Pub was upgraded from 0713718a83054fcc1c0a4b163e036f7c39ea4790 to 0f122625f8e607842afe156b9b23a9709e4ce39a, but I don't see any changes in that range that would affect publishing at all. Nor does the SDK include any changes to the HTTP infrastructure. All this makes me think that it must have been either a flake or a server-side change in the HTTP API.

@devoncarew
Copy link
Member Author

From @nshahan on July 18, 2017 23:41

I am seeing the same error on the SDK version:
Dart VM version: 1.25.0-dev.7.0 (Mon Jul 17 02:47:13 2017) on "macos_x64"

@devoncarew
Copy link
Member Author

From @nshahan on July 18, 2017 23:46

I just uninstalled the dev version of the SDK and installed the stable version:
Dart VM version: 1.24.2 (Thu Jun 22 08:42:17 2017) on "macos_x64"

That allowed me to publish without any problems.

@devoncarew
Copy link
Member Author

From @kevmoo on July 19, 2017 0:1

Yeah – this feels like a server bug. Would someone use the issue mover to...move it?

@devoncarew
Copy link
Member Author

/cc @isoos, @mkustermann

@isoos
Copy link
Collaborator

isoos commented Jul 19, 2017

I'm not aware of any server code change that would work with 1.24.2 but break with anything newer. The only recent change that was vaguely related to the upload was to extract the example file, but that should not care about whether the pub client is on a bleeding edge or not.

Unfortunately the pub client swallows any useful info from the exception:
https://github.com/dart-lang/pub/blob/master/lib/src/command/lish.dart#L106

@kevmoo: could you please check the prod logs while @mkustermann is OOO?

@kevmoo
Copy link
Member

kevmoo commented Jul 19, 2017

I believe the fix is in the client – due to a recent change in how storage handles uploads – dart-lang/pub#1666 (comment)

@kevmoo
Copy link
Member

kevmoo commented Jul 19, 2017

Turns out this is a Cloud Storage issue – at least we think it is

Reopening here – since storage is an implementation detail of our backend - http://b/63855519

@kevmoo
Copy link
Member

kevmoo commented Jul 20, 2017

Root cause: dart-lang/http#105

@kevmoo kevmoo closed this as completed Jul 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants