transistorsoft / flutter_background_geolocation

Sophisticated, battery-conscious background-geolocation & geofencing with motion-detection
https://www.transistorsoft.com/shop/products/flutter-background-geolocation
Other
643 stars 237 forks source link

Startup and general running full of Caused by: java.lang.ClassNotFoundException: Didn't find class "com.engage.BuildConfig" #435

Closed billysmt closed 3 years ago

billysmt commented 3 years ago

Your Environment

Expected Behavior

Startup without Errors filling the logs

Actual Behavior

Starts up, appears to work but there's lots of errors in the logs related to com.engage.BuildConfig not being present. I don't remember seeing that beforehand.

Steps to Reproduce

  1. Startup app.

Context

General Geo Fence and breadcrumb tracking.

Debug logs

Logs ``` Waiting for Pixel 3 XL to report its views... I/TSLocationManager( 8739): [c.t.l.BootReceiver$a run] I/TSLocationManager( 8739): ╔═════════════════════════════════════════════ I/TSLocationManager( 8739): ║ BootReceiver: com.engage I/TSLocationManager( 8739): ╠═════════════════════════════════════════════ I/TSLocationManager( 8739): ╟─ android.intent.action.MY_PACKAGE_REPLACED D/TSBackgroundFetch( 8739): BootReceiver: android.intent.action.MY_PACKAGE_REPLACED D/TSLocationManager( 8739): [c.t.l.g.TSGeofenceManager c] ℹ️ Persist monitored geofences: [] E/TSLocationManager( 8739): [c.t.locationmanager.util.a d] E/TSLocationManager( 8739): ‼️ Failed to deduce Application's BuildConfig class for package name:com.engage or com W/System.err( 8739): java.lang.ClassNotFoundException: com.engage.BuildConfig W/System.err( 8739): at java.lang.Class.classForName(Native Method) W/System.err( 8739): at java.lang.Class.forName(Class.java:454) W/System.err( 8739): at java.lang.Class.forName(Class.java:379) W/System.err( 8739): at com.transistorsoft.locationmanager.util.a.d(Unknown Source:37) W/System.err( 8739): at com.transistorsoft.locationmanager.util.a.a(Unknown Source:11) W/System.err( 8739): at com.transistorsoft.locationmanager.util.a.b(Unknown Source:0) W/System.err( 8739): at com.transistorsoft.locationmanager.adapter.BackgroundGeolocation.isMainActivityActive(Unknown Source:103) W/System.err( 8739): at com.transistorsoft.locationmanager.BootReceiver.a(Unknown Source:24) W/System.err( 8739): at com.transistorsoft.locationmanager.BootReceiver.a(Unknown Source:0) W/System.err( 8739): at com.transistorsoft.locationmanager.BootReceiver$a.run(Unknown Source:117) W/System.err( 8739): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) W/System.err( 8739): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) W/System.err( 8739): at java.lang.Thread.run(Thread.java:923) W/System.err( 8739): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.engage.BuildConfig" on path: DexPathList[[zip file "/data/app/~~oVGAcPPM-R_Ecr3DIPrMnA==/com.engage-JXaudjbMEIVTvG4pNdLrNQ==/base.apk"],nativeLibraryDirectories=[/data/app/~~oVGAcPPM-R_Ecr3DIPrMnA==/com.engage-JXaudjbMEIVTvG4pNdLrNQ==/lib/arm64, /data/app/~~oVGAcPPM-R_Ecr3DIPrMnA==/com.engage-JXaudjbMEIVTvG4pNdLrNQ==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64, /product/lib64]] W/System.err( 8739): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:207) W/System.err( 8739): at java.lang.ClassLoader.loadClass(ClassLoader.java:379) W/System.err( 8739): at java.lang.ClassLoader.loadClass(ClassLoader.java:312) W/System.err( 8739): ... 13 more D/TSLocationManager( 8739): [c.t.l.a.BackgroundGeolocation isMainActivityActive] NO W/TSLocationManager( 8739): [c.t.l.BootReceiver a] W/TSLocationManager( 8739): ⚠️ Plugin is configured to stopOnTerminate: true. Refusing to start BackgroundGeolocation on boot ```
christocracy commented 3 years ago

This is not a crash. The plugin is catching this exception and rendering the stacktrace you see here. However, there seems to be a problem in your android config.

Show me the following files:

christocracy commented 3 years ago

There it is.

They're supposed to be the same.

christocracy commented 3 years ago

Btw, you don't want to be releasing with debuggable true. That would be a big security hole in your app.

buildTypes {
        release {
            // TODO: Add your own signing config for the release build.
            // Signing with the debug keys for now, so `flutter run --release` works.
            debuggable true