LinusU / flutter_web_auth

Flutter plugin for authenticating a user with a web service
MIT License
197 stars 169 forks source link

Cannot login with physical android 12 device #122

Closed snorreks closed 1 year ago

snorreks commented 2 years ago

Bug report

Describe the bug The app crashes on physical Android 12 devices. It works on android 11 and under and ios. It also works on emulated android device version 31. It does not crash on launch, but after i login.

Video ![web_auth_fail_android_12](https://user-images.githubusercontent.com/36089469/171833083-b047ed7b-baf7-4362-95c9-58dd4ff452d0.gif)

Steps to reproduce

Steps to reproduce the behavior:

  1. Get a physical Android 12 device,
  2. Emulate or use release mode.
  3. See that the app crashes with no error on the debugger.

Expected behavior

The app to not crash.


Additional context

image

app/build.gradle ```gradle 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 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: 'com.google.gms.google-services' apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply plugin: 'com.google.firebase.appdistribution' apply plugin: 'com.google.firebase.crashlytics' def keystoreProperties = new Properties() def keystorePropertiesFile = rootProject.file('key.properties') if (keystorePropertiesFile.exists()) { keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) } android { compileSdkVersion 32 // for CI: // buildToolsVersion "30.0.2" // ndkVersion "21.3.6528147" //<- https://github.com/televindu/televindu_flutter/runs/944194269?check_suite_focus=true sourceSets { main.java.srcDirs += 'src/main/kotlin' } defaultConfig { applicationId "com.televindu.televindu_mobile" minSdkVersion 21 targetSdkVersion 30 versionCode flutterVersionCode.toInteger() versionName flutterVersionName // configurations.all { // resolutionStrategy.force 'androidx.core:core-ktx:1.7.0' // resolutionStrategy.force 'androidx.work:work-runtime:2.7.1' // } configurations.all { resolutionStrategy.force 'androidx.core:core-ktx:1.6.0' resolutionStrategy.force 'androidx.work:work-runtime:2.5.0' } } signingConfigs { release { keyAlias keystoreProperties['keyAlias'] keyPassword keystoreProperties['keyPassword'] storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null storePassword keystoreProperties['storePassword'] } } buildTypes { release { minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile( 'proguard-android-optimize.txt'), 'proguard-rules.pro' signingConfig signingConfigs.release } debug { minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile( 'proguard-android-optimize.txt'), 'proguard-rules.pro' } } flavorDimensions "default" productFlavors { dev { dimension "default" applicationIdSuffix ".dev" firebaseAppDistribution{ serviceCredentialsFile="./televindu-dev-firebase-app-distribution.json" releaseNotesFile="../distribution/release-notes.txt" groups="televindu-core-android" } resValue "string", "app_name", "Televindu DEV" } prod { dimension "default" firebaseAppDistribution{ serviceCredentialsFile="./televindu-prod-firebase-app-distribution.json" releaseNotesFile="../distribution/release-notes.txt" groups="televindu-core-android" // testers="snorrestrand@hotmail.com,snorristrand@gmail.com" } resValue "string", "app_name", "Televindu" } } lint { checkReleaseBuilds false } } flutter { source '../..' } dependencies { // fixes crash for android 12: https://stackoverflow.com/questions/71002036/flutter-app-crashes-on-startup-on-android-12 implementation 'androidx.work:work-runtime-ktx:2.7.0' // or 2.7.0 //implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'com.google.firebase:firebase-analytics-ktx:21.0.0' } // rootProject.ext { // set('FlutterFire', [ // FirebaseSDKVersion: '30.1.0' // ]) // } apply plugin: 'com.google.firebase.crashlytics' ```
build.gradle ```gradle buildscript { ext.kotlin_version = '1.6.21' repositories { google() mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:7.2.1' // 7.2.1 classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.google.gms:google-services:4.3.10' classpath 'com.google.firebase:firebase-appdistribution-gradle:3.0.2' classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.0' } } 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 } // Deploys prod apk to firebase app distribution task deployBetaProd(type: GradleBuild) { // tasks = ['clean', 'bundleProdRelease', 'appDistributionUploadProdRelease'] tasks = ['clean', 'assembleProdRelease', 'appDistributionUploadProdRelease'] } // Deploys dev apk to firebase app distribution // does not work because you can't change the entry point from gradle // task deployBetaDev(type: GradleBuild) { // tasks = ['clean', 'assembleDevRelease', 'appDistributionUploadDevRelease'] // } ```
AndroidManifest.xml ```xml ```

It gives no error when debugging, but in release mode firebase crashlytics gives these 4 errors:

Click To Expand ``` Fatal Exception: java.lang.RuntimeException: Internal error in Cloud Firestore (24.1.2). at com.google.firebase.firestore.util.AsyncQueue.lambda$panic$3(AsyncQueue.java:19) at com.google.firebase.firestore.util.AsyncQueue.$r8$lambda$jx84dqgUsF4ojecSMurRqFLFD1Y(AsyncQueue.java) at com.google.firebase.firestore.util.AsyncQueue$$InternalSyntheticLambda$0$ee0bb9e76d873eb0dc9297d9a9af24cf74be4371507e5d9f6cdb6af965a9e57b$0.run(AsyncQueue.java:2) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8669) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135) Caused by java.lang.RuntimeException: android.database.sqlite.SQLiteDatabaseLockedException: database is locked (code 5 SQLITE_BUSY[5]) at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor.lambda$executeAndReportResult$1(AsyncQueue.java:14) at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor.$r8$lambda$pKSAgg-ozJ8RbUveSl-44aUfFQw(AsyncQueue.java) at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor$$InternalSyntheticLambda$0$95de3fe42c0779a1a6f9a758e3e16db92df4cad518a77e72fc65081d6b20c3b9$0.run(AsyncQueue.java:4) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor$DelayedStartFactory.run(AsyncQueue.java:15) at java.lang.Thread.run(Thread.java:920) Caused by android.database.sqlite.SQLiteDatabaseLockedException: database is locked (code 5 SQLITE_BUSY[5]) at android.database.sqlite.SQLiteConnection.nativeExecute(SQLiteConnection.java) at android.database.sqlite.SQLiteConnection.execute(SQLiteConnection.java:972) at android.database.sqlite.SQLiteSession.beginTransactionUnchecked(SQLiteSession.java:325) at android.database.sqlite.SQLiteSession.beginTransaction(SQLiteSession.java:300) at android.database.sqlite.SQLiteDatabase.beginTransaction(SQLiteDatabase.java:788) at android.database.sqlite.SQLiteDatabase.beginTransactionWithListener(SQLiteDatabase.java:751) at com.google.firebase.firestore.local.SQLitePersistence.runTransaction(SQLitePersistence.java:17) at com.google.firebase.firestore.local.SQLiteOverlayMigrationManager.buildOverlays(SQLiteOverlayMigrationManager.java:9) at com.google.firebase.firestore.local.SQLiteOverlayMigrationManager.run(SQLiteOverlayMigrationManager.java) at com.google.firebase.firestore.local.LocalStore.start(LocalStore.java:6) at com.google.firebase.firestore.core.ComponentProvider.initialize(ComponentProvider.java:47) at com.google.firebase.firestore.core.FirestoreClient.initialize(FirestoreClient.java:67) at com.google.firebase.firestore.core.FirestoreClient.lambda$new$0(FirestoreClient.java:10) at com.google.firebase.firestore.core.FirestoreClient.$r8$lambda$Eq-cAcb1C1mM4tyiJsLJXZ13tyU(FirestoreClient.java) at com.google.firebase.firestore.core.FirestoreClient$$InternalSyntheticLambda$0$f33e263c3cee9a0ce399719ae996e83db9899b905b604f0026f386f25873b9bf$0.run(FirestoreClient.java:8) at com.google.firebase.firestore.util.AsyncQueue.lambda$enqueue$2(AsyncQueue.java) at com.google.firebase.firestore.util.AsyncQueue.$r8$lambda$Y9GO7zO2DX6MzQJ5TbKtKW_NzO0(AsyncQueue.java) at com.google.firebase.firestore.util.AsyncQueue$$InternalSyntheticLambda$0$4399d783a0d8f0074ae435e785e055127cfe34cdd1cdc777be135eed1bc8dc17$0.call(AsyncQueue.java:2) at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor.lambda$executeAndReportResult$1(AsyncQueue.java) at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor.$r8$lambda$pKSAgg-ozJ8RbUveSl-44aUfFQw(AsyncQueue.java) at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor$$InternalSyntheticLambda$0$95de3fe42c0779a1a6f9a758e3e16db92df4cad518a77e72fc65081d6b20c3b9$0.run(AsyncQueue.java:4) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor$DelayedStartFactory.run(AsyncQueue.java:15) at java.lang.Thread.run(Thread.java:920) Fatal Exception: java.lang.IllegalArgumentException: com.televindu.televindu_mobile.dev: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles. at android.app.PendingIntent.checkFlags(PendingIntent.java:382) at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:673) at android.app.PendingIntent.getBroadcast(PendingIntent.java:660) at androidx.work.impl.utils.ForceStopRunnable.getPendingIntent(ForceStopRunnable.java:5) at androidx.work.impl.utils.ForceStopRunnable.isForceStopped(ForceStopRunnable.java:4) at androidx.work.impl.utils.ForceStopRunnable.forceStopRunnable(ForceStopRunnable.java:39) at androidx.work.impl.utils.ForceStopRunnable.run(ForceStopRunnable.java:26) at androidx.work.impl.utils.SerialExecutor$Task.run(SerialExecutor.java:2) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:920) ```

Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand ``` Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 3.0.1, on Microsoft Windows [Version 10.0.22000.675], locale en-US) [√] Android toolchain - develop for Android devices (Android SDK version 30.0.3) [√] Chrome - develop for the web [!] Visual Studio - develop for Windows (Visual Studio Professional 2017 15.9.27) 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 2021.2) [√] VS Code (version 1.67.2) [√] Connected device (4 available) [√] HTTP Host Availability ! Doctor found issues in 1 category. ```

Flutter dependencies

Run flutter pub deps -- --style=compact and paste the output below:

Click To Expand ``` Dart SDK 2.17.1 Flutter SDK 3.0.1 televindu_flutter 2.5.1+172 dependencies: - algolia 1.1.1 [meta http uuid universal_io] - auto_size_text 3.0.0 [flutter] - cached_network_image 3.2.1 [flutter flutter_cache_manager octo_image cached_network_image_platform_interface cached_network_image_web] - cast 1.1.1 [bonsoir flutter protobuf] - cloud_firestore 3.1.17 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta] - cloud_functions 3.2.16 [cloud_functions_platform_interface cloud_functions_web firebase_core firebase_core_platform_interface flutter] - collection 1.16.0 - connectivity_plus 2.3.2 [flutter connectivity_plus_platform_interface connectivity_plus_linux connectivity_plus_macos connectivity_plus_web connectivity_plus_windows] - diacritic 0.1.3 - email_validator 2.0.1 - firebase_analytics 9.1.9 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter] - firebase_auth 3.3.19 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta] - firebase_core 1.17.1 [firebase_core_platform_interface firebase_core_web flutter meta] - firebase_crashlytics 2.8.1 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace] - firebase_messaging 11.4.1 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta] - firebase_performance 0.8.0+13 [firebase_core firebase_core_platform_interface firebase_performance_platform_interface firebase_performance_web flutter] - firebase_remote_config 2.0.8 [firebase_core firebase_core_platform_interface firebase_remote_config_platform_interface firebase_remote_config_web flutter] - firebase_storage 10.2.17 [firebase_core firebase_core_platform_interface firebase_storage_platform_interface firebase_storage_web flutter] - flash 2.0.3+2 [flutter] - flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine] - flutter_downloader 1.8.0+1 [flutter] - flutter_localizations 0.0.0 [flutter intl characters clock collection material_color_utilities meta path vector_math] - flutter_rating_bar 4.0.1 [flutter] - flutter_riverpod 1.0.4 [collection flutter meta riverpod state_notifier] - flutter_svg 1.1.0 [flutter meta path_drawing vector_math xml] - flutter_video_info 1.2.0 [flutter path] - flutter_web_auth 0.4.1 [flutter flutter_web_plugins] - geoflutterfire 3.0.3 [flutter cloud_firestore rxdart flutter_lints] - geolocator 8.2.1 [flutter geolocator_platform_interface geolocator_android geolocator_apple geolocator_web geolocator_windows] - hive 2.2.1 [meta crypto] - hive_flutter 1.1.0 [flutter hive path_provider path] - http 0.13.4 [async http_parser meta path] - image_picker 0.8.5+3 [flutter image_picker_android image_picker_for_web image_picker_ios image_picker_platform_interface] - intl 0.17.0 [clock path] - introduction_screen 3.0.2 [flutter dots_indicator collection] - logger 1.1.0 - mime 1.0.2 - package_info_plus 1.4.2 [flutter package_info_plus_platform_interface package_info_plus_linux package_info_plus_macos package_info_plus_windows package_info_plus_web] - path_provider 2.0.10 [flutter path_provider_android path_provider_ios path_provider_linux path_provider_macos path_provider_platform_interface path_provider_windows] - permission_handler 9.2.0 [flutter meta permission_handler_android permission_handler_apple permission_handler_windows permission_handler_platform_interface] - responsive_builder 0.4.2 [flutter] - rflutter_alert 2.0.4 [flutter] - rxdart 0.27.4 - shimmer 2.0.0 [flutter] - url_launcher 6.1.2 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows] - video_player 2.4.2 [flutter html video_player_android video_player_avfoundation video_player_platform_interface video_player_web] - video_thumbnail 0.5.0 [flutter] - wakelock 0.6.1+2 [flutter meta wakelock_macos wakelock_platform_interface wakelock_web wakelock_windows] - webview_flutter 3.0.4 [flutter webview_flutter_android webview_flutter_platform_interface webview_flutter_wkwebview] dev dependencies: - flutter_launcher_icons 0.9.2 [args image path yaml] - flutter_native_splash 2.2.2 [args flutter flutter_web_plugins image js lint meta path universal_io xml yaml] - flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher material_color_utilities meta source_span stream_channel string_scanner term_glyph] - mockito 5.2.0 [analyzer build code_builder collection dart_style matcher meta path source_gen test_api] transitive dependencies: - _fe_analyzer_shared 40.0.0 [meta] - analyzer 4.1.0 [_fe_analyzer_shared collection convert crypto glob meta package_config path pub_semver source_span watcher yaml] - archive 3.3.0 [crypto path] - args 2.3.1 - async 2.8.2 [collection meta] - bonsoir 1.0.1+2 [flutter bonsoir_platform_interface] - bonsoir_platform_interface 1.1.0+1 [flutter meta plugin_platform_interface] - boolean_selector 2.1.0 [source_span string_scanner] - build 2.3.0 [analyzer async convert crypto glob logging meta path] - built_collection 5.1.1 - built_value 8.3.2 [built_collection collection fixnum meta] - cached_network_image_platform_interface 1.0.0 [flutter flutter_cache_manager] - cached_network_image_web 1.0.1 [flutter flutter_cache_manager cached_network_image_platform_interface] - characters 1.2.0 - charcode 1.3.1 - clock 1.1.0 - cloud_firestore_platform_interface 5.5.7 [collection firebase_core flutter meta plugin_platform_interface] - cloud_firestore_web 2.6.16 [cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins js] - cloud_functions_platform_interface 5.1.7 [firebase_core flutter meta plugin_platform_interface] - cloud_functions_web 4.2.15 [cloud_functions_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - code_builder 4.1.0 [built_collection built_value collection matcher meta] - connectivity_plus_linux 1.3.1 [flutter connectivity_plus_platform_interface meta nm] - connectivity_plus_macos 1.2.2 [connectivity_plus_platform_interface flutter] - connectivity_plus_platform_interface 1.2.1 [flutter meta plugin_platform_interface] - connectivity_plus_web 1.2.1 [connectivity_plus_platform_interface flutter_web_plugins flutter] - connectivity_plus_windows 1.2.1 [connectivity_plus_platform_interface flutter] - convert 3.0.2 [typed_data] - cross_file 0.3.3+1 [js meta] - crypto 3.0.2 [typed_data] - csslib 0.17.2 [source_span] - dart_style 2.2.3 [analyzer args path pub_semver source_span] - dbus 0.7.4 [args ffi meta xml] - dots_indicator 2.1.0 [flutter] - fake_async 1.3.0 [clock collection] - ffi 1.2.1 - file 6.1.2 [meta path] - firebase 9.0.3 [http http_parser js] - firebase_analytics_platform_interface 3.1.7 [firebase_core flutter meta plugin_platform_interface] - firebase_analytics_web 0.4.0+14 [firebase_analytics_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - firebase_auth_platform_interface 6.2.7 [firebase_core flutter meta plugin_platform_interface] - firebase_auth_web 3.3.16 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta] - firebase_core_platform_interface 4.4.0 [collection flutter meta plugin_platform_interface] - firebase_core_web 1.6.4 [firebase_core_platform_interface flutter flutter_web_plugins js meta] - firebase_crashlytics_platform_interface 3.2.7 [collection firebase_core flutter meta plugin_platform_interface] - firebase_messaging_platform_interface 3.5.1 [firebase_core flutter meta plugin_platform_interface] - firebase_messaging_web 2.4.1 [firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta] - firebase_performance_platform_interface 0.1.1+7 [firebase_core flutter plugin_platform_interface] - firebase_performance_web 0.1.0+13 [firebase firebase_core firebase_core_web firebase_performance_platform_interface flutter flutter_web_plugins js] - firebase_remote_config_platform_interface 1.1.7 [firebase_core flutter meta plugin_platform_interface] - firebase_remote_config_web 1.0.13 [firebase_core firebase_core_web firebase_remote_config_platform_interface flutter flutter_web_plugins js] - firebase_storage_platform_interface 4.1.7 [collection firebase_core flutter meta plugin_platform_interface] - firebase_storage_web 3.2.16 [async firebase_core firebase_core_web firebase_storage_platform_interface flutter flutter_web_plugins http js meta] - fixnum 1.0.1 - flutter_blurhash 0.7.0 [flutter] - flutter_cache_manager 3.3.0 [clock collection file flutter http path path_provider pedantic rxdart sqflite uuid] - flutter_lints 1.0.4 [lints] - flutter_plugin_android_lifecycle 2.0.6 [flutter] - flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math] - geolocator_android 3.1.8 [flutter geolocator_platform_interface] - geolocator_apple 2.1.4 [flutter geolocator_platform_interface] - geolocator_platform_interface 4.0.5 [flutter plugin_platform_interface vector_math meta] - geolocator_web 2.1.5 [flutter flutter_web_plugins geolocator_platform_interface] - geolocator_windows 0.1.1 [flutter geolocator_platform_interface] - glob 2.0.2 [async collection file path string_scanner] - html 0.15.0 [csslib source_span] - http_parser 4.0.1 [collection source_span string_scanner typed_data] - image 3.2.0 [archive meta xml] - image_picker_android 0.8.4+13 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface] - image_picker_for_web 2.1.8 [flutter flutter_web_plugins image_picker_platform_interface] - image_picker_ios 0.8.5+5 [flutter image_picker_platform_interface] - image_picker_platform_interface 2.5.0 [cross_file flutter http plugin_platform_interface] - js 0.6.4 - lint 1.8.2 - lints 1.0.1 - logging 1.0.2 - matcher 0.12.11 [stack_trace] - material_color_utilities 0.1.4 - meta 1.7.0 - nm 0.5.0 [dbus] - octo_image 1.0.2 [flutter flutter_blurhash] - package_config 2.0.2 [path] - package_info_plus_linux 1.0.5 [package_info_plus_platform_interface flutter path] - package_info_plus_macos 1.3.0 [flutter] - package_info_plus_platform_interface 1.0.2 [flutter meta plugin_platform_interface] - package_info_plus_web 1.0.5 [flutter flutter_web_plugins http meta package_info_plus_platform_interface] - package_info_plus_windows 1.0.5 [package_info_plus_platform_interface ffi flutter win32] - path 1.8.1 - path_drawing 1.0.0 [vector_math meta path_parsing flutter] - path_parsing 1.0.0 [vector_math meta] - path_provider_android 2.0.14 [flutter path_provider_platform_interface] - path_provider_ios 2.0.9 [flutter path_provider_platform_interface] - path_provider_linux 2.1.7 [ffi flutter path path_provider_platform_interface xdg_directories] - path_provider_macos 2.0.6 [flutter path_provider_platform_interface] - path_provider_platform_interface 2.0.4 [flutter platform plugin_platform_interface] - path_provider_windows 2.0.7 [ffi flutter path path_provider_platform_interface win32] - pedantic 1.11.1 - permission_handler_android 9.0.2+1 [flutter permission_handler_platform_interface] - permission_handler_apple 9.0.4 [flutter permission_handler_platform_interface] - permission_handler_platform_interface 3.7.0 [flutter meta plugin_platform_interface] - permission_handler_windows 0.1.0 [flutter permission_handler_platform_interface] - petitparser 5.0.0 [meta] - platform 3.1.0 - plugin_platform_interface 2.1.2 [meta] - process 4.2.4 [file path platform] - protobuf 2.0.1 [fixnum collection] - pub_semver 2.1.1 [collection meta] - riverpod 1.0.3 [collection meta state_notifier] - sky_engine 0.0.99 - source_gen 1.2.2 [analyzer async build dart_style glob meta path source_span yaml] - source_span 1.8.2 [collection path term_glyph] - sqflite 2.0.2+1 [flutter sqflite_common path] - sqflite_common 2.2.1+1 [synchronized path meta] - stack_trace 1.10.0 [path] - state_notifier 0.7.2+1 [meta] - stream_channel 2.1.0 [async] - string_scanner 1.1.0 [charcode source_span] - synchronized 3.0.0+2 - term_glyph 1.2.0 - test_api 0.4.9 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher] - typed_data 1.3.1 [collection] - universal_io 2.0.4 [collection crypto meta typed_data] - url_launcher_android 6.0.17 [flutter url_launcher_platform_interface] - url_launcher_ios 6.0.17 [flutter url_launcher_platform_interface] - url_launcher_linux 3.0.1 [flutter url_launcher_platform_interface] - url_launcher_macos 3.0.1 [flutter url_launcher_platform_interface] - url_launcher_platform_interface 2.0.5 [flutter plugin_platform_interface] - url_launcher_web 2.0.11 [flutter flutter_web_plugins url_launcher_platform_interface] - url_launcher_windows 3.0.1 [flutter url_launcher_platform_interface] - uuid 3.0.6 [crypto] - vector_math 2.1.2 - video_player_android 2.3.5 [flutter video_player_platform_interface] - video_player_avfoundation 2.3.4 [flutter video_player_platform_interface] - video_player_platform_interface 5.1.2 [flutter plugin_platform_interface] - video_player_web 2.0.10 [flutter flutter_web_plugins video_player_platform_interface] - wakelock_macos 0.4.0 [flutter flutter_web_plugins wakelock_platform_interface] - wakelock_platform_interface 0.3.0 [flutter meta] - wakelock_web 0.4.0 [flutter flutter_web_plugins js wakelock_platform_interface] - wakelock_windows 0.2.0 [flutter wakelock_platform_interface win32] - watcher 1.0.1 [async path] - webview_flutter_android 2.8.9 [flutter webview_flutter_platform_interface] - webview_flutter_platform_interface 1.9.0 [flutter meta plugin_platform_interface] - webview_flutter_wkwebview 2.8.0 [flutter path webview_flutter_platform_interface] - win32 2.6.1 [ffi] - xdg_directories 0.2.0+1 [meta path process] - xml 6.1.0 [collection meta petitparser] - yaml 3.1.1 [collection source_span string_scanner] ```

snorreks commented 2 years ago

found out the issue! It is because the real android 12 device had both the production app and dev app installed. And it crashed when both flavors where installed on the phone. It must be something with productFlavors in build.gradle with android 12 devices.

so the dev app and prod app are having a conflict when logging in. When logging in with the dev flavor (app id: com.televindu.televindu_mobile.dev) it opens up the production app (com.televindu.televindu_mobile) in the background and crashes. This happens on sdk versions 31 and higher.

I still think this is an issue regarding this package, so I will keep the issue open.

harrowmykel commented 1 year ago

Please read the trouble shooting section at the bottom of the readme.md in

https://github.com/harrowmykel/flutter_web_auth#troubleshooting

LinusU commented 1 year ago

It is because the real android 12 device had both the production app and dev app installed. And it crashed when both flavors where installed on the phone.

so the dev app and prod app are having a conflict when logging in. When logging in with the dev flavor (app id: com.televindu.televindu_mobile.dev) it opens up the production app (com.televindu.televindu_mobile) in the background and crashes. This happens on sdk versions 31 and higher.

I'm not sure what we could do to work around this, if they both register the same callback scheme. I would recommend using different callback schemes for your production and dev application.

If you can show a way with native Android code that can handle the case of the same callback scheme over two apps, I'd be happy to implement that. But since I believe this to be a limitation in the underlying platform there isn't really anything actionable for me here currently...