Success Debug Apk built with Codemagic does not work with Firebase

198 views
Skip to first unread message

Luis Barqueira

unread,
May 14, 2021, 10:46:39 AM5/14/21
to flutt...@googlegroups.com

I have successfully created a debug build with Codemagic of an Android Flutter app that uses Firebase Google Sign-In and Cloud Firestore. Im only working with Android (not IOS). The google-services.json from Firebase is used in the build of the apk with Codemagic. Im not publishing, only creating a debug build. The problem is that the app runs perfectly locally with flutter run debug (on VsCode), but with the apk build from Codemagic I can`t log in / fecth data from Cloud Firestore.

After debugging apk with Android Studio the error is as following:

2021-05-13 11:58:08.006 7011-7011/com.luisbarqueira.expenses_control E/libEGL: call to OpenGL ES API with no current context (logged once per thread) 2021-05-13 11:58:29.297 7011-7475/com.luisbarqueira.expenses_control E/flutter: [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: PlatformException(network_error, com.google.android.gms.common.api.ApiException: 7: , null, null) #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:581:7) #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:158:18) <asynchronous suspension> #2 MethodChannel.invokeMapMethod (package:flutter/src/services/platform_channel.dart:358:43) <asynchronous suspension>

Could you please help me to solve this issue?

Thank you and best regards, Luis

Balaji K S

unread,
May 14, 2021, 11:33:28 AM5/14/21
to Luis Barqueira, Flutter Development

--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/CALCwNFMrL9MLW2D8GLEG9r%3D96ohkZdKbPRveq-EZD1LEf9EKYA%40mail.gmail.com.

Luis Barqueira

unread,
May 14, 2021, 12:17:58 PM5/14/21
to Balaji K S, Flutter Development
I am going to check it. 
However, I have to say that locally with VSCode with Run it works perfectly.

The problem is with the APK debug returned from Codemagic.
Important to note that, the following build status:

== Building for Android ==

> flutter build apk --debug
Running "flutter pub get" in clone... 1,575ms

Building without sound null safety

Running Gradle task 'assembleDebug'...
Note: /Users/builder/programs/flutter_2_0_6/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.0.3/android/src/main/java/io/flutter/plugins/firebase/core/FlutterFirebaseCorePlugin.java uses or overrides a deprecated API.

Note: Recompile with -Xlint:deprecation for details.


Note: Recompile with -Xlint:deprecation for details.

Note: /Users/builder/programs/flutter_2_0_6/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-1.0.4/android/src/main/java/io/flutter/plugins/firebase/firestore/FlutterFirebaseFirestorePlugin.java uses or overrides a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

Note: /Users/builder/programs/flutter_2_0_6/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-1.0.4/android/src/main/java/io/flutter/plugins/firebase/firestore/streamhandler/TransactionStreamHandler.java uses unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.

Note: /Users/builder/programs/flutter_2_0_6/.pub-cache/hosted/pub.dartlang.org/firebase_auth-1.0.3/android/src/main/java/io/flutter/plugins/firebase/auth/FlutterFirebaseAuthPlugin.java uses or overrides a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

Note: /Users/builder/programs/flutter_2_0_6/.pub-cache/hosted/pub.dartlang.org/google_sign_in-5.0.1/android/src/main/java/io/flutter/plugins/googlesignin/GoogleSignInPlugin.java uses or overrides a deprecated API.

Note: Recompile with -Xlint:deprecation for details.
Running Gradle task 'assembleDebug'... 276.8s
✓ Built build/app/outputs/flutter-apk/app-debug.apk.

Reply all
Reply to author
Forward
0 new messages