Skip to content

[Bug] Local Run error on Android after FlutterFlow 4.1.34 #2572

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

Closed
3 tasks done
zhengyishen0 opened this issue Mar 22, 2024 · 12 comments
Closed
3 tasks done

[Bug] Local Run error on Android after FlutterFlow 4.1.34 #2572

zhengyishen0 opened this issue Mar 22, 2024 · 12 comments
Labels
status: can't reproduce Following the reported steps did not reproduce the bug.

Comments

@zhengyishen0
Copy link

zhengyishen0 commented Mar 22, 2024

Has your issue been reported?

  • I have searched the existing issues and confirm it has not been reported.
  • I give permission for members of the FlutterFlow team to access and test my project for the sole purpose of investigating this issue.

Current Behavior

Both the Local Run and the exported project cannot run on Android devices.

  • It's working on the web and iOS.
  • And it was working on Android before the FlutterFlow app update

Expected Behavior

No error, run the app.

Steps to Reproduce

Hit local run or follow the instruction to export the code and run with flutter.

Reproducible from Blank

  • The steps to reproduce above start from a blank project.

Bug Report Code (Required)

ITESls/l7YVgrulB7s7qLcBAhR4mJkQ5a7lF1u1HUQwbIYOvBIwpWszTP0taTc+YTVZAI1qghmEe3MLTifHfN8BcGAyHY4hJws1qERWWVkWRR8WsC6uwVHFQL+dRN32O3ImzmhV7KrZZZVFpig/GSw==

Context

I want to do hot reload testing on the FlutterFlow app. No I can only go back to test using the old test sessions on cloud.

Visual documentation

This is the error message. I got it when I tried to run the exported code manually. Hope it will help.

Additional Info

No response

Environment

- FlutterFlow version: 4.1.34
- Platform: Macbook Air M1, 8g, 256g.
- Browser name and version:
- Operating system and version affected: MacOS Sonoma 14.3.1 (23D60)
@zhengyishen0 zhengyishen0 added the status: needs triage A potential issue that has not been confirmed as a bug. label Mar 22, 2024
@zeymermontes
Copy link

That is the same Error reported on this issue
#2571

@zeymermontes
Copy link

@zhengyishen0 Btw, be careful, you just exposed you Api Key and Info for your Firebase DB. I recommend you revoke those keys

@sabatage3
Copy link

I'm having the same issue, the problem seems to be related to Firebase, dependencies maybe?, and it only happens on Android devices (real or emulated, it doesn't matter), I only get a white screen, please help

image

@zhengyishen0
Copy link
Author

zhengyishen0 commented Mar 22, 2024

I've fixed this issue with two solutions

The best solution
Add these two lines in the lib/backend/firebase/firebase_config.dart

import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/foundation.dart';
import '../../firebase_options.dart'; // add this line

Future initFirebase() async {
  if (kIsWeb) {
    await Firebase.initializeApp(
        options: FirebaseOptions(
          ...
  } else {
    await Firebase.initializeApp(
      options: DefaultFirebaseOptions.currentPlatform, // add this line
    );
  }
}

The run following command to configure the Firebase project if you haven't done it yet.

flutterfire configure

An alternative way
add the value.xml file under the path android/app/src/main/res/values/values.xml in the structure below.

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="google_api_key" translatable="false">YOUR_GOOGLE_API_KEY</string>
    <string name="gcm_defaultSenderId" translatable="false">YOUR_SENDER_ID</string>
    <string name="google_app_id" translatable="false">YOUR_APP_ID</string>
    <string name="google_crash_reporting_api_key" translatable="false">YOUR_CRASH_REPORTING_API_KEY</string>
    <string name="google_storage_bucket" translatable="false">YOUR_STORAGE_BUCKET</string>
    <string name="project_id" translatable="false">YOUR_PROJECT_ID</string>
</resources>

Hope you guys can fix this issue soon in the next update

@zhengyishen0
Copy link
Author

zhengyishen0 commented Mar 22, 2024

@zhengyishen0 Btw, be careful, you just exposed you Api Key and Info for your Firebase DB. I recommend you revoke those keys

Thanks for the reminder. @zeymermontes

@trevorFields
Copy link

hmm... i updated my ff code and i saw they rolled back a line of code from 4.4 to
id "com.google.gms.google-services" version "4.3.8" apply false

my project on anrdoid built, so the fix maybe out for now so projects at least build on android.

glad i saw this thread, i had tried hunting this down for a while and saw it wasn't just me on the anroid build issues.

@zeymermontes
Copy link

I just managed to do local run and build apk

@sabatage3
Copy link

sabatage3 commented Mar 29, 2024

It has been working for a while now...most of the time

Copy link

github-actions bot commented Apr 7, 2024

This issue is stale because it has been open for 7 days with no activity. If there are no further updates, a team member will close the issue.

@rzambroni rzambroni removed status: needs triage A potential issue that has not been confirmed as a bug. status: stale labels Apr 8, 2024
Copy link
Collaborator

Hey @zhengyishen0, sorry about the delayed answer. I was trying to replicate this issue but I couldn’t. Are you still experiencing that?

@sabatage3
Copy link

After recent updates, the software has been stable. However, there are still several other bugs. I think this issue should be closed now

Copy link
Collaborator

Hey @sabatage3, thanks for letting us know. Closing this.

@rzambroni rzambroni added the status: can't reproduce Following the reported steps did not reproduce the bug. label Apr 13, 2024 — with Linear
@rzambroni rzambroni closed this as not planned Won't fix, can't repro, duplicate, stale Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: can't reproduce Following the reported steps did not reproduce the bug.
Projects
None yet
Development

No branches or pull requests

5 participants