Skip to content

Running "flutter pub get" in User app... 403 #3415

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

Open
yendiscart opened this issue May 5, 2022 · 7 comments
Open

Running "flutter pub get" in User app... 403 #3415

yendiscart opened this issue May 5, 2022 · 7 comments

Comments

@yendiscart
Copy link

`Authentication error (403)
package:pub/src/authentication/client.dart 95:5 _AuthenticatedClient._throwAuthException
package:pub/src/authentication/client.dart 60:9 _AuthenticatedClient.send
===== asynchronous gap ===========================
package:pub/src/authentication/client.dart 133:12 withAuthenticatedClient
===== asynchronous gap ===========================
package:pub/src/source/hosted.dart 803:22 BoundHostedSource._download.
===== asynchronous gap ===========================
package:pub/src/io.dart 844:12 withTempDir
===== asynchronous gap ===========================
package:pub/src/source/hosted.dart 800:5 BoundHostedSource._download
===== asynchronous gap ===========================
package:pub/src/source/hosted.dart 639:7 BoundHostedSource.downloadToSystemCache
===== asynchronous gap ===========================
package:pub/src/entrypoint.dart 484:35 Entrypoint._get.
===== asynchronous gap ===========================
package:pub/src/entrypoint.dart 479:12 Entrypoint._get
===== asynchronous gap ===========================
package:pub/src/entrypoint.dart 297:7 Entrypoint.acquireDependencies
===== asynchronous gap ===========================
package:pub/src/command/get.dart 52:5 GetCommand.runProtected
This is an unexpected error. Please run

dart pub --trace get --no-precompile

and include the logs in an issue on https://github.com/dart-lang/pub/issues/new
pub get failed (1; and include the logs in an issue on https://github.com/dart-lang/pub/issues/new)
Process finished with exit code 1`

@sigurdm
Copy link
Contributor

sigurdm commented May 5, 2022

Are you using a mirror for PUB_HOSTED_URL?

@sigurdm sigurdm added the needs-info Additional information needed from the issue author label May 5, 2022
@yendiscart
Copy link
Author

Are you using a mirror for PUB_HOSTED_URL?

I have no idea. I have solved the issue by running flutter clean and flutter pub get. Could be something to do with my VPN since I am in China.

@sigurdm
Copy link
Contributor

sigurdm commented May 5, 2022

I have no idea. I have solved the issue by running flutter clean and flutter pub get. Could be something to do with my VPN since I am in China.

Yes, that could easily be it.

When we fix #3325 we will not give a crash stack trace on 403 (though not sure we can give much more info).

@sigurdm sigurdm changed the title Running "flutter pub get" in User app... Running "flutter pub get" in User app... 403 May 6, 2022
@BassamNakkez
Copy link

Use The VPN

@Shahriyar13
Copy link

Shahriyar13 commented Jul 23, 2022

I'm Using US-VPN, and it's work on native android projects, but I got this issue here.

C:\flutter\bin\flutter.bat --no-color pub get
Running "flutter pub get" in [PROJECT_NAME]...     
Authentication error (403)
package:pub/src/authentication/client.dart 95:5    _AuthenticatedClient._throwAuthException
package:pub/src/authentication/client.dart 60:9    _AuthenticatedClient.send
===== asynchronous gap ===========================
package:pub/src/authentication/client.dart 133:12  withAuthenticatedClient
===== asynchronous gap ===========================
package:pub/src/source/hosted.dart 803:22          BoundHostedSource._download.<fn>
===== asynchronous gap ===========================
package:pub/src/io.dart 844:12                     withTempDir
===== asynchronous gap ===========================
package:pub/src/source/hosted.dart 800:5           BoundHostedSource._download
===== asynchronous gap ===========================
package:pub/src/source/hosted.dart 639:7           BoundHostedSource.downloadToSystemCache
===== asynchronous gap ===========================
package:pub/src/entrypoint.dart 484:35             Entrypoint._get.<fn>
===== asynchronous gap ===========================
package:pub/src/entrypoint.dart 479:12             Entrypoint._get
===== asynchronous gap ===========================
package:pub/src/entrypoint.dart 297:7              Entrypoint.acquireDependencies
===== asynchronous gap ===========================
package:pub/src/command/get.dart 52:5              GetCommand.runProtected
This is an unexpected error. Please run

    dart pub --trace get --no-precompile

and include the logs in an issue on https://github.com/dart-lang/pub/issues/new
pub get failed (1; and include the logs in an issue on https://github.com/dart-lang/pub/issues/new)
Process finished with exit code 1

Flutter doctor:

C:\flutter\bin\flutter.bat doctor --verbose
[√] Flutter (Channel stable, 2.10.4, on Microsoft Windows [Version 10.0.19044.1466], locale en-US)
    • Flutter version 2.10.4 at C:\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision c860cba910 (4 months ago), 2022-03-25 00:23:12 -0500
    • Engine revision 57d3bac3dd
    • Dart version 2.16.2
    • DevTools version 2.9.2

[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at C:\Users\aghajani.shahriar\AppData\Local\Android\sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[X] Visual Studio - develop for Windows
    X Visual Studio not installed; this is necessary for Windows development.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components

[√] Android Studio (version 2021.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.19044.1466]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 103.0.5060.134
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 103.0.1264.62

[√] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.
Process finished with exit code 0

@reemabaltahji
Copy link

Are you using a mirror for PUB_HOSTED_URL?

I have no idea. I have solved the issue by running flutter clean and flutter pub get. Could be something to do with my VPN since I am in China.

Did you find a solution to eat it, I also suffer from it

@github-actions github-actions bot removed the needs-info Additional information needed from the issue author label May 24, 2023
@zhbh
Copy link

zhbh commented Aug 30, 2023

Restart my wifi router or switch to other provider networks, which works for me.

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

6 participants