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 resolve org.webkit:android-jsc:+. when building and installing for android #31161

Closed
Suzuhana opened this issue Mar 15, 2021 · 27 comments
Labels
Needs: Triage 🔍 Resolution: Locked This issue was locked by the bot.

Comments

@Suzuhana
Copy link

Suzuhana commented Mar 15, 2021

Description

I am getting this error "Could not resolve org.webkit:android-jsc:+." when trying to run "npm run android" this morning. It was working on Friday. Full detail below:

Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not resolve org.webkit:android-jsc:+.
     Required by:
         project :app
      > Failed to list versions for org.webkit:android-jsc.
         > Unable to load Maven meta-data from https://jcenter.bintray.com/org/webkit/android-jsc/maven-metadata.xml.
            > Could not HEAD 'https://jcenter.bintray.com/org/webkit/android-jsc/maven-metadata.xml'.
               > Read timed out

I started a new project from scratch using npx react-native init AwesomeProject it failed with same error.

I have another project on older version of RN at 0.63.2, which can build as expected. These ones which are having issues are on 0.63.4 and 0.64.0

Seems like remote artifact repo is down to me..

React Native version:

Run react-native info in your terminal and copy the results here.

System:
OS: macOS 10.15.7
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 33.99 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.15.0 - ~/.nvm/versions/node/v12.15.0/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.10 - ~/.nvm/versions/node/v12.15.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: Not Found
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
Android SDK: Not Found
IDEs:
Android Studio: 4.1 AI-201.8743.12.41.7042882
Xcode: 11.3.1/11C505 - /usr/bin/xcodebuild
Languages:
Java: 11.0.6 - /Library/Java/JavaVirtualMachines/jdk-11.0.6.jdk/Contents/Home/bin/javac
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: 0.63.4 => 0.63.4
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. npm run android

Expected Results

Describe what you expected to happen.

It should build correctly without the issue.

@Snupas
Copy link

Snupas commented Mar 15, 2021

https://status.bintray.com/

Jcenter downloads are down at the moment.

@nyoung697
Copy link

I am getting a similar error using a fresh initialization of react native: npx react-native init NewProject

This is what pops up in my console when I try to run it on Android:

* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not resolve com.facebook.flipper:flipper:0.75.1.
     Required by:
         project :app
      > Skipped due to earlier error
   > Could not resolve com.facebook.flipper:flipper-network-plugin:0.75.1.
     Required by:
         project :app
      > Skipped due to earlier error
   > Could not resolve com.facebook.flipper:flipper-fresco-plugin:0.75.1.
     Required by:
         project :app
      > Skipped due to earlier error
   > Could not resolve org.webkit:android-jsc:+.
     Required by:
         project :app
      > Failed to list versions for org.webkit:android-jsc.
         > Unable to load Maven meta-data from https://jcenter.bintray.com/org/webkit/android-jsc/maven-metadata.xml.
            > Could not HEAD 'https://jcenter.bintray.com/org/webkit/android-jsc/maven-metadata.xml'.
               > Read timed out
   > Could not resolve com.squareup.okio:okio:1.17.5.
     Required by:
         project :app > com.facebook.react:react-native:0.64.0
      > Skipped due to earlier error
   > Could not resolve com.squareup.okio:okio:1.17.5.
     Required by:
         project :app > com.facebook.react:react-native:0.64.0 > com.squareup.okhttp3:okhttp:3.12.12
      > Skipped due to earlier error

I recall in v0.63.x I was having issues with Flipper and had to use an earlier version. Not sure if Flipper is causing issues again in v0.64. It is working fine on iOS.

@Suzuhana
Copy link
Author

@Snupas Thanks for the info.. minutes ago the page was not updated I guess :(

@ajparrah
Copy link

ajparrah commented Mar 15, 2021

@Suzuhana I was getting the same error today and i knew that i didn't make anything on my project. You can try to disconnect your internet... It worked for me

@Suzuhana
Copy link
Author

Suzuhana commented Mar 15, 2021

I just tried again and it worked for me.
I can also confirm from Jc center status page https://status.bintray.com/ :

Monitoring - A fix has been implemented and we are monitoring the results.
Mar 15, 17:39 UTC
Identified - The issue has been identified and a fix is being implemented.
Mar 15, 17:38 UTC

closing this issue.

@ZeeshanAhmadKhalil
Copy link

ZeeshanAhmadKhalil commented Jan 17, 2022

I am getting the same error and Jcenter is down

@ranrolls
Copy link

Getting same issue today!

@salman1696
Copy link

also.....

@kkureli
Copy link

kkureli commented Jan 17, 2022

same issue...

1 similar comment
@jeliel-augusto
Copy link

same issue...

@fede9612
Copy link

Same issue... help please!

@enigmablue
Copy link

@cristobal2323
Copy link

Same issue

@ww8007
Copy link

ww8007 commented Jan 17, 2022

same issue

1 similar comment
@QasimJaffry
Copy link

same issue

@kkureli
Copy link

kkureli commented Jan 17, 2022

I can not export apk and aab because of this error

@Sbenitez-Ideas
Copy link

I think for now we just have to wait

@FarooqAlamRN
Copy link

I also have this issue, what solution right now, I have to give apk to my client asap

@antoinmaged
Copy link

Same issue, when can we now that the servers are up ?

@walidmh
Copy link

walidmh commented Jan 17, 2022

Same issue, any future solution ?

@awmoreira
Copy link

?

@FarooqAlamRN
Copy link

well, I just want to know why this error occur because last week my app runs fine but after getting GitHub pull it shows this error.......
anybody know about it?

@cortinico
Copy link
Contributor

cortinico commented Jan 17, 2022

Hey all,
May I kindly ask you to stop posting same issue messages without providing solution as that's just generating notifications/emails for people subscribed to this project/issue 🙏

Back to the issue:
It seems like JCenter is really slow to respond at the moment. It can be verified locally with:

wget https://jcenter.bintray.com/org/webkit/android-jsc/maven-metadata.xml

The command should take seconds. It's failing with 504 or generally taking ~3 minutes for me to return a 200 sometimes.

If you're on React Native 0.65.x and subsequent versions, you should not be affected by this as we removed jcenter() from the repository block in that version. Instead, if you're on the latest Expo SDK, which relies on RN 0.64.x, you're most likely affected this.

Please also note that, if your build is failing as you're trying do download org.webkit:android-jsc:+ from JCenter, that specific dependency is available to be consumed on Maven Central: https://search.maven.org/artifact/org.webkit/android-jsc/r174650/aar

Please check the answer we provided here: react-native-community/discussions-and-proposals#331 (comment) as this clarifies a bit the scope of the problem.

As possible solutions to unblock you, I would suggest to:

  1. (recommended) Migrate to the latest version of RN and generally update your dependencies.
  2. Try to apply the workaround suggested by @ShikaSD here 502 Bad Gateway: Unable to load Maven meta-data from Bintray #32734 (comment)
  3. Try to manually update all the jcenter() instance in your build.gradle file to use mavenCentral instead. Please note that you will also have to edit files inside node_modules, so your edits will be lost if you npm/yarn install. Moreover, we're aware of some older dependencies being available only on JCenter (the one listed by @ShikaSD in the point 2. I mentioned), so just updating jcenter() -> mavenCentral() might just not work as it is. A command to update your build.gradle file automatically would be:
    1. For MacOS: find . -type f \( -name "*.gradle" -o -name "*.gradle.kts" \) -exec sed -i '' 's/jcenter/mavenCentral/g' {} +
    2. For Linux: find . -type f \( -name "*.gradle" -o -name "*.gradle.kts" \) -exec sed -i 's/jcenter/mavenCentral/g' {} +
    3. For Windows: I don't have a win manchine at the moment, but I'm happy to edit this message should someone have a command for win to share.
  4. Attempt to build using offline mode and use cached artifacts. That can be done adding the --offline flag to the Gradle command line as suggested here

EDIT: typos + added option 4.

@monddelrosario
Copy link

temporary workaround on this issue
Check this link: https://stackoverflow.com/a/69205725

@porfidev
Copy link

Disable Wifi, actually works fine.

Tested on RN 0.63.4 on Mac M1

@ASchwad
Copy link

ASchwad commented Jan 18, 2022

jcenter seems to be up again - Had the issue yesterday, but some minutes ago the app built successfully without applying any of the fixes.

@FarooqAlamRN
Copy link

hey guys! again jcenter seems to be down......
is anyone face this issues

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

No branches or pull requests