Skip to content
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

Unable to download xamarin dependency from dl.google.com / maven.google.com #687

Open
SlevenRobbert01 opened this issue Jan 16, 2023 · 4 comments
Assignees
Labels
tools Issues with binderator or XBD

Comments

@SlevenRobbert01
Copy link

SlevenRobbert01 commented Jan 16, 2023

Android application type

Classic Xamarin.Android (MonoAndroid12.0, etc.)

Affected platform version

VS22 v17.4.2

Description

XamarinBuildDownloadCore is unable to download firebasecomponents. it seems it ignores the configured proxy settings.
it does not listen to http_proxy & https_proxy

The Nuget packages are added correctly, but when building it tries to download missing components.

_XamarinBuildDownloadCore:
  Downloading https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-components/17.0.1/firebase-components-17.0.1.aar to /Users/{USER}/Library/Caches/XamarinBuildDownload/firebasecomponents-17.0.1.aar
  Download failure reason: Error: ConnectFailure (No route to host)
/Users/{USER}/{PROJ}/packages/Xamarin.Build.Download.0.11.3/build/Xamarin.Build.Download.targets(52,3): error XBD001: Download failed. Please download https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-components/17.0.1/firebase-components-17.0.1.aar to file ...

Steps to Reproduce

  • create xamarin.android project
  • add firebase packages
  • build

Did you find any workaround?

No response

Relevant log output

No response

@dellis1972
Copy link

Transferred this issue to where the XamarinBuildDownload source code it stored. Since this will need to be fixed in the Nuget Package.

@dellis1972 dellis1972 transferred this issue from xamarin/xamarin-android Jan 16, 2023
@jpobst
Copy link
Contributor

jpobst commented Jan 17, 2023

Do you have any experience writing code that can interact with proxies correctly? We currently use WebClient to perform the download:

https://github.com/xamarin/AndroidX/blob/main/util/Xamarin.Build.Download/source/Xamarin.Build.Download/XamarinDownloadArchives.cs#L171

@dellis1972
Copy link

The Internet say this should work to pick up the default proxy

var wp = WebRequest.DefaultWebProxy;
wp.Credentials = CredentialCache.DefaultCredentials; 
client.Proxy = wp;

@SlevenRobbert01
Copy link
Author

I think this is a VS 2022 for mac building issue. The firebase-components are needed in the cache library. When they aren't there it tries to download and move them in this directory. Problem is, it cannot connect to the https://dl.google.com because it ignors our proxyserver. When you download the package manualy in for example chrome (does use proxyserver), and place them in the cache lib, then the build works. This is the workaround we use now, but this is not the appropriate way.

@jpobst jpobst added the tools Issues with binderator or XBD label Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tools Issues with binderator or XBD
Projects
None yet
Development

No branches or pull requests

4 participants