transistorsoft / flutter_background_geolocation_firebase

Firebase proxy for Flutter Background Geolocation SDK
MIT License
21 stars 7 forks source link

Incompatibilities with latest flutter and latest flutterfire plugins [BUG] #18

Closed albinhubsch closed 3 years ago

albinhubsch commented 3 years ago

Your Environment

! Doctor found issues in 1 category.


**To Reproduce**
Simply add this plugin together with the flutter_background_geolocation plugin to an app that also is dependent on the latest releases of flutterFire plugins. 

firebase_core: ^0.5.0 firebase_auth: ^0.18.1+1 cloud_firestore: ^0.14.1+2 cloud_functions: ^0.6.0+1 firebase_messaging: ^7.0.2 firebase_storage: ^4.0.1 firebase_analytics: ^6.0.1


**Debug logs**

Launching lib/main.dart on sdk gphone x86 arm in debug mode... Signing with debug keys [flutter_background_geolocation] Purging debug resources in release build [flutter_background_geolocation] Purging debug resources in release build

FAILURE: Build failed with an exception.

BUILD FAILED in 23s Exception: Gradle task assembleDevDebug failed with exit code 1 Exited (sigterm)



**Additional context**
So it seems like this plugin uses an 'old' version of firebase that references old versions of protobuf. Application builds just fine when excluding this plugin.
christocracy commented 3 years ago

See the Android Setup. You have full control over the android firebase dependency versions this plugin uses. You can align those version as desired to any other plugin. Those other plugin should offer a similar mechanism for version-alignment.

You can determine latest com.google.firebase version at https://maven.google.com/web/index.html#com.google.firebase


buildscript {
    ext {
         .
         .
         .
+       firebaseCoreVersion = "17.4.4"          // Or latest
+       firebaseFirestoreVersion = "21.5.0"     // Or latest
    }
}
albinhubsch commented 3 years ago

@christocracy thanks, but overriding these values even to latest, results in the same build errors...

christocracy commented 3 years ago

but overriding these values even to latest

You must be sure to align those versions to the same version used in your other plugins, which is not necessarily the latest.

To see what dependencies each plugin requests:

$ cd android
$ ./gradlew app:dependencies

This will print a variety of trees for debug, release, test. They're all about the same.

albinhubsch commented 3 years ago

thanks for the help! apparently there is a problem with the latest firestore package. Rolling back to 21.4.2 solves the issue temporarly.

christocracy commented 3 years ago

Please close your issues when solved.