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

The plugins cloud_firestore, cloud_functions, firebase_core... firebase_storage use a deprecated version of the Android embedding #9915

Closed
davemg3 opened this issue Nov 12, 2022 · 11 comments
Labels
plugin: core resolution: solution-provided A solution has been provided in the issue. type: bug Something isn't working

Comments

@davemg3
Copy link

davemg3 commented Nov 12, 2022

Bug report

The plugins cloud_firestore, cloud_functions, firebase_core, firebase_dynamic_links, firebase_storage, flutter_image_compress, flutter_secure_storage, map_launcher, package_info, qr_code_scanner, smart_auth use a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if these plugins support the Android V2 embedding. Otherwise, consider removing them since a future release of Flutter will remove these deprecated APIs.
If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.

Steps to reproduce

Updated my Flutter environment from 2.5.x to 3.3.8 and got the error above on a working project
It was working well on friday after the migration and suddenly on saturday impossible to do "flutter get"

Please provide a feedback as this is a stable version. Does someone encounter this issue too?

Flutter doctor

[✓] Flutter (Channel stable, 3.3.8, on macOS 12.6 21G115 darwin-x64, locale en-FR)
    • Flutter version 3.3.8 on channel stable at /Users/tutuProgramming/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 52b3dc25f6 (3 days ago), 2022-11-09 12:09:26 +0800
    • Engine revision 857bd6b74c
    • Dart version 2.18.4
    • DevTools version 2.15.0
@davemg3 davemg3 added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Nov 12, 2022
@Lyokone
Copy link
Contributor

Lyokone commented Nov 14, 2022

Hi @davemg3, we're using Flutter 3.3.8 and Android V2 Embedding, you might want to run flutter clean and ensure that all the other plugins are properly updated

@Lyokone Lyokone added the blocked: customer-response Waiting for customer response, e.g. more information was requested. label Nov 14, 2022
@darshankawar darshankawar added triage Issue is currently being triaged. and removed Needs Attention This issue needs maintainer attention. labels Nov 14, 2022
@davemg3
Copy link
Author

davemg3 commented Nov 14, 2022

Hi @Lyokone

I have tested on 3 different previously working projects including one with few plugins as :

cupertino_icons: ^1.0.3
 collection : ^1.16.0
 firebase_core: ^2.2.0
 cloud_firestore: ^4.0.5
 firebase_auth: ^4.0.2
 firebase_storage: ^11.0.5
 cloud_functions: ^4.0.4
 google_maps_flutter: ^2.1.1

I did pub clean, pub get, reboot of mac, invalidate cache restart of android studio so many times this weekend but doesnt work anymore while everything was ok on 11/11

It seems not project related but maybe link to my android studio platform or the firestore plugin i catch in my external library when pub get.

Did you clean,get recently?

@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 Nov 14, 2022
@davemg3
Copy link
Author

davemg3 commented Nov 14, 2022

I created a new Flutter project with only firebase_core: ^2.2.0 dependency

and updated Android Studio but still doesnt work. Any idea ?


[✓] Flutter (Channel stable, 3.3.8, on macOS 12.6 21G115 darwin-x64, locale en-FR)
    • Flutter version 3.3.8 on channel stable at /Users/.../Programming/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 52b3dc25f6 (6 days ago), 2022-11-09 12:09:26 +0800
    • Engine revision 857bd6b74c
    • Dart version 2.18.4
    • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/.../Library/Android/sdk
    • Platform android-33, build-tools 31.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 13F100
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

@darshankawar
Copy link

@davemg3
In your above project, do you see below entry in manifest file ?

<meta-data
            android:name="flutterEmbedding"
            android:value="2" />

firebase_core plugin example already seems to be on v2:

https://github.com/firebase/flutterfire/blob/master/packages/firebase_core/firebase_core/example/android/app/src/main/AndroidManifest.xml

@darshankawar darshankawar added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Nov 15, 2022
@davemg3
Copy link
Author

davemg3 commented Nov 15, 2022

@darshankawar , yes all my projects have been migrated to Android V2 according to the migration page and they all get this meta data

      <meta-data
            android:name="flutterEmbedding"
            android:value="2" />

Especially the empty test project created from scratch with only the firebase_core: ^2.2.0 dependency added gets also automatically this meta data in manifest file

@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 Nov 15, 2022
@darshankawar
Copy link

Can you try by running the same project from terminal instead of from Android Studio and see if you still get same log ?

@darshankawar darshankawar added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Nov 15, 2022
@davemg3
Copy link
Author

davemg3 commented Nov 15, 2022

Hi @darshankawar ,
If you mean pub clean/get from terminal instead of android studio, this is my preferred way so already done also (both way, same result with above empty test project)..:(

@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 Nov 15, 2022
@davemg3
Copy link
Author

davemg3 commented Nov 15, 2022

@darshankawar , on an new project, i have tested with 3 firebase dependencies and found out the version level below above which it breaks :

   OK = > NOK
 1) firebase_storage: ^10.3.1 =>   firebase_storage: ^11.0.5
 2) cloud_firestore: ^3.5.1 => cloud_firestore: ^4.0.0
 3) firebase_core: ^1.9.24=>  firebase_core: ^2.2.0

All 3 cases, tested separately share the same breaking change and provide the same deprecated version of the Android embedding message :

BREAKING FEAT: Firebase iOS SDK version: 10.0.0 (#9708). (9627c56a)

Does this provide any clue?

For note : on my main project, all my firebase dependency got upgraded to latest version cause i was trying to solve the following issue, still pending from my side : #9231. I have also upgraded my dart sdk, flutter and android studio to latest version as per above Flutter doctor

@darshankawar
Copy link

Thanks for the update. Keeping this issue open for further insights from the team, as I am unable to replicate this behavior.

/cc @Lyokone

@darshankawar darshankawar added platform: android Issues / PRs which are specifically for Android. plugin: core and removed Needs Attention This issue needs maintainer attention. triage Issue is currently being triaged. platform: android Issues / PRs which are specifically for Android. labels Nov 16, 2022
@davemg3
Copy link
Author

davemg3 commented Nov 18, 2022

Thanks for the update. Keeping this issue open for further insights from the team, as I am unable to replicate this behavior.

/cc @Lyokone

@darshankawar , thanks for direction
I have deleted the updated Flutter/Dart and reinstalled the same versions by downloading from official website
Ok now.

@darshankawar
Copy link

Thanks for the update. Closing this as resolved based on above comment. If you again come across this issue, write in comments and I'll reopen it for further analysis.

@darshankawar darshankawar added the resolution: solution-provided A solution has been provided in the issue. label Nov 18, 2022
@firebase firebase locked and limited conversation to collaborators Dec 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
plugin: core resolution: solution-provided A solution has been provided in the issue. type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants