jitpack.io icon indicating copy to clipboard operation
jitpack.io copied to clipboard

Origin Connection Time-out

Open ligi opened this issue 6 years ago • 54 comments

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

ligi avatar Sep 11 '19 22:09 ligi

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

mitm001 avatar Sep 12 '19 00:09 mitm001

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

jitpack-io avatar Sep 12 '19 07:09 jitpack-io

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

ligi avatar Sep 12 '19 07:09 ligi

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

dani-mp avatar Sep 12 '19 09:09 dani-mp

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

  • com.github.bmarrdev:android-DecoView-charting:v1.1
  • com.github.drawers:SpinnerDatePicker:1.0.6
  • and other "in-house" libs from our private artifactory, that have been attempted to fetch from jitpack

Are there any solutions for this ?

yamilmedina avatar Sep 12 '19 15:09 yamilmedina

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

jawa-the-hutt avatar Sep 12 '19 19:09 jawa-the-hutt

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

appach22 avatar Sep 12 '19 20:09 appach22

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

eenglish49 avatar Sep 13 '19 01:09 eenglish49

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

  • https://jitpack.io/it/unimi/dsi/fastutil/7.2.0/fastutil-7.2.0.pom
  • https://jitpack.io/net/bytebuddy/byte-buddy/1.9.10/byte-buddy-1.9.10.pom

draperunner avatar Sep 13 '19 08:09 draperunner

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

appach22 avatar Sep 13 '19 11:09 appach22

Worked, great catch.

mitm001 avatar Sep 13 '19 15:09 mitm001

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

eenglish49 avatar Sep 13 '19 15:09 eenglish49

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).

strooooke avatar Sep 16 '19 11:09 strooooke

@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

Gamebuster19901 avatar Sep 16 '19 19:09 Gamebuster19901

Having the same issue. My breaks like this.

  • What went wrong: Could not determine the dependencies of task ':app:compilePublisherProdDebugKotlin'.

Could not resolve all files for configuration ':app:editorProdDebugRuntimeClasspath'. Could not resolve com.zendesk:support:2.2.1. Required by: project :app > Could not resolve com.zendesk:support:2.2.1. > Could not get resource 'https://jitpack.io/com/zendesk/support/2.2.1/support-2.2.1.jar'. > Could not HEAD 'https://jitpack.io/com/zendesk/support/2.2.1/support-2.2.1.jar'. Received status code 522 from server: Origin Connection Time-out

wdtaylor avatar Sep 16 '19 20:09 wdtaylor

@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

Gamebuster19901 avatar Sep 16 '19 20:09 Gamebuster19901

@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 avatar Sep 16 '19 20:09 wdtaylor

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

wdtaylor avatar Sep 17 '19 17:09 wdtaylor

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

vic-cw avatar Sep 18 '19 12:09 vic-cw

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.

dani-mp avatar Sep 18 '19 12:09 dani-mp

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

Gamebuster19901 avatar Sep 18 '19 17:09 Gamebuster19901

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.

dphillipsprosper avatar Sep 19 '19 21:09 dphillipsprosper

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.

GrahamBorland avatar Sep 19 '19 21:09 GrahamBorland

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

mitm001 avatar Sep 21 '19 01:09 mitm001

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)

svangils avatar Sep 27 '19 07:09 svangils

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.

shailesh21 avatar Oct 02 '19 18:10 shailesh21

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

geoffduong avatar Oct 04 '19 13:10 geoffduong

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.

babaliaris avatar Oct 06 '19 09:10 babaliaris

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.

Gamebuster19901 avatar Oct 07 '19 04:10 Gamebuster19901

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>

HATELA avatar Oct 09 '19 17:10 HATELA