transistorsoft / cordova-background-geolocation-lt

The most sophisticated background location-tracking & geofencing module with battery-conscious motion-detection intelligence for iOS and Android.
http://www.transistorsoft.com/shop/products/cordova-background-geolocation
Other
655 stars 277 forks source link

Cordova / Android build failure: jcenter.bintray.com #1350

Closed ageissel closed 1 month ago

ageissel commented 2 years ago

Your Environment

Expected Behavior

App should successfully build (last successful build on 29 Apr 2022 @ 15:15 IST)

Actual Behavior

App build failed to build (first observed failing build on 2 May 2022 @ 10:45 IST) No change to plugin or configuration (other than version number) in this time. Javascript code (app payload) was changed, but not related to building the app).

Steps to Reproduce

  1. App build

Context

We use Monaca.io for remote Cordova builds - their tech support confirm no change in their build environment in the timeframe for this issue.

Also, our other Apps using identical configuration, with the exception of this plugin, build as normal.

From our own research, is the apparent dependency on jcenter significant, given that the services have been sunset?

Debug logs

Logs Cordova build log extract ``` [01:38:46] Adding cordova-background-geolocation-lt to package.json [01:38:48] Discovered plugin "cordova-plugin-geolocation". Adding it to the project [01:38:49] Installing "cordova-plugin-geolocation" for android [01:38:49] Adding cordova-plugin-geolocation to package.json [01:39:09] [cordova-plugin-background-fetch] libDir: /tmp/download/platforms/android/app/libs [01:39:09] [cordova-background-geolocation] libDir: /tmp/download/platforms/android/app/libs [01:39:09] [cordova-background-geolocation] Purging debug resources in release build [01:41:02] FAILURE: Build failed with an exception. [01:41:02] * What went wrong: [01:41:02] Could not determine the dependencies of task ':app:collectReleaseDependencies'. [01:41:02] > Could not resolve all task dependencies for configuration ':app:releaseRuntimeClasspath'. [01:41:02] > Could not resolve com.transistorsoft:tslocationmanager:+. [01:41:02] Required by: [01:41:02] project :app [01:41:02] > Failed to list versions for com.transistorsoft:tslocationmanager. [01:41:02] > Unable to load Maven meta-data from https://jcenter.bintray.com/com/transistorsoft/tslocationmanager/maven-metadata.xml. [01:41:02] > Could not get resource 'https://jcenter.bintray.com/com/transistorsoft/tslocationmanager/maven-metadata.xml'. [01:41:02] > [01:41:02] Could not GET 'https://jcenter.bintray.com/com/transistorsoft/tslocationmanager/maven-metadata.xml'. [01:41:02] > Read timed out [01:41:02] Command failed with exit code 1: /tmp/download/platforms/android/gradlew :app:bundleRelease -b /tmp/download/platforms/android/build.gradle ```
christocracy commented 2 years ago

This plugin does not rely on jcenter.

My Flutter customers complained of similar issues a few months ago. The solution was to remove jcenter completely from their project (and update to latest version of all other plugins where references to jcenter had been removed).

This error is not directly related to the plugin. It's something mucked up with `jcenter.

Read timed out

The plugin loads its tslocationmanager dependency from a local maven url within the plugin itself. The gradle dependency resolver merely rotates through all it available respositories until one "clicks". For some reason, jcenter seems to "hang" and "time out".

ageissel commented 2 years ago

I'll get back on to the build guys and will let you know how I get on. Thanks Chris.

christocracy commented 2 years ago

My Flutter customers who experienced this said it would happen periodically. Sometimes it would work, sometimes fail.

Clearly something is going on at jCenter, even though it's advertised the repository will still be active for read-only, in spite of its well-publicized deprecation.

ageissel commented 2 years ago

Ok then ... some good news, at last!

The first is that the error message is completely misleading. It is indeed the case that jcenter is unavailable, but that's neither the cause nor relevant to this issue.

In short, the upgrade of the plugin from v4.4.2 to v4.6.0 'broke' my build in a weird way. I'm not overly familiar with Android builds, and so won't speculate on what or how, but eventually discovered this through a process of elimination and also revisiting older versions of the plugin.

My good news is that I'm back building :-), but unfortunately none-the-wiser as to why.

Thanks again, Chris, and hope you have a nice weekend.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You may also mark this issue as a "discussion" and I will leave this open.

github-actions[bot] commented 1 month ago

This issue was closed because it has been inactive for 14 days since being marked as stale.