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

Black screen on 4.8.0 (wrong Entrypoint) for F-Droid #4261

Closed
Tracked by #3872
mondlicht-und-sterne opened this issue Jul 1, 2023 · 34 comments
Closed
Tracked by #3872

Black screen on 4.8.0 (wrong Entrypoint) for F-Droid #4261

mondlicht-und-sterne opened this issue Jul 1, 2023 · 34 comments
Labels
🐛 bug Something isn't working F-Droid fixed ? This bug might already be fixed. If so, close it. 🎯 P0 ⭐ top bug Top bug. ⭐ top issue Top issue.

Comments

@mondlicht-und-sterne
Copy link

My phone:
Samsung S21 5G, Android 13

I installed the new version 4.8.0, start the app and see only the black screen:
Screenshot_20230701_072937

@BDGreyson
Copy link

I ASSUME my problem is the same issue, so I'm adding it to this one:

Since updating to 4.8.0 the app doesn't open anymore. But instead of a black screen it hangs at the main logo.

Exiting the app, clearing app data, restarting the device, none of it helped.

Info:

Device: Huawei P30 Pro (VOG-L29)
Android 10 (Huawei EMUI 12.0.0)
Build Number: 12.0.0.149
Kernel Version: 4.14.116
OpenFoodFacts Version 4.8.0 from F-Droid
Stock Huawei ROM with Google Services
No root

I'll gladly add any further info if I can.

Screenshot:

Screenshot_20230701_084518_openfoodfacts github scrachx openfood

@teolemon
Copy link
Member

teolemon commented Jul 1, 2023

@M123-dev @g123k @monsieurtanuki The good news is that we can install the older version in case it's a DB migration issue

@teolemon
Copy link
Member

teolemon commented Jul 1, 2023

Thanks for the report @BDGreyson @mondlicht-und-sterne would you be able to get ADB logs ?

@monsieurtanuki
Copy link
Contributor

I may be able to somehow reproduce it: when developing, sometimes I had a black screen for up to 5 seconds, then a correct app start.
I assumed it was some kind of temporary memory issue on my low tech smartphone, while it was digesting the app.

@teolemon
Copy link
Member

teolemon commented Jul 1, 2023

I thought it was a F-Droid specific issue (we're upgrading from the old app, with all the associated risks)

@teolemon
Copy link
Member

teolemon commented Jul 1, 2023

I can reproduce on my phone (installing previous version from F-Droid, then upgrading)

@MartinJM
Copy link

MartinJM commented Jul 1, 2023

I have the same issue. Logs: openfoodfacts.adb.log

@teolemon
Copy link
Member

teolemon commented Jul 1, 2023

07-01 10:17:23.192 6474 6509 I flutter : --------
07-01 10:17:23.192 6474 6509 I flutter : The app must not be started using the main.dart file
07-01 10:17:23.192 6474 6509 I flutter : Please start the app using:
07-01 10:17:23.192 6474 6509 I flutter : - flutter run -t lib/entrypoints/android/main_google_play.dart
07-01 10:17:23.192 6474 6509 I flutter : - flutter run -t lib/entrypoints/ios/main_ios.dart
07-01 10:17:23.192 6474 6509 I flutter : More information here: https://github.com/openfoodfacts/smooth-app#how-to-run-the-project
07-01 10:17:23.192 6474 6509 I flutter : --------
07-01 10:17:23.193 6474 6509 E flutter : [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value
07-01 10:17:23.193 6474 6509 E flutter : #0 BindingBase.checkInstance (package:flutter/src/foundation/binding.dart:384)
07-01 10:17:23.193 6474 6509 E flutter : #1 ServicesBinding.instance (package:flutter/src/services/binding.dart:55)
07-01 10:17:23.193 6474 6509 E flutter : #2 _findBinaryMessenger (package:flutter/src/services/platform_channel.dart:136)
07-01 10:17:23.193 6474 6509 E flutter : #3 MethodChannel.binaryMessenger (package:flutter/src/services/platform_channel.dart:269)
07-01 10:17:23.193 6474 6509 E flutter : #4 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:303)
07-01 10:17:23.193 6474 6509 E flutter : #5 OptionalMethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:577)
07-01 10:17:23.193 6474 6509 E flutter : #6 SystemNavigator.pop (package:flutter/src/services/system_navigator.dart:28)
07-01 10:17:23.193 6474 6509 E flutter : #7 main (package:smooth_app/main.dart:50)
07-01 10:17:23.193 6474 6509 E flutter : #8 _runMain. (dart:ui/hooks.dart:131)
07-01 10:17:23.193 6474 6509 E flutter : #9 _delayEntrypointInvocation. (dart:isolate-patch/isolate_patch.dart:296)
07-01 10:17:23.193 6474 6509 E flutter : #10 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:189)
07-01 10:17:23.193 6474 6509 E flutter :
07-01 10:17:28.314 6474 6689 D ProfileInstaller: Installing profile for openfoodfacts.github.scrachx.openfood

@teolemon
Copy link
Member

teolemon commented Jul 1, 2023

@teolemon
Copy link
Member

teolemon commented Jul 1, 2023

@BDGreyson
Copy link

I personally am obviously too dumb to get any logfiles, or, at least not filtered by app. (I have no clue about dev stuff), but I hope the others' logs will help to get it working.

Thanks for all the quick replies. :-)

@BDGreyson
Copy link

Okay, here's...something I managed to figure out ADB commands, but as it looks totally different from the other logs, I guess it's quite useless, but as said, I'm sadly technically mostly clueless about all of this. Very short, no mention of "flutter" like in the other logs here, so, yeah, no clue on how to get this right.
logcat-food.txt

@monsieurtanuki
Copy link
Contributor

We do have a f-droid entry point though https://github.com/openfoodfacts/smooth-app/blob/develop/packages/smooth_app/lib/entrypoints/android/main_fdroid.dart

@teolemon we have that file, that doesn't mean we do use it.

@teolemon teolemon changed the title Black screen on 4.8.0 Black screen on 4.8.0 (wrong Entrypoint) for F-Droid Jul 1, 2023
@teolemon
Copy link
Member

teolemon commented Jul 1, 2023

@monsieurtanuki are you reproducing it outside the f-droid build ?

@teolemon
Copy link
Member

teolemon commented Jul 1, 2023

I have filed an issue on the F-Droid side to ask to disable the availability of the latest build: https://gitlab.com/fdroid/fdroiddata/-/issues/3023

@MartinJM
Copy link

MartinJM commented Jul 1, 2023

Not sure how relevant it is exactly. but I just installed the fdroid version from the releases on Github (https://github.com/openfoodfacts/smooth-app/releases/download/v4.8.0/openfoodfacts-main_fdroid-v4.8.0.apk), and that one works just fine.

@teolemon
Copy link
Member

teolemon commented Jul 1, 2023

@MartinJM was your data migrated properly?

@MartinJM
Copy link

MartinJM commented Jul 1, 2023

@MartinJM was your data migrated properly?

No, it's a separate installation from the one that comes from f-droid. So they are installed side-by-side without data migration/synchronization.

@foss-
Copy link

foss- commented Jul 1, 2023

@teolemon just fyi this issue does also persist when not upgrading from a previous install. So it is not a migration issue but a general issue with opening 4.8.0 when installed from F-Droid.

Oh and thanks for bringing F-Droid builds back to life.

@M123-dev
Copy link
Member

M123-dev commented Jul 1, 2023

It should just be adding the entrypoint in the flutter build command in line 447 on the F-Droid data repo using

-t lib/entrypoints/android/main_google_play.dart

Behind flutter build apk

Ofc changed to the FDroid endpoint. Currently in Italy waiting in line at the Supermarkt won't be able to commit, if anyone else could create the PR we could resolve this

@M123-dev
Copy link
Member

M123-dev commented Jul 1, 2023

This way we don't even need to disable the release, not our code is broken it's just not started properly, when the apk is rebuild (what I hope, to be asked in the PR) we can leave it open

@monsieurtanuki
Copy link
Contributor

@monsieurtanuki are you reproducing it outside the f-droid build ?

I've just installed the 4.8.0 from Google Play (from scratch), and experienced no black screen.
I've also build in dev mode (from scratch again) with flutter run -t lib/entrypoints/android/main_fdroid.dart, and experienced no black screen either.

I've also experienced a temporary black screen not related to OFF - it's just that my smartphone is old and takes time.

@monsieurtanuki
Copy link
Contributor

It should just be adding the entrypoint in the flutter build command in line 447 on the F-Droid data repo using

-t lib/entrypoints/android/main_google_play.dart

Behind flutter build apk

Ofc changed to the FDroid endpoint. Currently in Italy waiting in line at the Supermarkt won't be able to commit, if anyone else could create the PR we could resolve this

@M123-dev This is not in github, it's more in FDroid, right?
Hey, go to the lane to the right, it's faster there ;)

@teolemon
Copy link
Member

teolemon commented Jul 1, 2023

@M123-dev https://gitlab.com/fdroid/fdroiddata/-/merge_requests/13311

@teolemon
Copy link
Member

teolemon commented Jul 1, 2023

Merged ⏲️

@antenore
Copy link

antenore commented Jul 2, 2023

Not sure how relevant it is exactly. but I just installed the fdroid version from the releases on Github (https://github.com/openfoodfacts/smooth-app/releases/download/v4.8.0/openfoodfacts-main_fdroid-v4.8.0.apk), and that one works just fine.

The same for me

@M123-dev
Copy link
Member

M123-dev commented Jul 2, 2023

Sadly the APK in the Github release and the apk on F-Droid are not the same. The one in the release is compiled by us while the one on F-Droid is compiled by them. We had missed something in the compile steps on F-Droid that's why the app did not start correctly on there.

@M123-dev M123-dev added the fixed ? This bug might already be fixed. If so, close it. label Jul 2, 2023
@7heMech
Copy link

7heMech commented Jul 2, 2023

Same issue I just installed on fdroid and grey screen

@giraudan
Copy link

giraudan commented Jul 2, 2023

Sadly the APK in the Github release and the apk on F-Droid are not the same. The one in the release is compiled by us while the one on F-Droid is compiled by them. We had missed something in the compile steps on F-Droid that's why the app did not start correctly on there.

So the fdroid version should be updated in the coming days?

@M123-dev
Copy link
Member

M123-dev commented Jul 2, 2023

Yes, the F-Droid rollout will be stopped in the next cycle and then rebuild in the next few days

@mondlicht-und-sterne
Copy link
Author

mondlicht-und-sterne commented Jul 2, 2023

Sadly the APK in the Github release and the apk on F-Droid are not the same. The one in the release is compiled by us while the one on F-Droid is compiled by them. We had missed something in the compile steps on F-Droid that's why the app did not start correctly on there.

Yes that is always the case. F-Droid builds the apk itself.


If the apk was in Izzy Repo
This is another repo-

  • there it is the same.

@teolemon
Copy link
Member

teolemon commented Jul 7, 2023

The app hasn't been updated yet. It's still under 5 days but I'm beginning to worry since the Update Known APKs yielded nothing related to Open Food Facts.

@g123k
Copy link
Collaborator

g123k commented Jul 9, 2023

The app is now updated on F-Droid, feel free to update it!

@mondlicht-und-sterne
Copy link
Author

Thank you, the update has fixed the error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working F-Droid fixed ? This bug might already be fixed. If so, close it. 🎯 P0 ⭐ top bug Top bug. ⭐ top issue Top issue.
Development

No branches or pull requests