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

No certificate found under alias error #58

Closed
chris-wickens opened this issue Jun 20, 2019 · 8 comments
Closed

No certificate found under alias error #58

chris-wickens opened this issue Jun 20, 2019 · 8 comments

Comments

@chris-wickens
Copy link

Caused by java.lang.Exception: No certificate found under alias: com.*.*.FlutterSecureStoragePluginKey at com.*.*.encryption.RSACipher18Implementation.getPublicKey + 91(RSACipher18Implementation.java:91) at com.*.*.encryption.RSACipher18Implementation.wrap + 38(RSACipher18Implementation.java:38) at com.*.*.encryption.StorageCipher18Implementation.<init> + 56(StorageCipher18Implementation.java:56)

Hi, I've pulled this library into our native app ahead of launching our Flutter app and seen crash reports on a variety of Samsung Galaxy devices. Any idea what could be causing this issue?

@mogol
Copy link
Collaborator

mogol commented Jun 29, 2019

Hi @Rekubot
Are there any other logs?

@chris-wickens
Copy link
Author

None in the crash reports, and I haven't been able to reproduce the issue myself.

@prprhyt
Copy link

prprhyt commented Jul 20, 2019

I have the same problem in pixel3a(Android 9.0).

@tuarrep
Copy link

tuarrep commented Jul 16, 2020

This bug bubbled for me today. Cleaning app data fixed it

@bismarabia
Copy link

I'm also having the same issue. Android 9.0 Pixel2.
Here is Flutter doctor output

[✓] Flutter (Channel beta, 1.22.0-12.1.pre, on Mac OS X 10.15.4 19E287, locale en-TR)
    • Flutter version 1.22.0-12.1.pre at /Users/bisma/Desktop/Flutter/flutter
    • Framework revision 8b3760638a (3 weeks ago), 2020-09-15 17:47:13 -0700
    • Engine revision 4654fc6cf6
    • Dart version 2.10.0 (build 2.10.0-110.3.beta)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /Users/bisma/Library/Android/sdk
    • Platform android-29, build-tools 29.0.3
    • Java binary at: /Applications/Android Studio/Android Studio 4.1 Preview.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.4.1, Build version 11E503a
    • CocoaPods version 1.10.0.rc.1

[!] Android Studio
    • Android Studio at /Applications/Android Studio/Android Studio 4.1 Preview.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[!] IntelliJ IDEA Ultimate Edition (version 2019.3.2)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.dev/intellij-setup/#installing-the-plugins

[!] VS Code (version 1.49.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    ✗ Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

Any further development regarding this?

@PieterAelse
Copy link
Contributor

We are also noticing this issue on our app.. For example on a Pixel 4a, Android 11.
@mogol Do you have any idea what might be the cause?

@PieterAelse
Copy link
Contributor

Logs:

03-27 11:08:44.933 22599 22656 E flutter : [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: PlatformException(Exception encountered, read, javax.crypto.BadPaddingException: error:1e000065:Cipher functions:OPENSSL_internal:BAD_DECRYPT
03-27 11:08:44.933 22599 22656 E flutter : at com.android.org.conscrypt.NativeCrypto.EVP_CipherFinal_ex(Native Method)
03-27 11:08:44.933 22599 22656 E flutter : at com.android.org.conscrypt.OpenSSLEvpCipher.doFinalInternal(OpenSSLEvpCipher.java:152)
03-27 11:08:44.933 22599 22656 E flutter : at com.android.org.conscrypt.OpenSSLCipher.engineDoFinal(OpenSSLCipher.java:374)
03-27 11:08:44.933 22599 22656 E flutter : at javax.crypto.Cipher.doFinal(Cipher.java:2055)
03-27 11:08:44.933 22599 22656 E flutter : at d.g.a.b.b.b(Unknown Source:32)
03-27 11:08:44.933 22599 22656 E flutter : at d.g.a.a.b(Unknown Source:11)
03-27 11:08:44.933 22599 22656 E flutter : at d.g.a.a.d(Unknown Source:7)
03-27 11:08:44.933 22599 22656 E flutter : at d.g.a.a.a(Unknown Source:0)
03-27 11:08:44.933 22599 22656 E flutter : at d.g.a.a$b.run(Unknown Source:160)
03-27 11:08:44.933 22599 22656 E flutter : at android.os.Handler.handleCallback(Handler.java:938)
03-27 11:08:44.933 22599 22656 E flutter : at android.os.Handler.dispatchMessage(Handler.java:99)
03-27 11:08:44.933 22599 22656 E flutter : at android.os.Looper.loop(Looper.java:223)
03-27 11:08:44.933 22599 22656 E flutter : at android.os.HandlerThread.run(HandlerThread.java:67)
03-27 11:08:44.933 22599 22656 E flutter : , null)
03-27 11:08:44.933 22599 22656 E flutter : #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:582)
03-27 11:08:44.933 22599 22656 E flutter : #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:159)
03-27 11:08:44.933 22599 22656 E flutter :
03-27 11:08:44.933 22599 22656 E flutter : #2 FlutterSecureStorage.read (package:flutter_secure_storage/flutter_secure_storage.dart:45)
03-27 11:08:44.933 22599 22656 E flutter :

@juliansteenbakker
Copy link
Owner

This error can be thrown when the encryption or decryption key is not correct. Probably it became corrupted. I don't have a fix for this because it can have numerous causes. Also, there have been changes made to this package. Please try again with the latest version and if this issue is still occurring please comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants