Closed habil-yaway closed 6 months ago
I do not have a OnePlus device running Android 13 (OnePlus A5010 @ 9.0.0).
My only Android 13 devices are
I cannot reproduce any problem on these devices using your reproduction steps.
Also, the stacktrace does not reference anything from the plugin (com.transistorsoft
)
I notice you are also using the geolocator
plugin: ("Geolocator foreground service connected").
Yes, that is the problem also we are experiencing. Basically, we can only reproduce it only on the single device.
There are references to TSLocationmanager just before crash. Moreover, even we removed geolocator from our app just to make sure if there is some conflict between plugins, it crashed again.
However, when we do not start the flutter_background_geolocation plugin in the app. Everything works fine.
Have you searched your error?
java.lang.SecurityException: GoogleCertificatesRslt: not allowed: pkg=com.example.app
Have you searched your error?
java.lang.SecurityException: GoogleCertificatesRslt: not allowed: pkg=com.example.app
Yes, it is not related to the crash. In addition to that we have reproduced it in the example app in play store. The app crashes in background on airplane mode toggle. Please see the attached video.
You can disable TSLocationManagerActivuty with Config.disableLocationAuthorizationAlert
You can disable TSLocationManagerActivuty with Config.disableLocationAuthorizationAlert
Thanks for the quick reply @christocracy . Could you please elaborate on the config's relevance to the issue. Do you mean that this can prevent crash, as it will not register listeners for the provider?
Read the api docs. Try it and see.
Hello @christocracy, I must say, I had the same issue, which was fixed by disabling this config (setting to true). Wouldn't be helpful to fix or mention this issue in docs? I mean, this must be problem all around newer Androids.
Plugin version: 4.13.3 (happened in 4.10.1 also) Platform: Android OS version: Android 13 Device manufacturer / model: Samsung SM M135F
[√] Flutter (Channel stable, 3.13.9, on Microsoft Windows [Version 10.0.22621.2506], locale cs-CZ)
• Flutter version 3.13.9 on channel stable at C:\Users\coman\fvm\versions\3.13.9
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision d211f42860 (8 days ago), 2023-10-25 13:42:25 -0700
• Engine revision 0545f8705d
• Dart version 3.1.5
• DevTools version 2.25.0
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
• Android SDK at C:\Users\coman\AppData\Local\Android\sdk
• Platform android-TiramisuPrivacySandbox, build-tools 33.0.1
• Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
• Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[!] Visual Studio - develop Windows apps (Visual Studio Build Tools 2017 15.9.33)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools
• Visual Studio Build Tools 2017 version 15.9.28307.1401
• Windows 10 SDK version 10.0.17763.0
X Visual Studio 2019 or later is required.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2022.2)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• android-studio-dir = C:\Program Files\Android\Android Studio
• Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694)
[√] VS Code (version 1.83.1)
• VS Code at C:\Users\coman\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.74.0
[√] Connected device (4 available)
• SM M135F (mobile) • RF8T807H77A • android-arm • Android 13 (API 33)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22621.2506]
• Chrome (web) • chrome • web-javascript • Google Chrome 118.0.5993.90
• Edge (web) • edge • web-javascript • Microsoft Edge 118.0.2088.76
[√] Network resources
• All expected network resources are available.
locationTimeout: 10,
httpTimeout: 10000,
desiredAccuracy: bg.Config.DESIRED_ACCURACY_HIGH,
disableElasticity: false,
heartbeatInterval: 60,
logLevel: bg.Config.LOG_LEVEL_DEBUG,
stopOnTerminate: false,
startOnBoot: true,
debug: false, //means sound off
reset: true,
locationAuthorizationRequest: 'Always',
persistMode: bg.Config.PERSIST_MODE_LOCATION,
notification: bg.Notification(
smallIcon: 'drawable/notification_icon',
largeIcon: 'drawable/notification_icon',
title: 'geolocation_service_notification_title'.tr,
text: 'geolocation_service_notification_text'.tr,
sticky: true,
),
httpRootProperty: ".",
locationsOrderDirection: 'DESC',
// maxRecordsToPersist: 1000,
autoSync: false,
batchSync: true,
maxBatchSize: 10,
stopTimeout: 0,
stopOnStationary: false,
maxDaysToPersist: 2,
logMaxDays: 2,
backgroundPermissionRationale: bg.PermissionRationale(
title: 'geolocation_service_permission_title'.tr,
message: 'geolocation_service_permission_body'.tr, //"This app collects location data to enable reporting of your location to your employer. This data is transmitted to your employer's servers and is not shared with any third parties."
positiveAction: 'geolocation_service_permission_positive_action'.tr,
negativeAction: 'geolocation_service_permission_negative_action'.tr,
disableLocationAuthorizationAlert: true
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
It is very hard to reproduce it as we could only do it in OnePlus Android 13 and the problem is that when the app is put to background and airplane mode is toggled on/off the app crashes which is initiated by disappearance of the sticky notification.
The problem does not happen if the background location process has not started(lets say the user is in login screen and the location tracking is not started before login)
Your Environment
Plugin version: 4.10.1 (happened in 4.8.3 also)
Platform: iOS or Android
OS version: Android 13
Device manufacturer / model: Oneplus LE2123
Flutter info (
flutter doctor
):Doctor summary (to see all details, run flutter doctor -v):
Plugin config:
build.gradle
allprojects { repositories { google() mavenCentral()
}
rootProject.buildDir = '../build' subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects { project.evaluationDependsOn(':app') }
task clean(type: Delete) { delete rootProject.buildDir }
def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { localPropertiesFile.withReader('UTF-8') { reader -> localProperties.load(reader) } }
def flutterRoot = localProperties.getProperty('flutter.sdk') if (flutterRoot == null) { throw new GradleException('Flutter SDK not found. Define location with flutter.sdk in the local.properties file.') }
def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { flutterVersionCode = '1' }
def flutterVersionName = localProperties.getProperty('flutter.versionName') if (flutterVersionName == null) { flutterVersionName = '1.0' }
apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'com.google.gms.google-services' apply plugin: 'com.google.firebase.crashlytics' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
// flutter_background_geolocation (must be placed after the lines above) Project background_geolocation = project(':flutter_background_geolocation') apply from: "${background_geolocation.projectDir}/background_geolocation.gradle"
def keystoreProperties = new Properties() def keystorePropertiesFile = rootProject.file('key.properties') if (keystorePropertiesFile.exists()) { keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) }
android { compileSdkVersion rootProject.ext.compileSdkVersion
}
flutter { source '../..' }
dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${rootProject.ext.kotlin_version}" implementation "androidx.appcompat:appcompat:${rootProject.ext.appCompatVersion}" }
D/OplusScrollToTopManager(30206): java.lang.IllegalArgumentException: Receiver not registered: android.view.OplusScrollToTopManager$2@1901272 V/ZoomWindowDecorView(30206): removeZoomView D/VRITSLocationManagerActivity: setWindowStopped stopped:true D/OplusScrollToTopManager(30206): unregisterGuidePopupDismissReceiverInSystemUI D/OplusScrollToTopManager(30206): Receiver not registered: android.view.OplusScrollToTopManager$1@b2b7dca D/OplusScrollToTopManager(30206): unregisterSystemUIBroadcastReceiver D/OplusScrollToTopManager(30206): java.lang.IllegalArgumentException: Receiver not registered: android.view.OplusScrollToTopManager$2@6144b3b V/ZoomWindowDecorView(30206): removeZoomView D/BufferQueueProducer(30206): VRI[TSLocationManagerActivity]#11(BLAST Consumer)11 disconnect: api 1 D/BufferQueueConsumer(30206): VRI[TSLocationManagerActivity]#11(BLAST Consumer)11 disconnect