Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flutter app crushes on Android release build #4616

Open
2 of 14 tasks
Karjan1 opened this issue Mar 28, 2024 · 15 comments
Open
2 of 14 tasks

Flutter app crushes on Android release build #4616

Karjan1 opened this issue Mar 28, 2024 · 15 comments
Assignees
Labels
Build Issues related to building apps using Amplify flutter Investigating Issues that are assigned and are being looked into question A question about the Amplify Flutter libraries

Comments

@Karjan1
Copy link

Karjan1 commented Mar 28, 2024

Description

There are no errors when running on emulator. Release build works on ios but crushes on Android right after app starts.
Tried with releases of amplify_auth_cognito 1.7.2 and 1.6.2.
App is published in ios/play store. Issue happens on version released to internal testers.
Tried local build and using Codemagic.
With Sentry and Proguard I git a following stacktrace

java.lang.NoSuchMethodException: U.u0.values []
    at java.lang.Class.getMethod(Class.java:2103)
    at java.lang.Class.getDeclaredMethod(Class.java:2081)
    at java.lang.Enum.enumValues(Enum.java:267)
    at java.lang.Enum.access$000(Enum.java:61)
    at java.lang.Enum$1.create(Enum.java:277)
    at java.lang.Enum$1.create(Enum.java:275)
    at libcore.util.BasicLruCache.get(BasicLruCache.java:63)
    at java.lang.Enum.getSharedConstants(Enum.java:289)
    at java.lang.Class.getEnumConstantsShared(Class.java:2459)
    at java.util.EnumMap.getKeyUniverse(EnumMap.java:755)
    at java.util.EnumMap.<init>(EnumMap.java:138)
    at com.google.crypto.tink.daead.internal.AesSivProtoSerialization.createOutputPrefixToVariantMap(AesSivProtoSerialization.java:84)
    at com.google.crypto.tink.daead.internal.AesSivProtoSerialization.<clinit>(AesSivProtoSerialization.java:101)
    at com.google.crypto.tink.daead.internal.AesSivProtoSerialization.register(AesSivProtoSerialization.java:206)
    at com.google.crypto.tink.daead.AesSivKeyManager.register(AesSivKeyManager.java:181)
    at com.google.crypto.tink.daead.DeterministicAeadConfig.register(DeterministicAeadConfig.java:98)
    at com.google.crypto.tink.daead.DeterministicAeadConfig.<clinit>(DeterministicAeadConfig.java:58)
    at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:116)
    at com.amazonaws.amplify.amplify_secure_storage.EncryptedKeyValueRepository$sharedPreferences$2.invoke
    at com.amazonaws.amplify.amplify_secure_storage.EncryptedKeyValueRepository$sharedPreferences$2.invoke
    at com.amazonaws.amplify.amplify_secure_storage.EncryptedKeyValueRepository$editor$2.invoke$bridge(EncryptedKeyValueRepository.kt:0)
    at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
    at com.amazonaws.amplify.amplify_secure_storage.EncryptedKeyValueRepository.getSharedPreferences(EncryptedKeyValueRepository.kt:20)
    at com.amazonaws.amplify.amplify_secure_storage.EncryptedKeyValueRepository.get(EncryptedKeyValueRepository.kt:48)
    at com.amazonaws.amplify.amplify_secure_storage.AmplifySecureStoragePlugin.read(AmplifySecureStoragePlugin.kt:33)
    at com.amazonaws.amplify.amplify_secure_storage.pigeons.AmplifySecureStoragePigeon$Companion.setUp$lambda-1$lambda-0
    at com.amazonaws.amplify.amplify_secure_storage.pigeons.AmplifySecureStoragePigeon$Companion$$InternalSyntheticLambda$1$9f51da8474726535dca027d77902b9d32fe141a7a65ba8b74270f7a9893ab2de$0.onMessage$bridge(R8$$SyntheticClass:0)
    at io.flutter.plugin.common.BasicMessageChannel$IncomingMessageHandler.onMessage(BasicMessageChannel.java:261)
    at io.flutter.plugin.common.BasicMessageChannel$IncomingMessageHandler.onMessage$bridge(BasicMessageChannel.java:0)
    at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292)
    at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0(DartMessenger.java:319)
    at io.flutter.embedding.engine.dart.DartMessenger.$r8$lambda$2j2MERcK825A5j1fv5sZ7xB2Iuo(DartMessenger.java:0)
    at io.flutter.embedding.engine.dart.DartMessenger$$InternalSyntheticLambda$1$5dd8b6f7959f08bc8717eff7469e77e06ef5aed51cc0cee17f1e13794798223f$0.run
    at io.flutter.embedding.engine.dart.DartMessenger$SerialTaskQueue.flush(DartMessenger.java:173)
    at io.flutter.embedding.engine.dart.DartMessenger$SerialTaskQueue.lambda$dispatch$0(DartMessenger.java:0)
    at io.flutter.embedding.engine.dart.DartMessenger$SerialTaskQueue.$r8$lambda$F0iXMzLdPiwUET1ugdCo3vpOFvI(DartMessenger.java:0)
    at io.flutter.embedding.engine.dart.DartMessenger$SerialTaskQueue$$InternalSyntheticLambda$2$87f003a9f337bebdd0ba7a08cc7e573e8bd1ce25d26d2f3d3923593655f1df5b$0.run$bridge
    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)
java.lang.RuntimeException: java.lang.NoSuchMethodException: U.u0.values []
    at java.lang.Enum.enumValues(Enum.java:270)
    at java.lang.Enum.access$000(Enum.java:61)
    at java.lang.Enum$1.create(Enum.java:277)
    at java.lang.Enum$1.create(Enum.java:275)
    at libcore.util.BasicLruCache.get(BasicLruCache.java:63)
    at java.lang.Enum.getSharedConstants(Enum.java:289)
    at java.lang.Class.getEnumConstantsShared(Class.java:2459)
    at java.util.EnumMap.getKeyUniverse(EnumMap.java:755)
    at java.util.EnumMap.<init>(EnumMap.java:138)
    at com.google.crypto.tink.daead.internal.AesSivProtoSerialization.createOutputPrefixToVariantMap(AesSivProtoSerialization.java:84)
    at com.google.crypto.tink.daead.internal.AesSivProtoSerialization.<clinit>(AesSivProtoSerialization.java:101)
    at com.google.crypto.tink.daead.internal.AesSivProtoSerialization.register(AesSivProtoSerialization.java:206)
    at com.google.crypto.tink.daead.AesSivKeyManager.register(AesSivKeyManager.java:181)
    at com.google.crypto.tink.daead.DeterministicAeadConfig.register(DeterministicAeadConfig.java:98)
    at com.google.crypto.tink.daead.DeterministicAeadConfig.<clinit>(DeterministicAeadConfig.java:58)
    at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:116)
    at com.amazonaws.amplify.amplify_secure_storage.EncryptedKeyValueRepository$sharedPreferences$2.invoke
    at com.amazonaws.amplify.amplify_secure_storage.EncryptedKeyValueRepository$sharedPreferences$2.invoke
    at com.amazonaws.amplify.amplify_secure_storage.EncryptedKeyValueRepository$editor$2.invoke$bridge(EncryptedKeyValueRepository.kt:0)
    at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
    at com.amazonaws.amplify.amplify_secure_storage.EncryptedKeyValueRepository.getSharedPreferences(EncryptedKeyValueRepository.kt:20)
    at com.amazonaws.amplify.amplify_secure_storage.EncryptedKeyValueRepository.get(EncryptedKeyValueRepository.kt:48)
    at com.amazonaws.amplify.amplify_secure_storage.AmplifySecureStoragePlugin.read(AmplifySecureStoragePlugin.kt:33)
    at com.amazonaws.amplify.amplify_secure_storage.pigeons.AmplifySecureStoragePigeon$Companion.setUp$lambda-1$lambda-0
    at com.amazonaws.amplify.amplify_secure_storage.pigeons.AmplifySecureStoragePigeon$Companion$$InternalSyntheticLambda$1$9f51da8474726535dca027d77902b9d32fe141a7a65ba8b74270f7a9893ab2de$0.onMessage$bridge(R8$$SyntheticClass:0)
    at io.flutter.plugin.common.BasicMessageChannel$IncomingMessageHandler.onMessage(BasicMessageChannel.java:261)
    at io.flutter.plugin.common.BasicMessageChannel$IncomingMessageHandler.onMessage$bridge(BasicMessageChannel.java:0)
    at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292)
    at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0(DartMessenger.java:319)
    at io.flutter.embedding.engine.dart.DartMessenger.$r8$lambda$2j2MERcK825A5j1fv5sZ7xB2Iuo(DartMessenger.java:0)
    at io.flutter.embedding.engine.dart.DartMessenger$$InternalSyntheticLambda$1$5dd8b6f7959f08bc8717eff7469e77e06ef5aed51cc0cee17f1e13794798223f$0.run
    at io.flutter.embedding.engine.dart.DartMessenger$SerialTaskQueue.flush(DartMessenger.java:173)
    at io.flutter.embedding.engine.dart.DartMessenger$SerialTaskQueue.lambda$dispatch$0(DartMessenger.java:0)
    at io.flutter.embedding.engine.dart.DartMessenger$SerialTaskQueue.$r8$lambda$F0iXMzLdPiwUET1ugdCo3vpOFvI(DartMessenger.java:0)
    at io.flutter.embedding.engine.dart.DartMessenger$SerialTaskQueue$$InternalSyntheticLambda$2$87f003a9f337bebdd0ba7a08cc7e573e8bd1ce25d26d2f3d3923593655f1df5b$0.run$bridge
    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)
java.lang.ExceptionInInitializerError: null
    at com.google.crypto.tink.daead.internal.AesSivProtoSerialization.register(AesSivProtoSerialization.java:206)
    at com.google.crypto.tink.daead.AesSivKeyManager.register(AesSivKeyManager.java:181)
    at com.google.crypto.tink.daead.DeterministicAeadConfig.register(DeterministicAeadConfig.java:98)
    at com.google.crypto.tink.daead.DeterministicAeadConfig.<clinit>(DeterministicAeadConfig.java:58)
    at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:116)
    at com.amazonaws.amplify.amplify_secure_storage.EncryptedKeyValueRepository$sharedPreferences$2.invoke
    at com.amazonaws.amplify.amplify_secure_storage.EncryptedKeyValueRepository$sharedPreferences$2.invoke
    at com.amazonaws.amplify.amplify_secure_storage.EncryptedKeyValueRepository$editor$2.invoke$bridge(EncryptedKeyValueRepository.kt:0)
    at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
    at com.amazonaws.amplify.amplify_secure_storage.EncryptedKeyValueRepository.getSharedPreferences(EncryptedKeyValueRepository.kt:20)
    at com.amazonaws.amplify.amplify_secure_storage.EncryptedKeyValueRepository.get(EncryptedKeyValueRepository.kt:48)
    at com.amazonaws.amplify.amplify_secure_storage.AmplifySecureStoragePlugin.read(AmplifySecureStoragePlugin.kt:33)
    at com.amazonaws.amplify.amplify_secure_storage.pigeons.AmplifySecureStoragePigeon$Companion.setUp$lambda-1$lambda-0
    at com.amazonaws.amplify.amplify_secure_storage.pigeons.AmplifySecureStoragePigeon$Companion$$InternalSyntheticLambda$1$9f51da8474726535dca027d77902b9d32fe141a7a65ba8b74270f7a9893ab2de$0.onMessage$bridge(R8$$SyntheticClass:0)
    at io.flutter.plugin.common.BasicMessageChannel$IncomingMessageHandler.onMessage(BasicMessageChannel.java:261)
    at io.flutter.plugin.common.BasicMessageChannel$IncomingMessageHandler.onMessage$bridge(BasicMessageChannel.java:0)
    at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292)
    at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0(DartMessenger.java:319)
    at io.flutter.embedding.engine.dart.DartMessenger.$r8$lambda$2j2MERcK825A5j1fv5sZ7xB2Iuo(DartMessenger.java:0)
    at io.flutter.embedding.engine.dart.DartMessenger$$InternalSyntheticLambda$1$5dd8b6f7959f08bc8717eff7469e77e06ef5aed51cc0cee17f1e13794798223f$0.run
    at io.flutter.embedding.engine.dart.DartMessenger$SerialTaskQueue.flush(DartMessenger.java:173)
    at io.flutter.embedding.engine.dart.DartMessenger$SerialTaskQueue.lambda$dispatch$0(DartMessenger.java:0)
    at io.flutter.embedding.engine.dart.DartMessenger$SerialTaskQueue.$r8$lambda$F0iXMzLdPiwUET1ugdCo3vpOFvI(DartMessenger.java:0)
    at io.flutter.embedding.engine.dart.DartMessenger$SerialTaskQueue$$InternalSyntheticLambda$2$87f003a9f337bebdd0ba7a08cc7e573e8bd1ce25d26d2f3d3923593655f1df5b$0.run$bridge
    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)
    

Categories

  • Analytics
  • API (REST)
  • API (GraphQL)
  • Auth
  • Authenticator
  • DataStore
  • Notifications (Push)
  • Storage

Steps to Reproduce

NONE

Screenshots

No response

Platforms

  • iOS
  • Android
  • Web
  • macOS
  • Windows
  • Linux

Flutter Version

3.19.2

Amplify Flutter Version

1.7.0

Deployment Method

Custom Pipeline

Schema

No response

@NikaHsn
Copy link
Contributor

NikaHsn commented Mar 28, 2024

@Karjan1 sorry that you are facing this issue.
does this happen also on debug or profile mode?
Could you please share your proguard config and also build.gradle from /android/ and from android/app?

@NikaHsn NikaHsn added pending-response Issue is pending response from the issue requestor Investigating Issues that are assigned and are being looked into labels Mar 28, 2024
@Karjan1
Copy link
Author

Karjan1 commented Mar 29, 2024

Thank you @NikaHsn
No, the issue never happened locally.
Here are the configs.

android/build.gradle

    ext.kotlin_version = '1.7.20'
    repositories {
        google()
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:8.3.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
    project.evaluationDependsOn(':app')
}

tasks.register("clean", Delete) {
    delete rootProject.buildDir
}

android/app/build.gradle

plugins {
    id "kotlin-android"
    id "com.android.application"
    id "io.sentry.android.gradle" version "4.2.0"
    id "dev.flutter.flutter-gradle-plugin"
}

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'
}

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
    keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}

android {
    namespace 'pl.yanoskyy.magnets'

    compileSdkVersion 34

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = '1.8'
    }

    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }

    defaultConfig {
        applicationId "pl.yanoskyy.magnets"
        minSdkVersion 24
        targetSdkVersion 33
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
    }

    signingConfigs {
        release {
            keyAlias keystoreProperties['keyAlias']
            keyPassword keystoreProperties['keyPassword']
            storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
            storePassword keystoreProperties['storePassword']
        }
    }
    buildTypes {
        release {
            signingConfig signingConfigs.release
        }
    }

}

import io.sentry.android.gradle.extensions.InstrumentationFeature
import io.sentry.android.gradle.instrumentation.logcat.LogcatLevel

sentry {
    // Disables or enables debug log output, e.g. for for sentry-cli.
    // Default is disabled.
    debug = false

    // The slug of the Sentry organization to use for uploading proguard mappings/source contexts.
    org = "yanoskyy"

    // The slug of the Sentry project to use for uploading proguard mappings/source contexts.
    projectName = "yanoskyy"

    // The authentication token to use for uploading proguard mappings/source contexts.
    // WARNING: Do not expose this token in your build.gradle files, but rather set an environment
    // variable and read it into this property.
    authToken = System.getenv("SENTRY_AUTH_TOKEN")

    // The url of your Sentry instance. If you're using SAAS (not self hosting) you do not have to
    // set this. If you are self hosting you can set your URL here
    url = null

    // Disables or enables the handling of Proguard mapping for Sentry.
    // If enabled the plugin will generate a UUID and will take care of
    // uploading the mapping to Sentry. If disabled, all the logic
    // related to proguard mapping will be excluded.
    // Default is enabled.
    includeProguardMapping = true

    // Whether the plugin should attempt to auto-upload the mapping file to Sentry or not.
    // If disabled the plugin will run a dry-run and just generate a UUID.
    // The mapping file has to be uploaded manually via sentry-cli in this case.
    // Default is enabled.
    autoUploadProguardMapping = true

    // Experimental flag to turn on support for GuardSquare's tools integration (Dexguard and External Proguard).
    // If enabled, the plugin will try to consume and upload the mapping file produced by Dexguard and External Proguard.
    // Default is disabled.
    dexguardEnabled = false

    // Disables or enables the automatic configuration of Native Symbols
    // for Sentry. This executes sentry-cli automatically so
    // you don't need to do it manually.
    // Default is disabled.
    uploadNativeSymbols = false

    // Whether the plugin should attempt to auto-upload the native debug symbols to Sentry or not.
    // If disabled the plugin will run a dry-run.
    // Default is enabled.
    autoUploadNativeSymbols = true

    // Does or doesn't include the source code of native code for Sentry.
    // This executes sentry-cli with the --include-sources param. automatically so
    // you don't need to do it manually.
    // This option has an effect only when [uploadNativeSymbols] is enabled.
    // Default is disabled.
    includeNativeSources = false

    // Generates a JVM (Java, Kotlin, etc.) source bundle and uploads your source code to Sentry.
    // This enables source context, allowing you to see your source
    // code as part of your stack traces in Sentry.
    includeSourceContext = false

    // Configure additional directories to be included in the source bundle which is used for
    // source context. The directories should be specified relative to the Gradle module/project's
    // root. For example, if you have a custom source set alongside 'main', the parameter would be
    // 'src/custom/java'.
    additionalSourceDirsForSourceContext = []

    // Enable or disable the tracing instrumentation.
    // Does auto instrumentation for specified features through bytecode manipulation.
    // Default is enabled.
    tracingInstrumentation {
        enabled = true

        // Specifies a set of instrumentation features that are eligible for bytecode manipulation.
        // Defaults to all available values of InstrumentationFeature enum class.
        features = [InstrumentationFeature.DATABASE, InstrumentationFeature.FILE_IO, InstrumentationFeature.OKHTTP, InstrumentationFeature.COMPOSE]

        // Enable or disable logcat instrumentation through bytecode manipulation.
        // Default is enabled.
        logcat {
            enabled = true

            // Specifies a minimum log level for the logcat breadcrumb logging.
            // Defaults to LogcatLevel.WARNING.
            minLevel = LogcatLevel.WARNING
        }

        // The set of glob patterns to exclude from instrumentation. Classes matching any of these
        // patterns in the project's sources and dependencies JARs won't be instrumented by the Sentry
        // Gradle plugin.
        //
        // Don't include the file extension. Filtering is done on compiled classes and
        // the .class suffix isn't included in the pattern matching.
        //
        // Example usage:
        // ```
        // excludes = ['com/example/donotinstrument/**', '**/*Test']
        // ```
        //
        // Only supported when using Android Gradle plugin (AGP) version 7.4.0 and above.
        excludes = []
    }

    // Enable auto-installation of Sentry components (sentry-android SDK and okhttp, timber and fragment integrations).
    // Default is enabled.
    // Only available v3.1.0 and above.
    autoInstallation {
        enabled = true

        // Specifies a version of the sentry-android SDK and fragment, timber and okhttp integrations.
        //
        // This is also useful, when you have the sentry-android SDK already included into a transitive dependency/module and want to
        // align integration versions with it (if it's a direct dependency, the version will be inferred).
        //
        // NOTE: if you have a higher version of the sentry-android SDK or integrations on the classpath, this setting will have no effect
        // as Gradle will resolve it to the latest version.
        //
        // Defaults to the latest published Sentry version.
        sentryVersion = '7.6.0'
    }

    // Disables or enables dependencies metadata reporting for Sentry.
    // If enabled, the plugin will collect external dependencies and
    // upload them to Sentry as part of events. If disabled, all the logic
    // related to the dependencies metadata report will be excluded.
    //
    // Default is enabled.
    includeDependenciesReport = true

    // Whether the plugin should send telemetry data to Sentry.
    // If disabled the plugin won't send telemetry data.
    // This is auto disabled if running against a self hosted instance of Sentry.
    // Default is enabled.
    telemetry = true
}


flutter {
    source '../..'
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}

I don't have a Proguard config, but I believe Flutter does obfuscation by default? I just added Sentry gradle login to deobfuscate traces on their side.

@NikaHsn
Copy link
Contributor

NikaHsn commented Mar 29, 2024

Code shrinking is enabled by default (flutter dev docs). I suspect the issue you are facing is related to shrinking.
Do you see the issue if you release without code shrinking? you can disable it in the build.gradle (android developers doc)
I'm not sure if Flutter does obfuscation by default. based on the Flutter dev docs and Flutter GH Wiki this is not enabled by default.

@Karjan1
Copy link
Author

Karjan1 commented Mar 30, 2024

I just tried without shrinking. flutter build appbundle --release --no-shrink Unfortunately still the same error 😞
If you have any other ideas I'd love to try them.

@Jordan-Nelson
Copy link
Contributor

@Karjan1 can you share the output of running the following two commands?

  • flutter pub deps --style=compact - This should be run from the root of your project
  • ./gradlew app:androidDependencies - This should be run from the /android directory in your project

@Jordan-Nelson Jordan-Nelson self-assigned this Apr 1, 2024
@Karjan1
Copy link
Author

Karjan1 commented Apr 1, 2024

Sure. It looks like you had a good hunch. It's late today, but the error looks helpful I'll look into it tomorrow

flutter pub deps --style=compact

Dart SDK 3.3.1
Flutter SDK 3.19.3
magnets_amplify 1.0.61+61

dependencies:
- amplify_api 1.7.0 [amplify_api_dart amplify_core amplify_flutter connectivity_plus flutter meta plugin_platform_interface]
- amplify_auth_cognito 1.7.2 [amplify_analytics_pinpoint amplify_analytics_pinpoint_dart amplify_auth_cognito_dart amplify_core amplify_flutter amplify_secure_storage async flutter meta path plugin_platform_interface]
- amplify_flutter 1.7.0 [amplify_core amplify_secure_storage aws_common collection flutter meta]
- bloc 8.1.4 [meta]
- cached_network_image 3.3.1 [cached_network_image_platform_interface cached_network_image_web flutter flutter_cache_manager octo_image]
- cupertino_icons 1.0.6
- dartz 0.10.1
- equatable 2.0.5 [collection meta]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine]
- flutter_bloc 8.1.5 [bloc flutter provider]
- flutter_dotenv 5.1.0 [flutter]
- flutter_form_builder 9.2.1 [flutter intl]
- flutter_lints 3.0.2 [lints]
- flutter_localizations 0.0.0 [flutter intl characters clock collection material_color_utilities meta path vector_math]
- flutter_spinkit 5.2.1 [flutter]
- form_builder_extra_fields 10.1.0 [flutter flutter_form_builder flutter_colorpicker dropdown_search signature intl flutter_typeahead flutter_rating_bar]
- form_builder_validators 9.1.0 [flutter flutter_localizations intl]
- freezed_annotation 2.4.1 [collection json_annotation meta]
- get 4.6.6 [flutter]
- get_it 7.6.7 [async collection]
- get_storage 2.1.1 [flutter get path_provider]
- go_router 13.2.1 [collection flutter flutter_web_plugins logging meta]
- google_fonts 6.2.1 [flutter http path_provider crypto]
- http 1.2.0 [async http_parser meta web]
- injectable 2.4.1 [get_it meta]
- intl 0.18.1 [clock meta path]
- intl_phone_number_input 0.7.4 [flutter libphonenumber_plugin equatable collection]
- json_annotation 4.8.1 [meta]
- jwt_decode 0.3.1
- logger 2.2.0
- money2 4.0.0 [decimal fixed intl meta]
- open_file 3.3.2 [flutter ffi]
- package_info_plus 5.0.1 [ffi flutter flutter_web_plugins http meta path package_info_plus_platform_interface web win32]
- path_provider 2.1.2 [flutter path_provider_android path_provider_foundation path_provider_linux path_provider_platform_interface path_provider_windows]
- pdf 3.10.8 [archive barcode bidi crypto image meta path_parsing vector_math xml]
- provider 6.1.2 [collection flutter nested]
- quiver 3.2.1 [matcher]
- sentry_flutter 7.18.0 [flutter flutter_web_plugins sentry package_info_plus meta ffi]
- upgrader 9.0.0 [flutter device_info_plus html http os_detect package_info_plus shared_preferences url_launcher version xml]

dev dependencies:
- build_runner 2.4.8 [analyzer args async build build_config build_daemon build_resolvers build_runner_core code_builder collection crypto dart_style frontend_server_client glob graphs http_multi_server io js logging meta mime package_config path pool pub_semver pubspec_parse shelf shelf_web_socket stack_trace stream_transform timing watcher web_socket_channel yaml]
- flutter_launcher_icons 0.13.1 [args checked_yaml cli_util image json_annotation path yaml]
- flutter_test 0.0.0 [flutter test_api matcher path fake_async clock stack_trace vector_math leak_tracker_flutter_testing async boolean_selector characters collection leak_tracker leak_tracker_testing material_color_utilities meta source_span stream_channel string_scanner term_glyph vm_service]
- freezed 2.4.7 [analyzer build build_config collection meta source_gen freezed_annotation json_annotation]
- injectable_generator 2.6.1 [build source_gen path glob analyzer code_builder dart_style injectable collection recase meta]
- json_serializable 6.7.1 [analyzer async build build_config collection json_annotation meta path pub_semver pubspec_parse source_gen source_helper]
- sentry_dart_plugin 1.7.1 [yaml injector ansicolor system_info2 file http crypto convert process properties]

dependency overrides:
- flutter_chips_input 2.0.0 [flutter]

transitive dependencies:
- _fe_analyzer_shared 67.0.0 [meta]
- amplify_analytics_pinpoint 1.7.1 [amplify_analytics_pinpoint_dart amplify_core amplify_db_common amplify_secure_storage aws_common device_info_plus flutter meta package_info_plus path_provider]
- amplify_analytics_pinpoint_dart 0.3.7 [amplify_core amplify_db_common_dart amplify_secure_storage_dart aws_common aws_signature_v4 built_collection built_value collection drift intl meta path smithy smithy_aws uuid]
- amplify_api_dart 0.4.0 [amplify_core async aws_common collection json_annotation meta plugin_platform_interface stream_transform web_socket_channel]
- amplify_auth_cognito_dart 0.10.12 [amplify_analytics_pinpoint_dart amplify_core amplify_secure_storage_dart async aws_common aws_signature_v4 built_collection built_value clock collection convert crypto ffi fixnum http intl js json_annotation meta oauth2 path smithy smithy_aws stream_transform uuid win32 win32_registry worker_bee]
- amplify_core 1.7.0 [async aws_common aws_signature_v4 collection graphs intl json_annotation logging meta retry stack_trace uuid]
- amplify_db_common 0.3.5 [amplify_db_common_dart drift flutter path path_provider]
- amplify_db_common_dart 0.3.6 [amplify_core async aws_common drift meta path sqlite3]
- amplify_secure_storage 0.4.2 [amplify_secure_storage_dart async file flutter meta path path_provider path_provider_windows]
- amplify_secure_storage_dart 0.4.3 [async aws_common built_collection built_value ffi file js meta path win32 worker_bee]
- analyzer 6.4.1 [_fe_analyzer_shared collection convert crypto glob meta package_config path pub_semver source_span watcher yaml]
- ansicolor 2.0.2
- archive 3.4.10 [crypto path pointycastle]
- args 2.4.2
- async 2.11.0 [collection meta]
- aws_common 0.6.3 [async built_collection built_value collection http2 js json_annotation logging meta mime os_detect path stream_transform uuid]
- aws_signature_v4 0.5.1 [async aws_common collection convert crypto json_annotation meta path]
- barcode 2.2.6 [meta qr]
- bidi 2.0.10
- boolean_selector 2.1.1 [source_span string_scanner]
- build 2.4.1 [analyzer async convert crypto glob logging meta package_config path]
- build_config 1.1.1 [checked_yaml json_annotation path pubspec_parse yaml]
- build_daemon 4.0.1 [built_collection built_value crypto http_multi_server logging path pool shelf shelf_web_socket stream_transform watcher web_socket_channel]
- build_resolvers 2.4.2 [analyzer async build collection convert crypto graphs logging package_config path pool pub_semver stream_transform yaml]
- build_runner_core 7.3.0 [async build build_config build_resolvers collection convert crypto glob graphs json_annotation logging meta package_config path pool timing watcher yaml]
- built_collection 5.1.1
- built_value 8.8.1 [built_collection collection fixnum meta]
- cached_network_image_platform_interface 4.0.0 [flutter flutter_cache_manager]
- cached_network_image_web 1.1.1 [cached_network_image_platform_interface flutter flutter_cache_manager]
- characters 1.3.0
- checked_yaml 2.0.3 [json_annotation source_span yaml]
- cli_util 0.4.1 [meta path]
- clock 1.1.1
- code_builder 4.10.0 [built_collection built_value collection matcher meta]
- collection 1.18.0
- connectivity_plus 5.0.2 [flutter flutter_web_plugins connectivity_plus_platform_interface js meta nm]
- connectivity_plus_platform_interface 1.2.4 [flutter meta plugin_platform_interface]
- convert 3.1.1 [typed_data]
- coverage 1.7.2 [args logging package_config path source_maps stack_trace vm_service]
- crclib 3.0.0 [meta tuple]
- crypto 3.0.3 [typed_data]
- csslib 1.0.0 [source_span]
- dart_style 2.3.6 [analyzer args collection path pub_semver source_span]
- dbus 0.7.10 [args ffi meta xml]
- decimal 2.3.3 [rational]
- device_info_plus 9.1.2 [device_info_plus_platform_interface ffi file flutter flutter_web_plugins meta win32 win32_registry]
- device_info_plus_platform_interface 7.0.0 [flutter meta plugin_platform_interface]
- drift 2.14.1 [async convert collection js meta stream_channel sqlite3 path]
- dropdown_search 5.0.6 [flutter]
- fake_async 1.3.1 [clock collection]
- ffi 2.1.2
- file 7.0.0 [meta path]
- fixed 4.0.1 [decimal intl meta]
- fixnum 1.1.0
- flutter_cache_manager 3.3.1 [clock collection file flutter http path path_provider rxdart sqflite uuid]
- flutter_colorpicker 1.0.3 [flutter]
- flutter_keyboard_visibility 5.4.1 [meta flutter_keyboard_visibility_platform_interface flutter_keyboard_visibility_linux flutter_keyboard_visibility_macos flutter_keyboard_visibility_web flutter_keyboard_visibility_windows flutter]
- flutter_keyboard_visibility_linux 1.0.0 [flutter_keyboard_visibility_platform_interface flutter]
- flutter_keyboard_visibility_macos 1.0.0 [flutter_keyboard_visibility_platform_interface flutter]
- flutter_keyboard_visibility_platform_interface 2.0.0 [flutter meta plugin_platform_interface]
- flutter_keyboard_visibility_web 2.0.0 [flutter_keyboard_visibility_platform_interface flutter_web_plugins flutter]
- flutter_keyboard_visibility_windows 1.0.0 [flutter_keyboard_visibility_platform_interface flutter]
- flutter_rating_bar 4.0.1 [flutter]
- flutter_svg 2.0.10+1 [flutter http vector_graphics vector_graphics_codec vector_graphics_compiler]
- flutter_typeahead 4.8.0 [flutter flutter_keyboard_visibility pointer_interceptor]
- flutter_web_plugins 0.0.0 [flutter characters collection material_color_utilities meta vector_math]
- frontend_server_client 3.2.0 [async path]
- glob 2.1.2 [async collection file path string_scanner]
- globbing 1.0.0 [path]
- graphs 2.3.1 [collection]
- html 0.15.4 [csslib source_span]
- http2 2.3.0
- http_multi_server 3.2.1 [async]
- http_parser 4.0.2 [collection source_span string_scanner typed_data]
- image 4.1.7 [archive meta xml]
- injector 3.0.0
- io 1.0.4 [meta path string_scanner]
- js 0.6.7 [meta]
- leak_tracker 10.0.0 [clock collection meta path vm_service]
- leak_tracker_flutter_testing 2.0.1 [flutter leak_tracker leak_tracker_testing matcher meta]
- leak_tracker_testing 2.0.1 [leak_tracker matcher meta]
- libphonenumber_platform_interface 0.4.2 [flutter plugin_platform_interface]
- libphonenumber_plugin 0.3.3 [flutter flutter_web_plugins libphonenumber_platform_interface libphonenumber_web]
- libphonenumber_web 0.3.2 [flutter flutter_web_plugins js libphonenumber_platform_interface]
- lints 3.0.0
- logging 1.2.0
- matcher 0.12.16+1 [async meta stack_trace term_glyph test_api]
- material_color_utilities 0.8.0 [collection]
- meta 1.11.0
- mime 1.0.5
- nested 1.0.0 [flutter]
- nm 0.5.0 [dbus]
- node_preamble 2.0.2
- oauth2 2.0.2 [collection crypto http http_parser]
- octo_image 2.0.0 [flutter]
- os_detect 2.0.1
- package_config 2.1.0 [path]
- package_info_plus_platform_interface 2.0.1 [flutter meta plugin_platform_interface]
- path 1.9.0
- path_parsing 1.0.1 [vector_math meta]
- path_provider_android 2.2.2 [flutter path_provider_platform_interface]
- path_provider_foundation 2.3.2 [flutter path_provider_platform_interface]
- path_provider_linux 2.2.1 [ffi flutter path path_provider_platform_interface xdg_directories]
- path_provider_platform_interface 2.1.2 [flutter platform plugin_platform_interface]
- path_provider_windows 2.2.1 [ffi flutter path path_provider_platform_interface win32]
- petitparser 6.0.2 [meta]
- platform 3.1.4
- plugin_platform_interface 2.1.8 [meta]
- pointer_interceptor 0.9.3+7 [flutter]
- pointycastle 3.7.4 [collection convert js]
- pool 1.5.1 [async stack_trace]
- process 5.0.2 [file path platform]
- properties 2.1.0 [meta test]
- pub_semver 2.1.4 [collection meta]
- pubspec_parse 1.2.3 [checked_yaml collection json_annotation pub_semver yaml]
- qr 3.0.1 [meta]
- rational 2.2.2
- recase 4.1.0
- retry 3.1.2
- rxdart 0.27.7
- sentry 7.18.0 [http meta stack_trace uuid]
- shared_preferences 2.2.2 [flutter shared_preferences_android shared_preferences_foundation shared_preferences_linux shared_preferences_platform_interface shared_preferences_web shared_preferences_windows]
- shared_preferences_android 2.2.1 [flutter shared_preferences_platform_interface]
- shared_preferences_foundation 2.3.5 [flutter shared_preferences_platform_interface]
- shared_preferences_linux 2.3.2 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface]
- shared_preferences_platform_interface 2.3.2 [flutter plugin_platform_interface]
- shared_preferences_web 2.2.2 [flutter flutter_web_plugins shared_preferences_platform_interface web]
- shared_preferences_windows 2.3.2 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface]
- shelf 1.4.1 [async collection http_parser path stack_trace stream_channel]
- shelf_packages_handler 3.0.2 [path shelf shelf_static]
- shelf_static 1.1.2 [convert http_parser mime path shelf]
- shelf_web_socket 1.0.4 [shelf stream_channel web_socket_channel]
- signature 5.4.1 [flutter flutter_svg image]
- sky_engine 0.0.99
- smithy 0.6.3 [async aws_common built_collection built_value collection convert crypto fixnum http_parser intl json_annotation meta path retry shelf typed_data xml]
- smithy_aws 0.6.2 [aws_common aws_signature_v4 built_collection built_value collection convert crclib crypto intl json_annotation meta path smithy xml]
- source_gen 1.5.0 [analyzer async build dart_style glob path source_span yaml]
- source_helper 1.3.4 [analyzer collection source_gen]
- source_map_stack_trace 2.1.1 [path source_maps stack_trace]
- source_maps 0.10.12 [source_span]
- source_span 1.10.0 [collection path term_glyph]
- sprintf 7.0.0
- sqflite 2.3.2 [flutter sqflite_common path]
- sqflite_common 2.5.4 [synchronized path meta]
- sqlite3 2.4.0 [collection ffi js meta path]
- stack_trace 1.11.1 [path]
- stream_channel 2.1.2 [async]
- stream_transform 2.1.0
- string_scanner 1.2.0 [source_span]
- synchronized 3.1.0+1
- system_info2 4.0.0 [globbing path]
- term_glyph 1.2.1
- test 1.24.9 [analyzer async boolean_selector collection coverage http_multi_server io js matcher node_preamble package_config path pool shelf shelf_packages_handler shelf_static shelf_web_socket source_span stack_trace stream_channel test_api test_core typed_data web_socket_channel webkit_inspection_protocol yaml]
- test_api 0.6.1 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph]
- test_core 0.5.9 [analyzer args async boolean_selector collection coverage frontend_server_client glob io meta package_config path pool source_map_stack_trace source_maps source_span stack_trace stream_channel test_api vm_service yaml]
- timing 1.0.1 [json_annotation]
- tuple 2.0.2
- typed_data 1.3.2 [collection]
- url_launcher 6.2.5 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows]
- url_launcher_android 6.3.0 [flutter url_launcher_platform_interface]
- url_launcher_ios 6.2.5 [flutter url_launcher_platform_interface]
- url_launcher_linux 3.1.1 [flutter url_launcher_platform_interface]
- url_launcher_macos 3.1.0 [flutter url_launcher_platform_interface]
- url_launcher_platform_interface 2.3.2 [flutter plugin_platform_interface]
- url_launcher_web 2.2.3 [flutter flutter_web_plugins url_launcher_platform_interface web]
- url_launcher_windows 3.1.1 [flutter url_launcher_platform_interface]
- uuid 4.3.3 [crypto sprintf meta fixnum]
- vector_graphics 1.1.11+1 [flutter http vector_graphics_codec]
- vector_graphics_codec 1.1.11+1
- vector_graphics_compiler 1.1.11+1 [args meta path_parsing xml vector_graphics_codec path]
- vector_math 2.1.4
- version 3.0.2
- vm_service 13.0.0
- watcher 1.1.0 [async path]
- web 0.4.2
- web_socket_channel 2.4.3 [async crypto stream_channel web]
- webkit_inspection_protocol 1.2.1 [logging]
- win32 5.3.0 [ffi]
- win32_registry 1.1.2 [ffi win32]
- worker_bee 0.2.3 [async aws_common built_collection built_value collection js meta path stack_trace stream_channel stream_transform]
- xdg_directories 1.0.4 [meta path]
- xml 6.5.0 [collection meta petitparser]
- yaml 3.1.2 [collection source_span string_scanner]

