jitpack / jitpack.io

Documentation and issues of https://jitpack.io
MIT License
2.54k stars 186 forks source link

Origin Connection Time-out #3973

Closed ligi closed 2 years ago

ligi commented 5 years ago

I am currently having builds fail like this:

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:lint'.
> Could not resolve all artifacts for configuration ':app:withGethForFDroidOnlineReleaseRuntimeClasspath'.
   > Could not resolve androidx.appcompat:appcompat:1.1.0.
     Required by:
         project :app
         project :app > com.github.ligi.tracedroid:supportemail:3.0
         project :app > com.github.ligi:KAXTUI:1.0
         project :app > com.github.ligi:thirdpartylicensedisplay:1.0
         project :app > com.github.madrapps:pikolo:2.0.1
         project :app > org.koin:koin-androidx-viewmodel:2.0.1 > org.koin:koin-androidx-scope:2.0.1
      > Could not resolve androidx.appcompat:appcompat:1.1.0.
         > Could not get resource 'https://jitpack.io/androidx/appcompat/appcompat/1.1.0/appcompat-1.1.0.aar'.
            > Could not HEAD 'https://jitpack.io/androidx/appcompat/appcompat/1.1.0/appcompat-1.1.0.aar'. Received status code 522 from server: Origin Connection Time-out
   > Could not resolve androidx.appcompat:appcompat:1.1.0.
     Required by:
         project :app > com.google.android.material:material:1.0.0
      > Could not resolve androidx.appcompat:appcompat:1.1.0.
         > Could not get resource 'https://jitpack.io/androidx/appcompat/appcompat/1.1.0/appcompat-1.1.0.aar'.
            > Could not HEAD 'https://jitpack.io/androidx/appcompat/appcompat/1.1.0/appcompat-1.1.0.aar'. Received status code 522 from server: Origin Connection Time-out
   > Could not resolve androidx.appcompat:appcompat:1.1.0.
     Required by:
         project :app > androidx.preference:preference:1.1.0
      > Could not resolve androidx.appcompat:appcompat:1.1.0.
         > Could not get resource 'https://jitpack.io/androidx/appcompat/appcompat/1.1.0/appcompat-1.1.0.aar'.
            > Could not HEAD 'https://jitpack.io/androidx/appcompat/appcompat/1.1.0/appcompat-1.1.0.aar'. Received status code 522 from server: Origin Connection Time-out

these artifacts should not come via jitpack - and IMHO jitpack should return a 404 there

mitm001 commented 5 years ago

Same problem for me, different project. Not knowing why the timeout since I can lookup the repo and the files are there.

Netbeans 8.2 patch 2 Java: 1.8.0_192; Java HotSpot(TM) 64-Bit Server VM 25.192-b12 Runtime: Java(TM) SE Runtime Environment 1.8.0_192-b12

jitpack-io commented 5 years ago

Hi @ligi,

Indeed, it should be a 404 and we've made some changes. Is it working now for you? Getting 404 on: curl -I https://jitpack.io/androidx/appcompat/appcompat/1.1.0/appcompat-1.1.0.aar

ligi commented 5 years ago

now I am also getting a 404 and the error is no more. Might be just a fluke - feel free to close. But also feel free to open to track down if this repeats (e.g. under certain server loads) as it seems I was not the only one with the problem.

curl -I https://jitpack.io/androidx/appcompat/appcompat/1.1.0/appcompat-1.1.0.aar
HTTP/2 404 
date: Thu, 12 Sep 2019 07:29:35 GMT
content-type: text/plain;charset=UTF-8
set-cookie: __cfduid=d7d4295a300768a34f226f1dc0e065b9a1568273375; expires=Fri, 11-Sep-20 07:29:35 GMT; path=/; domain=.jitpack.io; HttpOnly
cache-control: max-age=604800
x-jp-cf: 1
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
server: cloudflare
cf-ray: 51502bd2eccad121-TXL
dani-mp commented 5 years ago

We're also having this problem for a different dependency.

yamilmedina commented 5 years ago

I'm having problems since 2 days ago similar to this, with other dependencies:

Are there any solutions for this ?

jawa-the-hutt commented 5 years ago

We are having a similar issue with pulling the maven-metadata.xml file for braintree. We can no longer build our project due to the issue.

 Could not resolve all artifacts for configuration ':app:debugRuntimeClasspath'.
   > Could not resolve com.braintreepayments.api:drop-in:3.+.
     Required by:
         project :app
      > Failed to list versions for com.braintreepayments.api:drop-in.
         > Unable to load Maven meta-data from https://jitpack.io/com/braintreepayments/api/drop-in/maven-metadata.xml.
            > Could not get resource 'https://jitpack.io/com/braintreepayments/api/drop-in/maven-metadata.xml'.
               > Could not GET 'https://jitpack.io/com/braintreepayments/api/drop-in/maven-metadata.xml'. Received status code 522 from server: Origin Connection Time-out
appach22 commented 5 years ago

Same for me:

      > Could not resolve com.github.bumptech.glide:glide:4.9.0.
         > Could not get resource 'https://jitpack.io/com/github/bumptech/glide/glide/4.9.0/glide-4.9.0.pom'.
            > Could not HEAD 'https://jitpack.io/com/github/bumptech/glide/glide/4.9.0/glide-4.9.0.pom'. Received status code 522 from server: Origin Connection Time-out
eenglish49 commented 5 years ago

Same here, for multiple public projects like Glide and Coil. Also our own private repos. Not good.

draperunner commented 5 years ago

Same here. I haven't been able to build my Android app because of this 522 timeout problem. Problematic dependencies for me:

appach22 commented 5 years ago

I've found a workaround: maven { url "https://www.jitpack.io" } (added www)

mitm001 commented 5 years ago

Worked, great catch.

eenglish49 commented 5 years ago

Can confirm, workaround is good. @appach22 , Thank you.

strooooke commented 5 years ago

Confirming; workaround seems to work, original problem has been persisting at least over the weekend (leading to intermittent build failures - not clearly repeatable which dependencies are hit).

Gamebuster19901 commented 5 years ago

@jitpack-io I'm unable to build my project due to this issue.

My build.gradle is https://github.com/Gamebuster19901/ONIs-Arsenal/blob/1.14.4/build.gradle

And the error I'm getting is:

* What went wrong:
A problem occurred configuring root project 'ONIs Arsenal'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not resolve net.minecraftforge.gradle:ForgeGradle:3.+.
     Required by:
         project :
      > Failed to list versions for net.minecraftforge.gradle:ForgeGradle.
         > Unable to load Maven meta-data from https://jitpack.io/net/minecraftforge/gradle/ForgeGradle/maven-metadata.xml.
            > Could not get resource 'https://jitpack.io/net/minecraftforge/gradle/ForgeGradle/maven-metadata.xml'.
               > Could not GET 'https://jitpack.io/net/minecraftforge/gradle/ForgeGradle/maven-metadata.xml'. Received status code 522 from server: Origin Connection Time-out
   > Could not resolve com.github.Gamebuster19901:LicenseChecker:-SNAPSHOT.
     Required by:
         project :
      > Skipped due to earlier error
   > Could not resolve com.github.Gamebuster19901:GunCore:1.14.4-SNAPSHOT.
     Required by:
         project :
      > Skipped due to earlier error

Additonally the workaround presented by appach22 does not work, and results in the following:

To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/4.9/userguide/gradle_daemon.html.
Daemon will be stopped at the end of the build stopping after processing
Download https://www.jitpack.io/com/github/Gamebuster19901/GunCore/1.14.4-SNAPSHOT/maven-metadata.xml
Download https://www.jitpack.io/com/github/Gamebuster19901/LicenseChecker/-SNAPSHOT/maven-metadata.xml

> Configure project :
com.gamebuster19901.license.LicenseChecker
com.gamebuster19901.license.LicenseChecker
com.gamebuster19901.license.create.CreateChecker
com.gamebuster19901.license.LicenseChecker
New Dep: net.minecraftforge:forge:1.14.4-28.0.104_mapped_snapshot_20190812-1.14.3

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'ONIs Arsenal'.
> Could not resolve all files for configuration ':_compileJava_1'.
   > Could not resolve net.minecraft:client:1.14.4.
     Required by:
         project :
      > Could not resolve net.minecraft:client:1.14.4.
         > Could not get resource 'https://jitpack.io/net/minecraft/client/1.14.4/client-1.14.4.pom'.
            > Could not GET 'https://jitpack.io/net/minecraft/client/1.14.4/client-1.14.4.pom'. Received status code 522 from server: Origin Connection Time-out
   > Could not resolve net.minecraftforge:mergetool:1.0.9.
     Required by:
         project :
      > Could not resolve net.minecraftforge:mergetool:1.0.9.
         > Could not get resource 'https://jitpack.io/net/minecraftforge/mergetool/1.0.9/mergetool-1.0.9-api.jar'.
            > Could not HEAD 'https://jitpack.io/net/minecraftforge/mergetool/1.0.9/mergetool-1.0.9-api.jar'. Received status code 522 from server: Origin Connction Time-out
   > Could not resolve cpw.mods:modlauncher:3.2.0.
     Required by:
         project :
      > Could not resolve cpw.mods:modlauncher:3.2.0.
         > Could not get resource 'https://jitpack.io/cpw/mods/modlauncher/3.2.0/modlauncher-3.2.0.pom'.
            > Could not HEAD 'https://jitpack.io/cpw/mods/modlauncher/3.2.0/modlauncher-3.2.0.pom'. Received status code 522 from server: Origin Connection Time-out
   > Could not resolve cpw.mods:grossjava9hacks:1.1.0.
     Required by:
         project :
      > Could not resolve cpw.mods:grossjava9hacks:1.1.0.
         > Could not get resource 'https://jitpack.io/cpw/mods/grossjava9hacks/1.1.0/grossjava9hacks-1.1.0.jar'.
            > Could not HEAD 'https://jitpack.io/cpw/mods/grossjava9hacks/1.1.0/grossjava9hacks-1.1.0.jar'. Received status code 522 from server: Origin Connecion Time-out
   > Could not resolve net.minecraftforge:eventbus:1.0.0.
     Required by:
         project :
      > Could not resolve net.minecraftforge:eventbus:1.0.0.
         > Could not get resource 'https://jitpack.io/net/minecraftforge/eventbus/1.0.0/eventbus-1.0.0-service.jar'.
            > Could not HEAD 'https://jitpack.io/net/minecraftforge/eventbus/1.0.0/eventbus-1.0.0-service.jar'. Received status code 522 from server: Origin Conection Time-out
   > Could not resolve net.minecraftforge:forgespi:1.3.0.
     Required by:
         project :
      > Could not resolve net.minecraftforge:forgespi:1.3.0.
         > Could not get resource 'https://jitpack.io/net/minecraftforge/forgespi/1.3.0/forgespi-1.3.0.jar'.
            > Could not HEAD 'https://jitpack.io/net/minecraftforge/forgespi/1.3.0/forgespi-1.3.0.jar'. Received status code 522 from server: Origin Connection Time-out
   > Could not resolve java3d:vecmath:1.5.2.
     Required by:
         project :
      > Could not resolve java3d:vecmath:1.5.2.
         > Could not get resource 'https://jitpack.io/java3d/vecmath/1.5.2/vecmath-1.5.2.jar'.
            > Could not HEAD 'https://jitpack.io/java3d/vecmath/1.5.2/vecmath-1.5.2.jar'. Received status code 522 from server: Origin Connection Time-out
   > Could not resolve cpw.mods:modlauncher:3.2.0.
     Required by:
         project : > net.minecraftforge:accesstransformers:1.0.0
         project : > net.minecraftforge:coremods:1.0.0
      > Could not resolve cpw.mods:modlauncher:3.2.0.
         > Could not get resource 'https://jitpack.io/cpw/mods/modlauncher/3.2.0/modlauncher-3.2.0.pom'.
            > Could not HEAD 'https://jitpack.io/cpw/mods/modlauncher/3.2.0/modlauncher-3.2.0.pom'. Received status code 522 from server: Origin Connection Time-out
   > Could not resolve net.minecraftforge:forgespi:1.3.0.
     Required by:
         project : > net.minecraftforge:coremods:1.0.0
      > Could not resolve net.minecraftforge:forgespi:1.3.0.
         > Could not get resource 'https://jitpack.io/net/minecraftforge/forgespi/1.3.0/forgespi-1.3.0.jar'.
            > Could not HEAD 'https://jitpack.io/net/minecraftforge/forgespi/1.3.0/forgespi-1.3.0.jar'. Received status code 522 from server: Origin Connection Time-out
wdtaylor commented 5 years ago

Having the same issue. My breaks like this.

Gamebuster19901 commented 5 years ago

@wdtaylor strange, I'm getting a 404 for https://jitpack.io/com/zendesk/support/2.2.1/support-2.2.1.jar that instead of a 522

wdtaylor commented 5 years ago

@Gamebuster19901 zendesk is actually hosted here. maven { url 'https://zendesk.jfrog.io/zendesk/repo' } So I think jitpack.io simply needs do respond that it doesn't have this repo.

wdtaylor commented 5 years ago

I can verify that adding www. worked to resolve the issue.

vic-cw commented 5 years ago

Huge thanks to @appach22 for finding the workaround.

Bug is still there, workaround works for me.

I have made my todo item "Remove dependency on JitPack" rise up to the top of my list.

I am amazed that after one week, JitPack has neither solved this issue, nor even given a word of reply, while this problem would prevent anybody from getting any work into production without the workaround.

The JitPack home page instructions have not even been updated with the workaround, still mentioning only https://jitpack.io

dani-mp commented 5 years ago

I agree with @vic-cw. There's no way @jitpack-io hasn't noticed this. It'd be great if they could shed some light regarding the problem, the solution, and the temporal workaround.

Gamebuster19901 commented 5 years ago

I'm assuming jitpack is using cloudflare. Perhaps they need to take a look at https://support.cloudflare.com/hc/en-us/articles/115003011431#522error

dphillipsprosper commented 5 years ago

This definitely seems to still be an issue. I cleared my Gradle caches today and all of a sudden I could not get any of my jitpack dependencies. I was seeing the 522's in my gradle logs with --debug same as OP.

The workaround thankfully seems to have worked for me.

GrahamBorland commented 5 years ago

My workaround was to make sure Jitpack is last in the repository list.

Jitpack's documentation does say:

Note: when using multiple repositories in build.gradle it is recommended to add JitPack at the end. Gradle will go through all repositories in order until it finds a dependency.

mitm001 commented 5 years ago

Already at the end for me and www was only thing that fixed it. Maybe a hosting config issue.

svangils commented 5 years ago

Still getting these errors, could you have a look at it:

Unexpected response code while executing GET method [repositoryId="jitpack", requestPath="/.meta/prefixes.txt", remoteUrl="https://jitpack.io/.meta/prefixes.txt"]. Expected: "SUCCESS (200)". Received: 522 : Origin Connection Time-out Last run: Fri Sep 27 2019 09:08:47 GMT+0200 (Midden-Europese zomertijd)

shailesh21 commented 5 years ago

I was also facing the same issue and the workaround given by @appach22 worked for me. Thanks, Bro.

Team Jitpack, I want to know the reason why adding www worked? It would be helpful for me to understand the issue.

geoffduong commented 5 years ago

I was running into this issue as well. The workaround described above fixed the issue for me!

babaliaris commented 5 years ago

For me the workaround of @appach22 about the www didn't work. But the method @GrahamBorland mentioned worked!!!!

Note: when using multiple repositories in build.gradle it is recommended to add JitPack at the end. Gradle will go through all repositories in order until it finds a dependency.

Gamebuster19901 commented 5 years ago

You Might also be able to use Gradle source dependencies if the workaround doesn't work for you: https://blog.gradle.org/introducing-source-dependencies

Unfortunately this requires the dependency be buildable by gradle.

HATELA commented 5 years ago

If you are using maven and getting an error of vidstige having a origin connection error. I have been using sikuli dependency too from which the vidstige error comes from. To solve I put the following exclusions and repos in my pom

   ```
<repositories>
        <repository>
          <id>Mulesoft Repo</id>
          <url>https://repository.mulesoft.org/nexus/content/repositories/public/</url>
      </repository>
       <repository>
              <id>jitpack.io</id>
                <url>https://www.jitpack.io</url>
            </repository>
         </repositories>


                          <dependency>
                <groupId>com.sikulix</groupId>
                <artifactId>sikulixapi</artifactId>
                <version>1.1.2</version>
                <exclusions>    
                    <exclusion>
                    <groupId>com.github.vidstige</groupId>
                    <artifactId>jadb</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
nre-ableton commented 5 years ago

The above workaround was working for me, but now it's broken too.

nre-ableton commented 5 years ago

Also, ping @jitpack-io, this is really severe!

Chemasmas commented 5 years ago

@nre-ableton Same here

Tried the www workaround and puttiong the jitpack line at the end of my repositories config

nre-ableton commented 5 years ago

So at least for part of yesterday, the www subdomain was working for us. 🤞 for a permanent solution...

nre-ableton commented 5 years ago

@autopaybyphone We experienced several different sorts of failures, I'm pretty sure that "read timed out" was one of them.

CurtJRees commented 5 years ago

The www subdomain fix is no longer working for us as well 👎

AlexTrotsenko commented 5 years ago

I have received unexpected 401 from public repository: https://github.com/jitpack/jitpack.io/issues/4039

Also similar issue here: https://github.com/jitpack/jitpack.io/issues/4002

ligi commented 5 years ago

I reached out on twitter to jitpack about this issue and they answered that they will look into it: https://twitter.com/jitpack/status/1189983094096482306

ligi commented 5 years ago

Seems jitpack is trying out a fix: https://twitter.com/jitpack/status/1193853023862378496

anyone still experiencing the issue?

mbwhite commented 5 years ago

Yes; we're still seeing this issue in Azure pipelines builds

knowamit commented 4 years ago

Put maven { url "https://jitpack.io" } to repositories under allprojects not under buildscript see screenshot:

https://i.stack.imgur.com/QAwkV.png

ℹ️ https://stackoverflow.com/a/37892027/2281175

wax911 commented 3 years ago

I've found a workaround: maven { url "https://www.jitpack.io" } (added www)

I cannot believe this actually works 😱

AndroidJiang commented 3 years ago

I've found a workaround: maven { url "https://www.jitpack.io" } (added www)

I cannot believe this actually works 😱

but why?

AndroidJiang commented 3 years ago

I've found a workaround: maven { url "https://www.jitpack.io" } (added www)

why

Palshyn commented 3 years ago

2021 and issue is still popping up

SaurabhOfficial commented 3 years ago

2021 and issue is still popping up

Yes it is

catchpig commented 3 years ago

2021 and issue is still popping up

kj27july commented 2 years ago

Worked😀 All your maven in settings.gradle

repositories { google() mavenCentral() jcenter() // Warning: this repository is going to shut down soon maven { url 'https://www.jitpack.io' } }

MahmudHasanMenon commented 2 years ago

I am also facing the error. Although added maven { url 'https://www.jitpack.io' }

error:- Could not HEAD 'https://jitpack.io/org/jitsi/react/jitsi-meet-sdk/3.7.0/jitsi-meet-sdk-3.7.0.pom'. Received status code 401 from server: Unauthorized

oliverspryn commented 2 years ago

Literally happens all the time now. I fix it with one library that used to depend on Jitpack and now it just moves onto another one. Seems to fail my builds about 40% of the time over just this one issue.

Seems to me like Jitpack is giving up the ghost.