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

intl 0.19, remove greenrobot.eventbus to support latest version of Flutter #1102

Merged
merged 10 commits into from
Jun 22, 2024

Conversation

atavism
Copy link
Contributor

@atavism atavism commented Jun 19, 2024

No description provided.

@atavism atavism requested a review from jigar-f June 20, 2024 00:10
pubspec.yaml Show resolved Hide resolved
Copy link
Contributor

@jigar-f jigar-f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!, Just two comments.

@jigar-f
Copy link
Contributor

jigar-f commented Jun 20, 2024

@atavism The Only issue with upgrading to Flutter is this crash on android. any version less than 14 it crashes. Do you mind testing this In 11,12 or 13 and see if you are getting crash?

@atavism
Copy link
Contributor Author

atavism commented Jun 20, 2024

@atavism The Only issue with upgrading to Flutter is this crash on android. any version less than 14 it crashes. Do you mind testing this In 11,12 or 13 and see if you are getting crash?

@jigar-f Thanks! I didn't realize upgrading Flutter causes a crash on earlier versions of Android. Taking a look now

pubspec.yaml Show resolved Hide resolved
@atavism
Copy link
Contributor Author

atavism commented Jun 20, 2024

Ok, the app is crashing for me testing with a Samsung Galaxy S9 running Android 9:

06-20 10:26:53.954  6868  6868 E AndroidRuntime: Process: org.getlantern.lantern, PID: 6868
06-20 10:26:53.954  6868  6868 E AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/window/BackEvent;
06-20 10:26:53.954  6868  6868 E AndroidRuntime: 	at java.lang.reflect.Executable.getParameterTypesInternal(Native Method)
06-20 10:26:53.954  6868  6868 E AndroidRuntime: 	at java.lang.reflect.Method.getParameterTypes(Method.java:186)
06-20 10:26:53.954  6868  6868 E AndroidRuntime: 	at org.greenrobot.eventbus.SubscriberMethodFinder.findUsingReflectionInSingleClass(SubscriberMethodFinder.java:173)
06-20 10:26:53.954  6868  6868 E AndroidRuntime: 	at org.greenrobot.eventbus.SubscriberMethodFinder.findUsingInfo(SubscriberMethodFinder.java:88)
06-20 10:26:53.954  6868  6868 E AndroidRuntime: 	at org.greenrobot.eventbus.SubscriberMethodFinder.findSubscriberMethods(SubscriberMethodFinder.java:64)
06-20 10:26:53.954  6868  6868 E AndroidRuntime: 	at org.greenrobot.eventbus.EventBus.register(EventBus.java:150)
06-20 10:26:53.954  6868  6868 E AndroidRuntime: 	at org.getlantern.lantern.MainActivity.onCreate(MainActivity.kt:135)
06-20 10:26:53.954  6868  6868 E AndroidRuntime: 	at android.app.Activity.performCreate(Activity.java:7326)
06-20 10:26:53.954  6868  6868 E AndroidRuntime: 	at android.app.Activity.performCreate(Activity.java:7317)
06-20 10:26:53.954  6868  6868 E AndroidRuntime: 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
06-20 10:26:53.954  6868  6868 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3072)
06-20 10:26:53.954  6868  6868 E AndroidRuntime: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3235)
06-20 10:26:53.954  6868  6868 E AndroidRuntime: 	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
06-20 10:26:53.954  6868  6868 E AndroidRuntime: 	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
06-20 10:26:53.954  6868  6868 E AndroidRuntime: 	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
06-20 10:26:53.954  6868  6868 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1926)
06-20 10:26:53.954  6868  6868 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:106)
06-20 10:26:53.954  6868  6868 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:214)
06-20 10:26:53.954  6868  6868 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:6986)
06-20 10:26:53.954  6868  6868 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
06-20 10:26:53.954  6868  6868 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
06-20 10:26:53.954  6868  6868 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1445)

@atavism
Copy link
Contributor Author

atavism commented Jun 20, 2024

Ok, the app is crashing for me testing with a Samsung Galaxy S9 running Android 9:

It's related to this issue here: pichillilorenzo/flutter_inappwebview#2139

@atavism
Copy link
Contributor Author

atavism commented Jun 20, 2024

Ok, removing the org.greenrobot.eventbus package resolves the issue. I am making some changes to handle events using Kotlin flows instead

@jigar-f
Copy link
Contributor

jigar-f commented Jun 21, 2024

thanks, @atavism for looking into this, I will test this shortly.

@jigar-f
Copy link
Contributor

jigar-f commented Jun 21, 2024

@atavism Can we please add these proguard rules as well?
pichillilorenzo/flutter_inappwebview#2139 (comment)

@atavism
Copy link
Contributor Author

atavism commented Jun 21, 2024

@atavism Can we please add these proguard rules as well?
pichillilorenzo/flutter_inappwebview#2139 (comment)

Done c44fb24

…hared flow (#1103)

* Remove use of org.greenrobot.eventbus

* Remove use of org.greenrobot.eventbus

* Add EventHandler

* Update how we subscribe to app events

* Update how we subscribe to app events

* Update how we subscribe to app events

* clean-ups

* handle LocaleEvent

* Add proguard rules for J2ObjC Annotations
@atavism atavism changed the title update Flutter, intl and i18n_extension intl 0.19, remove greenrobot.eventbus to support latest version of Flutter Jun 21, 2024
@atavism atavism merged commit 396e05e into main Jun 22, 2024
2 checks passed
@atavism atavism deleted the atavism/update-flutter branch June 22, 2024 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants