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

[BUG] Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Array<(out) Signature!>? #104

Open
6 tasks
himxnshudxhiyx opened this issue Jan 24, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@himxnshudxhiyx
Copy link

Expected behavior

fun getAppSignatures(): List {
return try {
val packageName = packageName
val packageManager = packageManager
val packageInfo = packageManager.getPackageInfo(
packageName,
PackageManager.GET_SIGNING_CERTIFICATES
)
val signatures = packageInfo.signingInfo?.apkContentsSigners

    signatures?.mapNotNull { hash(packageName, it.toCharsString()) } ?: emptyList()
} catch (e: PackageManager.NameNotFoundException) {
    emptyList()
}

}

This must be the code at -> otp_autofill-4.1.0/android/src/main/kotlin/ru/surfstudio/otp_autofill/AppSignatureHelper.kt:25:23

Actual behavior

This is the current code ->
fun getAppSignatures(): List {
return try {
val packageName = packageName
val packageManager = packageManager
val signatures = packageManager.getPackageInfo(packageName,
PackageManager.GET_SIGNATURES).signatures
signatures.mapNotNull { hash(packageName, it.toCharsString()) }
} catch (e: PackageManager.NameNotFoundException) {
emptyList()
}
}

Video/Screenshot

Steps to reproduce

Details

Flutter version:

Dart version:

Platform:

Logs and stacktrace

Any possible solutions

What did you try to solve

Checklist for self-check

  • Added expected and actual behavior.
  • Added video or screenshot of bug.
  • Added isolated way to reproduce the bug.
  • Specified Flutter, Dart version and platforms.
  • Attached error code and logs.
  • All unspecified fields in the Issue description are deleted.
@himxnshudxhiyx himxnshudxhiyx added the bug Something isn't working label Jan 24, 2025
@himxnshudxhiyx
Copy link
Author

Some one please create a pull request for this.
I am not able to do this. and this is working fine when we upgrade our compile options to 35 in android/build.gradle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant