flet-dev / flet

Flet enables developers to easily build realtime web, mobile and desktop apps in Python. No frontend experience required.
https://flet.dev
Apache License 2.0
11.61k stars 455 forks source link

app install from google play show white screen #3981

Closed jaychia0418 closed 2 months ago

jaychia0418 commented 2 months ago

Duplicate Check

Describe the bug

I build apk and aab with this command flet build --project myapp--product myapp--org myorg--include-packages flet_lottie flet_video --build-number 1 --build-version 1.0.0 apk flet build --project myapp--product myapp--org myorg--include-packages flet_lottie flet_video --build-number 1 --build-version 1.0.0 aab

can run properly on my device, but when I upload and install from google play store, it show me white screen, why?

no error when build apk and aab

Code sample

Code ```python [Paste your code here] ```

To reproduce

  1. build apk and aab
  2. install on my device - no problem
  3. upload aab to google play
  4. install from google play
  5. show white screen

Expected behavior

No response

Screenshots / Videos

Captures [Upload media here]

Operating System

Windows

Operating system details

windows 11

Flet version

0.23.2

Regression

No, it isn't

Suggestions

No response

Logs

Logs ```console [Paste your logs here] ```

Additional details

No response

Muddassir-Farooq-official commented 2 months ago

Share app link

jaychia0418 commented 2 months ago

https://play.google.com/store/apps/details?id=jay.chia.JayCounter

jaychia0418 commented 2 months ago

Share app link

apk https://drive.google.com/file/d/16nhaDkO_96t_BBLK4l1zMJh1Qi6lbBFf/view?usp=sharing

aab https://drive.google.com/file/d/1e-_fBk-aNnlo_41bYrYq7dwPiWiB-Hgw/view?usp=sharing

google play link (google play closed test) https://play.google.com/store/apps/details?id=jay.chia.JayCounter

Muddassir-Farooq-official commented 2 months ago

You are right there is an issue with aab and showing white screen I think this issue occurred because after flet 0.21 same thing occur in apk but flet team resolve it I think they forgot to sort this aab issue have you clear cookies butter cache? @ndonkoHenri and @FeodorFitsner kindly have a look

jaychia0418 commented 2 months ago

what is cookies butter cache and how to clear if I change my flet version to 0.21.2 will fix this issue?

Muddassir-Farooq-official commented 2 months ago

It is fixed in Flet 0.23.1.

Please cleanup Cookiecutter cache before running flet build command.

On Windows:

rd /s /q %USERPROFILE%.cookiecutters On Mac/Linux:

rm -rf ~/.cookiecutters> what is cookies butter cache and how to clear

if I change my flet version to 0.21.2 will fix this issue?

jaychia0418 commented 2 months ago

Will try

Muddassir-Farooq-official commented 2 months ago

Will try

Also inform me

jaychia0418 commented 2 months ago

Will try

Also inform me

I have try cleanup Cookiecutter cache before running flet build command, still same

I upload aab without sign to google play and install, can run properly, but signed aab still show me white screen

unsign aab can upload to google play internal app sharing only, cannot release to user

build unsign aab command flet build --project JayCounter --product JayCounter --org jay.chia --include-packages flet_lottie flet_video --build-number 14 --build-version 4.8.2 aab

build signed aab command flet build --project JayCounter --product JayCounter --org jay.chia --include-packages flet_lottie flet_video --build-number 14 --build-version 4.8.2 --template-dir C:/Users/chiaj/OneDrive/Desktop/flet-build-template-main/flet-build-template-main aab

unsign aab https://play.google.com/apps/test/RQOBynJGvow/ahAO29uNTWPR1gSn-_3dBsDFBuMXYC9NNvpXztr76kBpwp6hj2E0FAaeqD6hrcF7obuM3hhbbA8LA2JvWP95A4sIpW signed aab https://play.google.com/apps/test/RQOBynJGvow/ahAO29uNRqk7Pu0xUch-Ya9OGDFG3LP9ERrAwtfvhYQdrAgQ9UMomQCnrkC_a2RH6JguFjEJGE3EEzR3j8ozBdf0Ew

Muddassir-Farooq-official commented 2 months ago

What process you apply for generating signed aab

jaychia0418 commented 2 months ago

I update the android/app/build.gradle to signed aab, add key.properties and chnage buildTypes to release

def keystoreProperties = new Properties() def keystorePropertiesFile = rootProject.file('key.properties') if (keystorePropertiesFile.exists()) { keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) }

signingConfigs { release { keyAlias keystoreProperties['keyAlias'] keyPassword keystoreProperties['keyPassword'] storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null storePassword keystoreProperties['storePassword'] } }

buildTypes {
    release {
        // TODO: Add your own signing config for the release build.
        // Signing with the debug keys for now, so `flutter run --release` works.
        signingConfig signingConfigs.release
    }
}

like this https://github.com/flet-dev/flet/issues/2868

jaychia0418 commented 2 months ago

I now can install and run properly already by adding this to the build template packagingOptions { jniLibs { useLegacyPackaging true } }

But still has one problem, the aab didn't include the package --include-package flet_lottie flet-video Screenshot_2024-09-17-12-03-38-454_jay.chia.JayCounter.png

Muddassir-Farooq-official commented 2 months ago

i build aab file but when i install from play store its blank screen

jaychia0418 commented 2 months ago

i build aab file but when i install from play store its blank screen

You mean your app also has this problem?

My app now can build an and install from play store, can run properly, but cannot use video component

Muddassir-Farooq-official commented 2 months ago

Can you share your modified build template

You mean your app also has this problem?

My app now can build an and install from play store, can run properly, but cannot use video component

jaychia0418 commented 2 months ago

Can you share your modified build template

https://drive.google.com/file/d/1dO5enMrLA_TjWv5BGlXs1sqRscOSDq97/view?usp=sharing

Muddassir-Farooq-official commented 2 months ago

Can you share your modified build template

https://drive.google.com/file/d/1dO5enMrLA_TjWv5BGlXs1sqRscOSDq97/view?usp=sharing

Can you share me your WhatsApp Number?

jaychia0418 commented 2 months ago

Can you share your modified build template

https://drive.google.com/file/d/1dO5enMrLA_TjWv5BGlXs1sqRscOSDq97/view?usp=sharing

Can you share me your WhatsApp Number?

removed

Muddassir-Farooq-official commented 2 months ago

Country code??

jaychia0418 commented 2 months ago

removed