Pub-dev: pub publish failing

Created on 25 Jul 2019  ·  18Comments  ·  Source: dart-lang/pub-dev

Getting a few error messages:

It looks like pub.dartlang.org is having some trouble.
Pub will wait for a while before trying to connect again.
HTTP error 500: Internal Server Error at https://pub.dartlang.org/api/packages/versions/newUploadFinish?upload_id=a820972b-3983-4eb1-a462-d326a18e5d49&bucket=pub-packages&key=tmp/a820972b-3983-4eb1-a462-d326a18e5d49&etag=cd9c21a55f6695c1087cd9f3b8918686.
This is likely a transient error. Please try again later.

Here's the full verbose log:
publish.log

I've been retrying for almost 24 hours now, is this a known issue or is something misconfigured on my end? I last published about a week ago from the same machine with no problem.

All 18 comments

Huge thanks for reporting, I'll look into this tomorrow..

I just checked logs and it seems others are publishing successfully... but I'll look more into this tomorrow...
Have you published the code to github, if it's open source it might help debugging if drop a link to the source...

Interesting, thanks for looking into it. It's the flare_dart folder of the stable branch in the Flare-Flutter repository:
https://github.com/2d-inc/Flare-Flutter/tree/stable/flare_dart

Hmm, from the log:

IO  : HTTP POST https://storage.googleapis.com
    | authorization: <censored>
    | content-type: multipart/form-data; boundary=dart-http-boundary-o4w9YTowZ0h6JBVu1qEc5suYWPXx985GQG2NnenUvjhGHlsqPWq
    | user-agent: Dart pub 2.5.0-dev.0.0.flutter-b5aeaa6796
IO  : HTTP response 303 See Other for POST https://storage.googleapis.com
    | took 0:00:00.319733
    | alt-svc: quic=":443"; ma=2592000; v="46,43,39"
    | location: https://pub.dartlang.org/api/packages/versions/newUploadFinish?upload_id=a820972b-3983-4eb1-a462-d326a18e5d49&bucket=pub-packages&key=tmp/a820972b-3983-4eb1-a462-d326a18e5d49&etag=cd9c21a55f6695c1087cd9f3b8918686
    | date: Thu, 25 Jul 2019 16:34:31 GMT
    | vary: Origin
    | content-length: 0
    | x-guploader-uploadid: AEnB2Up6PTX8-vgpN4RhGO3Wwf4Hf6HVB4XBZsk5CBENEQjpqZIRrFXwfc30KQP0vM4WP6O4FvWCS-uZpBiNnnWSA-zo2sVbPQ
    | content-type: text/html; charset=UTF-8
    | server: UploadServer

At the server it looked like the pub cli client wasn't uploading the tarball.. I'm wondering if this is what it should be..

I'll compare with a successful publish tomorrow...

You're using flutter from master?

The very first log entry for the upload a820972b-3983-4eb1-a462-d326a18e5d49 says that you had a duplicate entry in your pubspec: the description field is there twice. The retries that followed failed because the first one failed (and we did delete the uploaded archive).

Please check the source (or better: link to it so we can double check it) and try it again.

I linked the source above, here’s the pubspec from it:

name: flare_dart
description: Vector design and runtime animation.
version: 1.4.4
author: "2Dimensions Team <[email protected]>"
homepage: https://github.com/2d-inc/Flare-Flutter
environment:
  sdk: ">=2.1.0 <3.0.0"

I’ll double check which flutter channel I’m on. I suspect it’s dev, updated two days ago, but I will confirm and send you my doctor log when I’m back at my desk.

I am on flutter channel dev. Here are the doctor's notes:

[✓] Flutter (Channel dev, v1.8.2, on Mac OS X 10.14.4 18E226, locale en-US)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 10.2.1)
[✓] iOS tools - develop for iOS devices
[✓] Android Studio (version 3.4)
[✓] Connected device (1 available)

• No issues found!

@luigi-rosso: @jonasfj pointed it out that the log suggests that the pubspec.yaml file is contained in it multiple times. Because of the way we extract content from it, it may result in the duplication of the file content being treated as single content, and that would result in the duplicate description key that I've found in the logs.

What system do you use and what is the version of tar? Do you happen to have symlinks in the package directory? I think it would be worth to do another try of publishing the package, please upload the logs again if it is still failing.

I retried, and the publish just worked!

Really odd, I didn't change a single thing (my machine did reboot, although I don't think any new software was installed). No symlinks or multiple pubspec.yaml files.

Thanks for all your assistance. It'll remain a mystery, for now. I'll message here if it happens again.

flutter pub cache repair
Resetting Git repository for assets_for_android_views 0.1.0...
Downloading _discoveryapis_commons 0.1.9...
It looks like pub.dartlang.org is having some trouble.
Pub will wait for a while before trying to connect again.
Failed to repair _discoveryapis_commons 0.1.9. Error:
SocketException: OS Error: Operation timed out, errno = 60, address = pub.dartlang.org, port = 51149

@onimeshc-iprogrammer: this is an old issue, already closed, and potentially unrelated to your current one. Please create a new issue, and please also include details about your setup (e.g. are you on a corporate network behind proxy?)

No I am not using a corporate network proxy, and this issue has recently showed up. I have already tried all the steps and solutions mentioned on this and other sites.

This is my flutter info:
flutter doctor -v
[✓] Flutter (Channel stable, v1.12.13+hotfix.8, on Mac OS X 10.15.3 19D76, locale en-IN)
• Flutter version 1.12.13+hotfix.8 at /Users/nilesh/Applications/flutter
• Framework revision 0b8abb4724 (10 weeks ago), 2020-02-11 11:44:36 -0800
• Engine revision e1e6ced81d
• Dart version 2.7.0

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /Users/nilesh/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.3
• ANDROID_HOME = /Users/nilesh/Library/Android/sdk
• ANDROID_SDK_ROOT = /Users/nilesh/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
✗ Android license status unknown.
Try re-installing or updating your Android SDK Manager.
See https://developer.android.com/studio/#downloads or visit https://flutter.dev/setup/#android-setup for detailed instructions.

[✓] Xcode - develop for iOS and macOS (Xcode 11.4)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.4, Build version 11E146
• CocoaPods version 1.8.4

[✓] Android Studio (version 3.6)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 44.0.2
• Dart plugin version 192.7761
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[✓] VS Code (version 1.44.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.9.1

[✓] Connected device (1 available)
• SM A710F • 33001a9cac177349 • android-arm • Android 7.0 (API 24)

@onimeshc-iprogrammer: which internet provider are you using (+ country)?

Local broadband internet from India

@onimeshc-iprogrammer: IIRC people reported similar issues (when accessing some subset of Google services) from India last week or the week before, you may want to try a different ISP / proxy to check if the issue is indeed with the internet-provider.

@onimeshc-iprogrammer: IIRC people reported similar issues (when accessing some subset of Google services) from India last week or the week before, you may want to try a different ISP / proxy to check if the issue is indeed with the internet-provider.

Okay, I tried out some commands, out of which curl -v https://pub.dartlang.org --resolve 'pub.dartlang.org:443:172.217.14.211' this worked on terminal. but the URL doesn't work on browser. Is it something with the IPv4 and IPv6 issues again?
I tried with a different ISP though, same issue.

Facing the same issue: Could not resolve URL “https://pub.dartlang.org”.

@HarshPipaliya
The original issue reported:

HTTP error 500: Internal Server Error at https://pub.dartlang.org/api/packages/versions/newUploadFinish?upload_id=a820972b-3983-4eb1-a462-d326a18e5d49&bucket=pub-packages&key=tmp/a820972b-3983-4eb1-a462-d326a18e5d49&etag=cd9c21a55f6695c1087cd9f3b8918686.

Inability to resolve the URL is different from "500: Internal Server Error". Please file a separate issue, and specify if you use proxy, do have issues reach pub.dartlang.org using curl/wget in the terminal?

Was this page helpful?
0 / 5 - 0 ratings