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

Origin Connection Time-out #3973

Closed
ligi opened this issue Sep 11, 2019 · 59 comments
Closed

Origin Connection Time-out #3973

ligi opened this issue Sep 11, 2019 · 59 comments
Labels

Comments

@ligi
Copy link

ligi commented Sep 11, 2019

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
Copy link

mitm001 commented Sep 12, 2019

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
Copy link
Member

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
Copy link
Author

ligi commented Sep 12, 2019

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
Copy link

dani-mp commented Sep 12, 2019

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

@yamilmedina
Copy link

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 ?

@jawa-the-hutt
Copy link

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
Copy link

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
Copy link

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

@draperunner
Copy link

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

@appach22
Copy link

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

@mitm001
Copy link

mitm001 commented Sep 13, 2019

Worked, great catch.

@eenglish49
Copy link

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

@strooooke
Copy link

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
Copy link

@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
Copy link

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

@Gamebuster19901
Copy link

Gamebuster19901 commented Sep 16, 2019

@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
Copy link

wdtaylor commented Sep 16, 2019

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

ligi added a commit to ligi/PassAndroid that referenced this issue Sep 17, 2019
@wdtaylor
Copy link

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

@vic-cw
Copy link

vic-cw commented Sep 18, 2019

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
Copy link

dani-mp commented Sep 18, 2019

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
Copy link

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
Copy link

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
Copy link

GrahamBorland commented Sep 19, 2019

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.

@ligi
Copy link
Author

ligi commented Nov 1, 2019

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
Copy link
Author

ligi commented Nov 12, 2019

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

anyone still experiencing the issue?

@mbwhite
Copy link

mbwhite commented Nov 21, 2019

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

@knowamit
Copy link

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
Copy link

wax911 commented Mar 8, 2021

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

I cannot believe this actually works 😱

@AndroidJiang
Copy link

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

I cannot believe this actually works 😱

but why?

@AndroidJiang
Copy link

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

why

@Palshyn
Copy link

Palshyn commented Jul 9, 2021

2021 and issue is still popping up

@SaurabhOfficial
Copy link

2021 and issue is still popping up

Yes it is

@catchpig
Copy link

2021 and issue is still popping up

@kj27july
Copy link

kj27july commented Nov 23, 2021

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
Copy link

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
Copy link

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.

@berchoes
Copy link

@oliverspryn same here :( any updates?

@devpolo
Copy link

devpolo commented Jul 28, 2022

Looks like removing the www in your build.gradle can also be a workaround..

- maven { url 'https://www.jitpack.io' }
+ maven { url 'https://jitpack.io' }

@github-actions
Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Aug 30, 2022
@AndroidJiang
Copy link

Uninstall Android Studio fullly and reinstall

@github-actions github-actions bot removed the stale label Sep 14, 2022
@rohith-thummanapally
Copy link

hi i am also having same issue.....but i am on expo eas setup....i won't have build.gradle file....what should i do to make it work?

@github-actions
Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Oct 29, 2022
@github-actions
Copy link

This issue was closed because it has been inactive for 14 days since being marked as stale.

@oliverspryn
Copy link

oliverspryn commented Nov 18, 2022

@oliverspryn same here :( any updates?

Yep @berchoes . I've pretty much left Jitpack altogether. I use Maven Central for all dependencies that I can, and if I need a library that is only hosted on Jitpack, I proxy it through Artifactory. That way, my dependencies always come via Artifactory and it is a much more reliable mirror.

@ArleyPereira
Copy link

ArleyPereira commented Dec 22, 2022

problem happening today

Jitpack.io off
https://prnt.sc/08t1tlmX3VX6

build.gradle(Project)
https://prnt.sc/ec-gUzBk0HZM

build.gradle(Module)
https://prnt.sc/Y4uUjacOSVz1

settings.gradle(Project)
https://prnt.sc/MEUNV3Ukz3iB

Problem
https://prnt.sc/gzJ4WoUBHaN6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests