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

🐛 [firebase_firestore] gRPC-Java crash Android 11 #5971

Closed
Leptopoda opened this issue Apr 29, 2021 · 4 comments
Closed

🐛 [firebase_firestore] gRPC-Java crash Android 11 #5971

Leptopoda opened this issue Apr 29, 2021 · 4 comments
Labels

Comments

@Leptopoda
Copy link

Bug report

Describe the bug
firebase firestore can't be used on my android 11 device (android 11 in the emulator seems to work fine though).
It crashes immediately.

W/.redacted( 5616): Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getAlpnSelectedProtocol()[B (greylist-max-q,core-platform-api, reflection, denied)
W/.redacted( 5616): Accessing hidden method Lcom/android/org/conscrypt/AbstractConscryptSocket;->getAlpnSelectedProtocol()[B (greylist-max-q, reflection, denied)
E/AndroidRuntime( 5616): FATAL EXCEPTION: grpc-okhttp-0
E/AndroidRuntime( 5616): Process: de.leptopoda.bierverkostung, PID: 5616
E/AndroidRuntime( 5616): java.lang.AssertionError: Method getAlpnSelectedProtocol not supported for object SSL socket over Socket[address=firestore.googleapis.com/2a00:1450:4007:819::200a,port=443,localPort=41534]
E/AndroidRuntime( 5616):        at io.grpc.okhttp.internal.OptionalMethod.invoke(OptionalMethod.java:114)
E/AndroidRuntime( 5616):        at io.grpc.okhttp.internal.OptionalMethod.invokeWithoutCheckedException(OptionalMethod.java:135)
E/AndroidRuntime( 5616):        at io.grpc.okhttp.OkHttpProtocolNegotiator$AndroidNegotiator.getSelectedProtocol(OkHttpProtocolNegotiator.java:183)
E/AndroidRuntime( 5616):        at io.grpc.okhttp.OkHttpProtocolNegotiator$AndroidNegotiator.negotiate(OkHttpProtocolNegotiator.java:145)
E/AndroidRuntime( 5616):        at io.grpc.okhttp.OkHttpTlsUpgrader.upgrade(OkHttpTlsUpgrader.java:63)
E/AndroidRuntime( 5616):        at io.grpc.okhttp.OkHttpClientTransport$4.run(OkHttpClientTransport.java:571)
E/AndroidRuntime( 5616):        at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
E/AndroidRuntime( 5616):        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E/AndroidRuntime( 5616):        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E/AndroidRuntime( 5616):        at java.lang.Thread.run(Thread.java:923)
I/Process ( 5616): Sending signal. PID: 5616 SIG: 9
Lost connection to device.

seems to be connected to gRPC #7519

Additional context

I only get this since android 11 (but not in the emulator). Opening the app without a network connection (flightmode) does not crash the app.
Also the device does not have play services if it matters

W/GooglePlayServicesUtil( 2050): Google Play Store is missing.
E/GooglePlayServicesUtil( 2050): GooglePlayServices not available due to error 9
W/Firestore( 2050): (22.0.1) [GrpcCallProvider]: Failed to update ssl context: com.google.android.gms.common.GooglePlayServicesNotAvailableException

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, 2.0.5, on Linux, locale de_DE.UTF-8)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/linux#android-setup for more details.
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio
[✓] Connected device (3 available)

! 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.12.3
Flutter SDK 2.0.5
bierverkostung 0.9.2+1

dependencies:
- cloud_firestore 1.0.7 [cloud_firestore_platform_interface cloud_firestore_web firebase_core firebase_core_platform_interface flutter meta]
- cloud_functions 1.0.5 [cloud_functions_platform_interface cloud_functions_web firebase_core firebase_core_platform_interface flutter]
- cupertino_icons 1.0.2
- email_validator 2.0.1
- file_picker 3.0.1 [flutter flutter_web_plugins flutter_plugin_android_lifecycle plugin_platform_interface]
- firebase_auth 1.1.2 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta]
- firebase_core 1.1.0 [firebase_core_platform_interface firebase_core_web flutter meta]
- fl_chart 0.35.0 [flutter equatable pedantic]
- flutter 0.0.0 [characters collection meta typed_data vector_math sky_engine]
- flutter_archive 3.0.0 [flutter]
- flutter_localizations 0.0.0 [flutter intl characters clock collection meta path typed_data vector_math]
- intl 0.17.0 [clock path]
- path_provider 2.0.1 [flutter path_provider_platform_interface path_provider_macos path_provider_linux path_provider_windows]
- pattern_formatter 2.0.0 [flutter intl]
- provider 5.0.0 [collection flutter nested]
- qr_code_scanner 0.4.0 [flutter]
- qr_flutter 4.0.0 [flutter qr]
- random_color 1.0.6-nullsafety [flutter]

dev dependencies:
- flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher meta source_span stream_channel string_scanner term_glyph typed_data]
- lint 1.5.3
- yaml 3.1.0 [collection source_span string_scanner]

transitive dependencies:
- async 2.5.0 [collection]
- boolean_selector 2.1.0 [source_span string_scanner]
- characters 1.1.0
- charcode 1.2.0
- clock 1.1.0
- cloud_firestore_platform_interface 4.0.3 [collection firebase_core flutter meta plugin_platform_interface]
- cloud_firestore_web 1.0.7 [cloud_firestore_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js]
- cloud_functions_platform_interface 5.0.3 [firebase_core flutter meta plugin_platform_interface]
- cloud_functions_web 4.0.5 [cloud_functions_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js]
- collection 1.15.0
- equatable 2.0.0 [collection meta]
- fake_async 1.2.0 [clock collection]
- ffi 1.0.0
- file 6.1.0 [meta path]
- firebase_auth_platform_interface 4.2.0 [firebase_core flutter meta plugin_platform_interface]
- firebase_auth_web 1.1.0 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta]
- firebase_core_platform_interface 4.0.0 [flutter meta plugin_platform_interface]
- firebase_core_web 1.0.2 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
- flutter_plugin_android_lifecycle 2.0.1 [flutter]
- flutter_web_plugins 0.0.0 [flutter js characters collection meta typed_data vector_math]
- http_parser 4.0.0 [charcode collection source_span string_scanner typed_data]
- js 0.6.3
- matcher 0.12.10 [stack_trace]
- meta 1.3.0
- nested 1.0.0 [flutter]
- path 1.8.0
- path_provider_linux 2.0.0 [path xdg_directories path_provider_platform_interface flutter]
- path_provider_macos 2.0.0 [flutter]
- path_provider_platform_interface 2.0.1 [flutter meta platform plugin_platform_interface]
- path_provider_windows 2.0.1 [path_provider_platform_interface meta path flutter ffi win32]
- pedantic 1.11.0
- platform 3.0.0
- plugin_platform_interface 2.0.0 [meta]
- process 4.2.1 [file path platform]
- qr 2.0.0 [meta]
- sky_engine 0.0.99
- source_span 1.8.0 [charcode collection path term_glyph]
- stack_trace 1.10.0 [path]
- stream_channel 2.1.0 [async]
- string_scanner 1.1.0 [charcode source_span]
- term_glyph 1.2.0
- test_api 0.2.19 [async boolean_selector collection meta path source_span stack_trace stream_channel string_scanner term_glyph matcher]
- typed_data 1.3.0 [collection]
- vector_math 2.1.0
- win32 2.0.5 [ffi]
- xdg_directories 0.2.0 [meta path process]

@Leptopoda Leptopoda added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Apr 29, 2021
@markusaksli-nc markusaksli-nc added the triage Issue is currently being triaged. label Apr 29, 2021
@markusaksli-nc
Copy link
Contributor

Hi @Leptopoda
Does some specific code you have at startup that causes the issue or does it occur at just plugin registration? You can find out by stripping the code to just a blank app and then adding in firebase initialization, some firestore code etc.

Tested this with an Android 11 Oneplus 8 with google play services and didn't see any crash. As far as I know, play services are necessary to communicate with firebase.
Thank you

@markusaksli-nc markusaksli-nc added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Apr 29, 2021
@Leptopoda
Copy link
Author

Leptopoda commented Apr 29, 2021

As far as I know, play services are necessary to communicate with firebase.

from https://firebase.google.com/docs/android/android-play-services

Product Library Google Play services?
Cloud Firestore com.google.firebase:firebase-firestore:22.1.2 com.google.firebase:firebase-firestore-ktx:22.1.2 Not Required

Also Firebase Auth is working fine (can't test cloud functions rn)

Does some specific code you have at startup that causes the issue or does it occur at just plugin registration? You can find out by stripping the code to just a blank app and then adding in firebase initialization, some firestore code etc.

Sorry for not being specific enough
The problem seems to be when reading or writing to firestore

I guess I'm wrong here so could you point me to where I can report this to the Firebase Android team?

@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Apr 29, 2021
@markusaksli-nc
Copy link
Contributor

You can open an issue at https://github.com/firebase/firebase-android-sdk/issues and/or https://firebase.google.com/support/troubleshooter/report/bugs

Labelling this for now just based on the report since reading or writing through the package causes the crash.

@markusaksli-nc markusaksli-nc added plugin: cloud_firestore type: crash A compile error or crash and removed Needs Attention This issue needs maintainer attention. triage Issue is currently being triaged. type: bug Something isn't working labels Apr 29, 2021
@Leptopoda
Copy link
Author

Thanks again for the help
I'm currently in contact with support so I'll close this one for now

@firebase firebase locked and limited conversation to collaborators Jun 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants