transistorsoft / react-native-background-geolocation

Sophisticated, battery-conscious background-geolocation with motion-detection
http://shop.transistorsoft.com/pages/react-native-background-geolocation
MIT License
2.62k stars 428 forks source link

502 Bad Gateway error on GET /maven-metadata.xml #2094

Closed cquillen2003 closed 1 month ago

cquillen2003 commented 1 month ago

Your Environment

buildscript { ext { buildToolsVersion = "34.0.0" minSdkVersion = 19 compileSdkVersion = 34 appCompatVersion = "1.4.2" googlePlayServicesLocationVersion = "21.0.1" targetSdkVersion = 34 ndkVersion = "26.1.10909125" kotlinVersion = "1.9.22" } repositories { google() mavenCentral() } dependencies { classpath("com.android.tools.build:gradle") classpath("com.facebook.react:react-native-gradle-plugin") classpath("org.jetbrains.kotlin:kotlin-gradle-plugin") } }

allprojects { repositories { // Required for react-native-background-geolocation maven { url("${project(':react-native-background-geolocation').projectDir}/libs") } maven { url 'https://developer.huawei.com/repo/' } // Required for react-native-background-fetch maven { url("${project(':react-native-background-fetch').projectDir}/libs") } } }

apply plugin: "com.facebook.react.rootproject"


## Expected Behavior
App builds and runs in Android Studio

## Actual Behavior
Build Error:

Could not GET 'https://oss.sonatype.org/content/repositories/snapshots/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml'. Received status code 502 from server: Bad Gateway

## Debug logs
<!-- include iOS / Android logs
- ios XCode logs,
- use #getLog #emailLog methods (@see docs)
- Android: $ adb logcat -s TSLocationManager
-->
<details><summary>Logs</summary>

``` <!-- Syntax highlighting:  DO NOT REMOVE -->
FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:processDebugResources'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
   > Could not resolve com.transistorsoft:tsbackgroundfetch:+.
     Required by:
         project :app > project :react-native-background-fetch
      > Failed to list versions for com.transistorsoft:tsbackgroundfetch.
         > Unable to load Maven meta-data from https://oss.sonatype.org/content/repositories/snapshots/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml.
            > Could not GET 'https://oss.sonatype.org/content/repositories/snapshots/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml'. 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 9s
error Failed to install the app. Command failed with exit code 1: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
Warning: SDK processing. This version only understands SDK XML versions up to 3 but an SDK XML file of version 4 was encountered. This can happen if you use versions of Android Studio and the command-line tools that were released at different times. FAILURE: Build failed with an exception. * What went wrong:
Could not determine the dependencies of task ':app:processDebugResources'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'. > Could not resolve com.transistorsoft:tsbackgroundfetch:+. Required by: project :app > project :react-native-background-fetch > Failed to list versions for com.transistorsoft:tsbackgroundfetch. > Unable to load Maven meta-data from https://oss.sonatype.org/content/repositories/snapshots/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml. > Could not GET 'https://oss.sonatype.org/content/repositories/snapshots/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml'. Received status code 502 from server: Bad Gateway

christocracy commented 1 month ago

Did you forget to yarn add background-fetch?

https://github.com/transistorsoft/react-native-background-geolocation/blob/master/help/INSTALL-ANDROID-AUTO.md#

sgeorgie commented 1 month ago

We've been getting this error randomly since yesterday as well. The build used to pass for the past 2 years without issues.

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:lintVitalReportDevRelease'.
> Could not resolve all task dependencies for configuration ':app:devReleaseRuntimeClasspath'.
   > Could not resolve com.transistorsoft:tsbackgroundfetch:+.
     Required by:
         project :app > project :react-native-background-fetch
      > Failed to list versions for com.transistorsoft:tsbackgroundfetch.
         > Unable to load Maven meta-data from https://oss.sonatype.org/content/repositories/snapshots/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml.
            > Could not GET 'https://oss.sonatype.org/content/repositories/snapshots/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml'.
               > Read timed out
sgeorgie commented 1 month ago

It seems like a maven issue, not specific to the package: https://status.maven.org/incidents/mbq9d04f6xsn

christocracy commented 1 month ago

The plug-in doesn’t load the library remotely. The purpose of the custom maven url is to say “load here locally”.

cquillen2003 commented 1 month ago

Today it works. Must have been a Maven issue as mentioned above.