Expo build is getting failed due to Could not resolve com.diffplug.spotless:com.diffplug.spotless.gradle.plugin:5.14.1

Hello, I am trying to build using expo build:android -t apk, but the build is failing continuously. Yesterday it was fine. I am getting the following error:
Could not resolve com.diffplug.spotless:com.diffplug.spotless.gradle.plugin:5.14.1
Attaching the screenshot!

I am using “expo”: “^42.0.0”

Similar here with expo 43. It was working yesterday.

I’m getting this as well.

If you actually go to:

https://google.bintray.com/exoplayer/com/facebook/react/react-native/maven-metadata.xml

you indeed will see that you get “502 Bad Gateway” so maybe things are just temporarily down?

My guess is that there are some issues with the bintray service since different urls from that domain are down… :thinking:

2 Likes

We are also experiencing the same issue. Tried building older release branches to confirm it’s not the code. https://google.bintray.com/ is down, might be something. Posting my log for the failed build step.

Build log - Running gradle
Configuration on demand is an incubating feature.
> Configure project :app
WARNING: The option setting 'android.useNewApkCreator=false' is experimental.
The current default is 'true'.
> Configure project :expo-structured-headers
Warning: The 'kotlin-android-extensions' Gradle plugin is deprecated. Please use this migration guide (https://goo.gle/kotlin-android-extensions-deprecation) to start working with View Binding (https://developer.android.com/topic/libraries/view-binding) and the 'kotlin-parcelize' plugin.
> Configure project :expo-updates-interface
Warning: The 'kotlin-android-extensions' Gradle plugin is deprecated. Please use this migration guide (https://goo.gle/kotlin-android-extensions-deprecation) to start working with View Binding (https://developer.android.com/topic/libraries/view-binding) and the 'kotlin-parcelize' plugin.
> Configure project :expo
Using expo modules
— expo-ads-admob (11.0.3)
— expo-ads-facebook (11.0.3)
— expo-analytics-amplitude (11.0.3)
— expo-analytics-segment (11.0.3)
— expo-app-auth (11.0.3)
— expo-application (4.0.0)
— expo-av (10.1.3)
— expo-background-fetch (10.0.3)
— expo-barcode-scanner (11.1.2)
— expo-battery (6.0.3)
— expo-brightness (10.0.3)
— expo-calendar (10.0.3)
— expo-camera (12.0.3)
— expo-cellular (4.0.0)
— expo-clipboard (2.0.3)
— expo-constants (12.1.3)
— expo-contacts (10.0.3)
— expo-crypto (10.0.3)
— expo-device (4.0.3)
— expo-document-picker (10.0.3)
— expo-error-recovery (3.0.3)
— expo-face-detector (11.0.3)
— expo-facebook (12.0.3)
— expo-file-system (13.0.3)
— expo-firebase-analytics (5.0.3)
— expo-firebase-core (4.0.3)
— expo-font (10.0.3)
— expo-gl (11.0.3)
— expo-gl-cpp (11.0.1)
— expo-google-sign-in (10.0.3)
— expo-haptics (11.0.3)
— expo-image-loader (3.0.0)
— expo-image-manipulator (10.1.2)
— expo-image-picker (11.0.3)
— expo-intent-launcher (10.0.3)
— expo-json-utils (0.2.0)
— expo-keep-awake (10.0.0)
— expo-linear-gradient (10.0.3)
— expo-local-authentication (12.0.1)
— expo-localization (11.0.0)
— expo-location (13.0.4)
— expo-mail-composer (11.0.3)
— expo-manifests (0.2.2)
— expo-media-library (13.0.3)
— expo-modules-core (0.4.7)
— expo-network (4.0.3)
— expo-notifications (0.13.3)
— expo-permissions (13.0.3)
— expo-print (11.0.4)
— expo-screen-capture (4.0.3)
— expo-screen-orientation (4.0.3)
— expo-secure-store (11.0.3)
— expo-sensors (11.0.3)
— expo-sharing (10.0.3)
— expo-sms (10.0.3)
— expo-speech (10.0.3)
— expo-splash-screen (0.13.5)
— expo-sqlite (10.0.3)
— expo-store-review (5.0.3)
— expo-structured-headers (2.0.0)
— expo-task-manager (10.0.3)
— expo-updates (0.10.14)
— expo-video-thumbnails (6.0.3)
— expo-web-browser (10.0.3)
— unimodules-app-loader (3.0.0)
[stderr] FAILURE: 
[stderr] Build failed with an exception.
[stderr] * What went wrong:
[stderr] Could not determine the dependencies of task ':app:lintVitalRelease'.
[stderr] > Could not resolve all artifacts for configuration ':app:debugRuntimeClasspath'.
[stderr]    > Could not resolve com.facebook.react:react-native:+.
[stderr]      Required by:
[stderr]          project :app
[stderr]          project :app > project :expo
[stderr]          project :app > host.exp.exponent:expo-random:12.0.1
[stderr]          project :app > project :expo > host.exp.exponent:expo-modules-core:0.4.7
[stderr]          project :app > project :expo > host.exp.exponent:expo-splash-screen:0.13.5
[stderr]          project :app > project :expo > host.exp.exponent:expo-updates:0.10.14
[stderr]       > 
[stderr] Failed to list versions for com.facebook.react:react-native.
[stderr]          > Unable to load Maven meta-data from https://google.bintray.com/exoplayer/com/facebook/react/react-native/maven-metadata.xml.
[stderr]             > Could not get resource 'https://google.bintray.com/exoplayer/com/facebook/react/react-native/maven-metadata.xml'.
[stderr]                > Could not GET 'https://google.bintray.com/exoplayer/com/facebook/react/react-native/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
[stderr] * Try:
[stderr] 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.
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 21s
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.9/userguide/command_line_interface.html#sec:command_line_warnings
Error: ./gradlew exited with non-zero code: 1
    at ChildProcess.completionListener (/app/turtle/node_modules/@expo/xdl/node_modules/@expo/spawn-async/build/spawnAsync.js:52:23)
    at Object.onceWrapper (events.js:421:26)
    at ChildProcess.emit (events.js:314:20)
    at ChildProcess.EventEmitter.emit (domain.js:483:12)
    at maybeClose (internal/child_process.js:1022:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
    ...
    at spawnAsync (/app/turtle/node_modules/@expo/xdl/node_modules/@expo/spawn-async/build/spawnAsync.js:17:21)
    at spawnAsyncThrowError (/app/turtle/node_modules/@expo/xdl/build/detach/ExponentTools.js:201:45)
    at buildShellAppAsync (/app/turtle/node_modules/@expo/xdl/build/detach/AndroidShellApp.js:985:11)
    at async Object.createAndroidShellAppAsync (/app/turtle/node_modules/@expo/xdl/build/detach/AndroidShellApp.js:396:5)
    at async runShellAppBuilder (/app/turtle/build/builders/android.js:95:9)
    at async Object.buildAndroid [as android] (/app/turtle/build/builders/android.js:43:28)
    at async build (/app/turtle/build/jobManager.js:181:33)
    at async processJob (/app/turtle/build/jobManager.js:118:32)
    at async Object.doJob (/app/turtle/build/jobManager.js:49:5)
    at async main (/app/turtle/build/server.js:66:13)

Same with me, I builded my app last night and it goes well. But at this morning I had correct some issues and tried to build again, but got this error.

Building with eas-cli worked for me.

npm i --g eas-cli
eas configure
eas build --platform android

We just deployed a partial fix, it should fix the issue at least for the latest SDKs(tested on sdk 42 and 43), if you are still seeing the issue please post which sdks are affected

1 Like

I’ve problem with SDK40 and only the android build:

[stderr]       > Failed to list versions for com.facebook.react:react-native.
[stderr]          > Unable to load Maven meta-data from https://google.bintray.com/exoplayer/com/facebook/react/react-native/maven-metadata.xml.
[stderr]             > Could not get resource 'https://google.bintray.com/exoplayer/com/facebook/react/react-native/maven-metadata.xml'.
[stderr]                > Could not GET 'https://google.bintray.com/exoplayer/com/facebook/react/react-native/maven-metadata.xml'. Received status code 502 from server: Bad Gateway

@alessandro_franzi I just checked your builds and I don’t see any failed builds that were created after my post. If build was on different account please provide link or owner name

The last build is ok! Thank you very much!


When trying to generate the build for android i got the same error yesterday and today

@edsongjrexpo Your screenshot does not contain an actual error, it was printed a few lines higher. Assuming that it really the same error(I can’t tell that based on those logs):

  • SDK 41-43 were rebuilt without bintray dependencies
  • older sdks on cloud builds should work, because we are redirecting bintray requests, they are still failing but not with 502 errors
  • in turtle-cli only sdk41-43 will work, there is no immediate plans to rebuild older SDKs
  • you can make older SDK work in turtle-cli by adding
127.0.0.1 dl.bintray.com
127.0.0.1 google.bintray.com

to /etc/hosts

after updating turtle-cli with “npm install -g turtle-cli” command, the build worked. Thank you so much

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.