./gradlew app:androidDependencies

Starting a Gradle Daemon (subsequent builds will be faster)

> Task :app:androidDependencies
debug
debugCompileClasspath - Dependencies for compilation
+--- /Users/karoljanowski/Projects/private/janowski/magnets-mobile/android/app/build/intermediates/flutter/debug/libs.jar
+--- :amplify_secure_storage (variant: debug)
+--- :amplify_db_common (variant: debug)
+--- :sqflite (variant: debug)
+--- :url_launcher_android (variant: debug)
+--- :path_provider_android (variant: debug)
+--- :connectivity_plus (variant: debug)
+--- :sentry_flutter (variant: debug)
+--- :shared_preferences_android (variant: debug)
+--- :amplify_analytics_pinpoint (variant: debug)
+--- :open_file (variant: debug)
+--- :libphonenumber_plugin (variant: debug)
+--- :flutter_keyboard_visibility (variant: debug)
+--- :package_info_plus (variant: debug)
+--- :device_info_plus (variant: debug)
+--- :amplify_auth_cognito (variant: debug)
+--- io.flutter:armeabi_v7a_debug:1.0.0-2e4ba9c6fb499ccd4e81420543783cc7267ae406@jar
+--- io.flutter:arm64_v8a_debug:1.0.0-2e4ba9c6fb499ccd4e81420543783cc7267ae406@jar
+--- io.flutter:x86_64_debug:1.0.0-2e4ba9c6fb499ccd4e81420543783cc7267ae406@jar
+--- io.flutter:x86_debug:1.0.0-2e4ba9c6fb499ccd4e81420543783cc7267ae406@jar
+--- io.flutter:flutter_embedding_debug:1.0.0-2e4ba9c6fb499ccd4e81420543783cc7267ae406@jar
+--- androidx.lifecycle:lifecycle-common-java8:2.5.1@jar
+--- androidx.fragment:fragment:1.3.6@aar
+--- androidx.viewpager:viewpager:1.0.0@aar
+--- androidx.loader:loader:1.0.0@aar
+--- androidx.activity:activity:1.6.0@aar
+--- androidx.customview:customview:1.0.0@aar
+--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.5.1@aar
+--- androidx.core:core-ktx:1.10.1@aar
+--- androidx.core:core:1.10.1@aar
+--- androidx.core:core:1.10.1@aar
+--- androidx.lifecycle:lifecycle-runtime:2.5.1@aar
+--- androidx.lifecycle:lifecycle-livedata:2.0.0@aar
+--- androidx.lifecycle:lifecycle-livedata-core:2.5.1@aar
+--- androidx.lifecycle:lifecycle-livedata-core:2.5.1@aar
+--- androidx.lifecycle:lifecycle-common:2.5.1@jar
+--- androidx.arch.core:core-runtime:2.1.0@aar
+--- androidx.arch.core:core-common:2.1.0@jar
+--- androidx.versionedparcelable:versionedparcelable:1.1.1@aar
+--- androidx.collection:collection:1.1.0@jar
+--- androidx.lifecycle:lifecycle-viewmodel:2.5.1@aar
+--- androidx.lifecycle:lifecycle-viewmodel:2.5.1@aar
+--- androidx.savedstate:savedstate:1.2.0@aar
+--- androidx.annotation:annotation-jvm:1.7.1@jar
+--- androidx.window:window-java:1.0.0-beta04@aar
+--- androidx.window:window:1.0.0-beta04@aar
+--- org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.7.1@jar
+--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1@jar
+--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.22@jar
+--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.22@jar
+--- androidx.annotation:annotation-experimental:1.3.0@aar
+--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22@jar
+--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.22@jar
+--- org.jetbrains:annotations:23.0.0@jar
+--- io.sentry:sentry-kotlin-extensions:7.6.0@jar
+--- io.sentry:sentry-android:7.6.0@aar
+--- io.sentry:sentry-android-ndk:7.6.0@aar
+--- io.sentry:sentry-android-core:7.6.0@aar
+--- io.sentry:sentry-android-fragment:7.6.0@aar
+--- io.sentry:sentry:7.6.0@jar
+--- androidx.tracing:tracing:1.0.0@aar
\--- com.googlecode.libphonenumber:libphonenumber:8.13.4@jar

> Task :app:androidDependencies FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:androidDependencies'.
> Could not resolve all artifacts for configuration ':app:debugRuntimeClasspath'.
   > Could not resolve com.google.crypto.tink:tink-android:[1.8.0, ).
     Required by:
         project :app > project :amplify_secure_storage
      > Failed to list versions for com.google.crypto.tink:tink-android.
         > Unable to load Maven meta-data from https://repo.maven.apache.org/maven2/com/google/crypto/tink/tink-android/maven-metadata.xml.
            > org.xml.sax.SAXNotRecognizedException: Property 'http://javax.xml.XMLConstants/property/accessExternalSchema' is not recognized.
      > Failed to list versions for com.google.crypto.tink:tink-android.
         > Unable to load Maven meta-data from https://repo.maven.apache.org/maven2/com/google/crypto/tink/tink-android/maven-metadata.xml.
            > org.xml.sax.SAXNotRecognizedException: Property 'http://javax.xml.XMLConstants/property/accessExternalSchema' is not recognized.
      > Failed to list versions for com.google.crypto.tink:tink-android.
         > Unable to load Maven meta-data from https://repo.maven.apache.org/maven2/com/google/crypto/tink/tink-android/maven-metadata.xml.
            > org.xml.sax.SAXNotRecognizedException: Property 'http://javax.xml.XMLConstants/property/accessExternalSchema' is not recognized.
      > Failed to list versions for com.google.crypto.tink:tink-android.
         > Unable to load Maven meta-data from https://repo.maven.apache.org/maven2/com/google/crypto/tink/tink-android/maven-metadata.xml.
            > org.xml.sax.SAXNotRecognizedException: Property 'http://javax.xml.XMLConstants/property/accessExternalSchema' is not recognized.
      > Failed to list versions for com.google.crypto.tink:tink-android.
         > Unable to load Maven meta-data from https://repo.maven.apache.org/maven2/com/google/crypto/tink/tink-android/maven-metadata.xml.
            > org.xml.sax.SAXNotRecognizedException: Property 'http://javax.xml.XMLConstants/property/accessExternalSchema' is not recognized.
      > Failed to list versions for com.google.crypto.tink:tink-android.
         > Unable to load Maven meta-data from https://repo.maven.apache.org/maven2/com/google/crypto/tink/tink-android/maven-metadata.xml.
            > org.xml.sax.SAXNotRecognizedException: Property 'http://javax.xml.XMLConstants/property/accessExternalSchema' is not recognized.
      > Failed to list versions for com.google.crypto.tink:tink-android.
         > Unable to load Maven meta-data from https://repo.maven.apache.org/maven2/com/google/crypto/tink/tink-android/maven-metadata.xml.
            > org.xml.sax.SAXNotRecognizedException: Property 'http://javax.xml.XMLConstants/property/accessExternalSchema' is not recognized.
      > Failed to list versions for com.google.crypto.tink:tink-android.
         > Unable to load Maven meta-data from https://repo.maven.apache.org/maven2/com/google/crypto/tink/tink-android/maven-metadata.xml.
            > org.xml.sax.SAXNotRecognizedException: Property 'http://javax.xml.XMLConstants/property/accessExternalSchema' is not recognized.
      > Failed to list versions for com.google.crypto.tink:tink-android.
         > Unable to load Maven meta-data from https://repo.maven.apache.org/maven2/com/google/crypto/tink/tink-android/maven-metadata.xml.
            > org.xml.sax.SAXNotRecognizedException: Property 'http://javax.xml.XMLConstants/property/accessExternalSchema' is not recognized.
      > Failed to list versions for com.google.crypto.tink:tink-android.
         > Unable to load Maven meta-data from https://repo.maven.apache.org/maven2/com/google/crypto/tink/tink-android/maven-metadata.xml.
            > org.xml.sax.SAXNotRecognizedException: Property 'http://javax.xml.XMLConstants/property/accessExternalSchema' is not recognized.
      > Failed to list versions for com.google.crypto.tink:tink-android.
         > Unable to load Maven meta-data from https://repo.maven.apache.org/maven2/com/google/crypto/tink/tink-android/maven-metadata.xml.
            > org.xml.sax.SAXNotRecognizedException: Property 'http://javax.xml.XMLConstants/property/accessExternalSchema' is not recognized.
      > Failed to list versions for com.google.crypto.tink:tink-android.
         > Unable to load Maven meta-data from https://repo.maven.apache.org/maven2/com/google/crypto/tink/tink-android/maven-metadata.xml.
            > org.xml.sax.SAXNotRecognizedException: Property 'http://javax.xml.XMLConstants/property/accessExternalSchema' is not recognized.
      > Failed to list versions for com.google.crypto.tink:tink-android.
         > Unable to load Maven meta-data from https://repo.maven.apache.org/maven2/com/google/crypto/tink/tink-android/maven-metadata.xml.
            > org.xml.sax.SAXNotRecognizedException: Property 'http://javax.xml.XMLConstants/property/accessExternalSchema' is not recognized.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 11s
5 actionable tasks: 1 executed, 4 up-to-date

@Karjan1
Copy link
Author

Karjan1 commented Apr 5, 2024

It seems to work now. I pinned the dependency explicitly in android/app/build.gradle. Thank you for your help

dependencies {
    implementation 'com.google.crypto.tink:tink-android:1.8.0'
}

@Jordan-Nelson
Copy link
Contributor

I am glad to hear you were able to resolve the issue. It should be necessary to pin the dependency but it is possible that a newer version of the dependency is conflicting with another 3rd a party dependency. Since you were able to work around the issue and I have been unable to reproduce this I am going to close this out.

@hrafnthor
Copy link

hrafnthor commented Apr 30, 2024

Had this same issue occur today, and was able to resolve it by adding Google's tink library to my project's Proguard config, which I believe is a better solution than adding it as a dependency.

-keep class com.google.crypto.tink.** { *; }

Perhaps amplify-flutter could ship a proguard consumer configuration which would take care of this for consumers?

@Jordan-Nelson Jordan-Nelson reopened this Apr 30, 2024
@Jordan-Nelson
Copy link
Contributor

@hrafnthor If you had to add that to your proguard file I wonder if there is a bug in a recent version of crypto.tink. I will try again to reproduce this.

@Jordan-Nelson Jordan-Nelson added Build Issues related to building apps using Amplify flutter question A question about the Amplify Flutter libraries Investigating Issues that are assigned and are being looked into and removed pending-response Issue is pending response from the issue requestor Investigating Issues that are assigned and are being looked into labels Apr 30, 2024
@Giovanny-DS
Copy link

Giovanny-DS commented May 8, 2024

i'm also having this issue with my proyect in flutter 3.16.9 using the package version: 1.7.2

./gradlew app:androidDependencies does not show the error exposed in this tread in my case.

i tried adding:

dependencies {
implementation 'com.google.crypto.tink:tink-android:1.8.0'
}

but did not work in my case. i'll attach stack trace from firebase crashlytics

com.payvalida.merchant_issue_98c89334d919441da0cf33ed5bf14ccd_crash_session_663BB467009900015B863C9A2CE3D994_DNE_0_v2_stacktrace.txt

@Jordan-Nelson
Copy link
Contributor

@Giovanny-DS are you able to reproduce this locally? Can you share more info about the reproduction? does it occur on all devices?

@Giovanny-DS
Copy link

Giovanny-DS commented May 10, 2024

@Jordan-Nelson yeah actually i could:

i'll share a repo tomorrow

@Giovanny-DS
Copy link

Here is the repo you acn just fork. and run with flutter version 3.16.9
@Jordan-Nelson

IMPORTANT NOTE: if you run this in dev /debug mode it will work without failures. to get the error you actually need to run flutter run --release having a physical device or emulator (not tested on emulator) running or plugged in

https://github.com/Giovanny-DS/amplify_flutter_crash

@NikaHsn
Copy link
Contributor

NikaHsn commented May 14, 2024

@Giovanny-DS thank you for providing these details. we will look into this issue and get back to you with any updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Issues related to building apps using Amplify flutter Investigating Issues that are assigned and are being looked into question A question about the Amplify Flutter libraries
Projects
None yet
Development

No branches or pull requests

5 participants