react-native: Could not resolve org.webkit:android-jsc:+. when building and installing for android

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® Core™ 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.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 7
  • Comments: 27 (1 by maintainers)

Most upvoted comments

Getting same issue today!

I am getting the same error and Jcenter is down

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: https://github.com/react-native-community/discussions-and-proposals/issues/331#issuecomment-1013339743 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 https://github.com/facebook/react-native/issues/32734#issuecomment-1013431238
  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.

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

also…

I think for now we just have to wait

Same issue… help please!

same issue…

same issue

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

same issue…

https://status.bintray.com/

Jcenter downloads are down at the moment.

Same issue

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.

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

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?

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

@Snupas Thanks for the info… minutes ago the page was not updated I guess 😦