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

Could not HEAD 'https://jcenter.bintray.com/com/diffplug/spotless/spotless-lib/2.16.0/spotless-lib-2.16.0.module'. Received status code 502 from server: Bad Gateway #32897

Closed
valery-lavrik opened this issue Jan 16, 2022 · 5 comments
Labels
Needs: Triage 🔍 🌐Networking Related to a networking API. Resolution: Locked This issue was locked by the bot.

Comments

@valery-lavrik
Copy link

Description

Hi
I have 2 laptops at home. At first, the project works well

But when I want to run the project on the second one, when npm run android I get an error

BUILD FAILED in 21s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':react-native-screens'.
> Could not resolve all artifacts for configuration ':react-native-screens:classpath'.
   > Could not resolve com.diffplug.spotless:spotless-lib:2.16.0.
     Required by:
         project :react-native-screens > com.diffplug.spotless:spotless-plugin-gradle:5.15.0
         project :react-native-screens > com.diffplug.spotless:spotless-plugin-gradle:5.15.0 > com.diffplug.spotless:spotless-lib-extra:2.16.0
      > Could not resolve com.diffplug.spotless:spotless-lib:2.16.0.
         > Could not get resource 'https://jcenter.bintray.com/com/diffplug/spotless/spotless-lib/2.16.0/spotless-lib-2.16.0.pom'.
            > Could not HEAD 'https://jcenter.bintray.com/com/diffplug/spotless/spotless-lib/2.16.0/spotless-lib-2.16.0.pom'. Received status code 502 from server: Bad Gateway

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.        

* Get more help at https://help.gradle.org

BUILD FAILED in 21s

What's the matter? there can't be a problem with the network because everything is fine on the first laptop

My build.gradle

buildscript {
    ext {
        buildToolsVersion = "30.0.2"
        minSdkVersion = 21
        compileSdkVersion = 30
        targetSdkVersion = 30
        ndkVersion = "21.4.7075529"
    }
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath("com.android.tools.build:gradle:4.2.2")

		// Firebase
		classpath 'com.google.gms:google-services:4.3.10'
		classpath 'com.google.firebase:firebase-crashlytics-gradle:2.5.2'

		
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
		mavenCentral()
        mavenLocal()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url("$rootDir/../node_modules/react-native/android")
        }
        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }

        google()
        maven { url 'https://www.jitpack.io' }
    }
}

of course I don't want to change anything in build.gradle because other people are still working on this project, but I'm the only one with a problem

Version

0.66.4

Output of npx react-native info

info Fetching system and libraries information...
System:
    OS: Windows 10 10.0.22000
    CPU: (4) x64 Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz
    Memory: 486.80 MB / 7.92 GB
  Binaries:
    Node: 16.13.0 - C:\Program Files\nodejs\node.EXE
    Yarn: Not Found
    npm: 8.1.0 - C:\Program Files\nodejs\npm.CMD
    Watchman: Not Found
  SDKs:
    Android SDK:
      API Levels: 29, 30, 32
      Build Tools: 29.0.2, 30.0.2, 32.0.0
      System Images: android-29 | Intel x86 Atom_64, android-29 | Google Play Intel x86 Atom
      Android NDK: Not Found
    Windows SDK: Not Found
  IDEs:
    Android Studio: Version     2020.3.0.0 AI-203.7717.56.2031.7935034
    Visual Studio: Not Found
  Languages:
    Java: 1.8.0_312 - C:\Program Files\OpenJDK\openjdk-8u312-b07\bin\javac.EXE
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2
    react-native: 0.66.4 => 0.66.4
    react-native-windows: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

npm install
npm run android

Snack, code example, screenshot, or link to a repository

No response

@react-native-bot react-native-bot added the 🌐Networking Related to a networking API. label Jan 16, 2022
@Suesanz
Copy link

Suesanz commented Jan 16, 2022

It looks like jcenter is down, Nothing to do with react native.
You can check statuses from here.

@MohamedAbdElmoniem
Copy link

temp solution to run the android project while we are waiting for jcenter to be working:

  • disable wifi
  • run the app --> npm run android
  • enable wifi after running the app

@valery-lavrik
Copy link
Author

It looks like jcenter is down, Nothing to do with react native.
You can check statuses from here.

You didn't understand, there are 2 computers near me. Everything works fine on the first floor, there is an error on the second floor. There's obviously something with the settings, but I don't understand what

@cortinico
Copy link
Contributor

Closing as this is most likely a duplicate of #32734

I've just tried to wget at:

Could not HEAD 'https://jcenter.bintray.com/com/diffplug/spotless/spotless-lib/2.16.0/spotless-lib-2.16.0.pom'. Received status code 502 from server: Bad Gateway

And I receive a 200.

I believe this is now resolved. @valery-lavrik if you're having failure on only one of the two machine could be related to a local proxy/network configuration.

@valery-lavrik
Copy link
Author

all right. I tried to repeat the build today, everything went well

@facebook facebook locked as resolved and limited conversation to collaborators Jan 17, 2023
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jan 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs: Triage 🔍 🌐Networking Related to a networking API. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants