-
Notifications
You must be signed in to change notification settings - Fork 229
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
Cannot publish package using flutter pub publish #3317
Comments
Does this happen consistently? Can you try running |
@sigurdm It happened consistently over 2 weeks over my cellular network. I now moved to another place for holiday, thus having a new IP and it worked. I will be back in a few days and probably re-try to publish a new version and see if the problem is solved and report back with the verbose log. Unfortunately, the verbose log is too long. How can I use stdout to file? It's log is always printed to the console, even if I pipe it. |
@sigurdm I'm back in my place and the issue is back, although I'm still on the go. Here is what I could copy from the console: https://gist.github.com/martin-braun/3c3fc00908f6d6823822a1c87791b437 I then tried to connect to the hotspot from my GF (she has a different cellular network) and suddenly it works, so it has be an IP range that is causing problems? The ISP is Telekom in Germany North Rhine-Westphalia. |
@martin-braun can you run it with: export FLUTTER_ROOT=/path/to/flutter
dart pub publish --verbose And share that as a gist. |
You have no problem downloading packages, right? |
@jonasfj I have no problems downloading packages. I will soon attempt update my package and report back. Thanks. EDIT: I have to hold back for some time, because I wanted to fix an issue on one of my packages, but I cannot reproduce it and have to wait for more information by the OP. I will definitely work on the package this month, so I will definitely report back. |
ping me when you do, no rush. I don't see this issue affecting many people, but that's just a guess. |
@jonasfj I think I had the issue only once again, but no time to deal with it, so I circumvented it with a VPN. Since then I kept publishing new updates a couple of times without VPN on the same network and things worked out without problems. I have no idea at this point and choose to close this now. If this becomes a problem in the future, I will re-open it, it's really not worth to deal with, since I can fix it with a VPN and nobody else seem to have this strange problem. Thank you for everything nontheless. |
One of our team members had always connection problems with Your suggested workaround of using a VPN also helped in this case and it now works for her. Big thanks for the workaround @martin-braun I'm guessing the Google's dart servers are too restrictive on some internal network or firewall settings (maybe TCP/IP number of |
@martin-braun I am facing similar issue with similar situations like you had. Earlier when I was facing this before 6 months I was able to change network and publish the package, as of today nothing is working for me. I will try your VPN workaround if that works! but its so frustrating as there is no real solution. |
@wilson-christian Could you please try to follow the instructions from @jonasfj since you can still reproduce the issue and I cannot?
To get all the output reliably, you should actually run If you can share these details there is hope to find the root cause for it. |
I'm having the same issue, also using Telekom Germany (Baden-Württemberg area) as ISP. Output of `flutter doctor -v`
Edit: Using a VPN as a workaround did allow me to publish the package as well. |
Thanks @IVLIVS-III, I see a pattern here, something with German ISPs maybe. Now that we have a |
For me the issue only appeared when publishing a package with large (> 1 MB) files. I could publish packages without such a large file without problems. |
Thanks for the reproduction and the trace. @jonasfj realized we are not retrying |
Closing in favour of #3938 |
@sigurdm this might produce an endless loop. Back when I had these issues I couldn't fix it by retrying until switching to a different connection. I don't think simple retrying is a good approach, but maybe I miss something here(?) |
We only do a limited (max 7 I think) number of retries. We already retry a number of different conditions (some subset of IOException and timeouts).
The thinking here is that we have a single open connection (cached in our When you retry, you would go through the whole cycle, and find broken connections again. Retrying on That said, you are right, we cannot know for sure if this is going to help in your specific instance. Networks can fail in so many ways. If you can still reproduce this failure on your network and a current Dart SDK, it would be a great help if you could try to clone this repository and run
And see if the problem still occurs. Thanks! |
@sigurdm Thanks for clarifying with these descriptions. I don't have this problem anymore, but when I do, I (and hopefully others) will give it a shot. For now, I assume this solves all our problems regarding this issue. Thanks for your service! :) |
Environment
pub version
orflutter pub version
: Pub 2.16.1Output of `flutter doctor -v`
Problem
When I try to run
flutter pub publish
on my package, it returns:Publishing worked a month ago. I also had the issue on Flutter version 2.8.1 before trying to update.
Expected behavior
Publishing should work
Actual behavior
Output of `flutter pub publish`
The text was updated successfully, but these errors were encountered: