flutter_boost FlutterBoostActivity url丢失导致崩溃

brgchamk  于 4个月前  发布在  Flutter
关注(0)|答案(6)|浏览(59)

booster 版本 "v3.0-null-safety-preview.17"

问题描述:

我知道booster容器必传url, 在用到的时候我都有传递, 但目前的情况是

  1. 我根本没使用FlutterBoostActivity, 项目中用到的都是BoosterFragment
  2. 用户还未运行到flutter就崩溃了, 比如用户还处于登陆页面
  3. 问题非必现, 起码我在研发期间一次没碰到过, 但是线上有报错

有其他同学碰到和我类似的问题吗? 或者能提供一些解决思路.

错误日志:
Back traces starts.
java.lang.RuntimeException: Unable to resume activity {com.xxx/com.idlefish.flutterboost.containers.FlutterBoostActivity}: java.lang.RuntimeException: Oops! The activity url are MISSED! You should override the |getUrl|, or set url via CachedEngineIntentBuilder.
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3822)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3854)
at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:51)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1816)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6718)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.RuntimeException: Oops! The activity url are MISSED! You should override the |getUrl|, or set url via CachedEngineIntentBuilder.
at com.idlefish.flutterboost.containers.FlutterBoostActivity.k(FlutterBoostActivity.java:3)
at g.g.a.h0.a(FlutterBoostPlugin.java:43)
at com.idlefish.flutterboost.containers.FlutterBoostActivity.onResume(FlutterBoostActivity.java:13)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1412)
at android.app.Activity.performResume(Activity.java:7300)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3814)
... 11 more
Back traces ends.

ykejflvf

ykejflvf1#

发生这个异常的机型基本都是 pix 3XL, 有其他人遇到类似问题吗

6tr1vspr

6tr1vspr2#

一样遇到过,而且按照提示覆写了 getUrl 也是无效的,建议不要抛出异常!

sqserrrh

sqserrrh3#

发生这个异常的机型基本都是 pix 3XL, 有其他人遇到类似问题吗

同pix 3XL 😭

vnjpjtjt

vnjpjtjt4#

在meitu的手机上我也遇见了 请问该如何解决

  • 手机信息
Mobile Information: 'model: MP1713/version: 9/sdk: 28'
Build fingerprint: 'MEITU/MP1713/MP1713:7.1.2/MEITUMP1713/7W09H48I:user/release-keys'
  • boost版本信息
flutter_boost:
    git:
      url: 'https://github.com/alibaba/flutter_boost.git'
      ref: 'v3.0-null-safety-preview.16'
sz81bmfz

sz81bmfz5#

在meitu的手机上我也遇见了 请问该如何解决

  • 手机信息
Mobile Information: 'model: MP1713/version: 9/sdk: 28'
Build fingerprint: 'MEITU/MP1713/MP1713:7.1.2/MEITUMP1713/7W09H48I:user/release-keys'
  • boost版本信息
flutter_boost:
    git:
      url: 'https://github.com/alibaba/flutter_boost.git'
      ref: 'v3.0-null-safety-preview.16'
  • 崩溃堆栈信息
Process Name:'com.chs.cxrbusinessclient'
Thread Name:'main'
Back traces starts.
java.lang.RuntimeException: Unable to resume activity {com.chs.cxrbusinessclient/com.chs.mobile.flutter_container.CaiFlutterBoostActivity}: java.lang.RuntimeException: Oops! The activity url are *MISSED*! You should override the |getUrl|, or set url via CachedEngineIntentBuilder.
	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3822)
	at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3854)
	at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:51)
	at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1816)
	at com.chs.mobile.caicommonkit.log.instrumentation.ProxyHandlerCallback.handleMessage(ProxyHandlerCallback.java:45)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	at android.os.Looper.loop(Looper.java:193)
	at android.app.ActivityThread.main(ActivityThread.java:6718)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.RuntimeException: Oops! The activity url are *MISSED*! You should override the |getUrl|, or set url via CachedEngineIntentBuilder.
	at com.idlefish.flutterboost.containers.FlutterBoostActivity.getUrl(FlutterBoostActivity.java:282)
	at com.idlefish.flutterboost.FlutterBoostPlugin.onContainerAppeared(FlutterBoostPlugin.java:284)
	at com.idlefish.flutterboost.containers.FlutterBoostActivity.onResume(FlutterBoostActivity.java:113)
	at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1412)
	at android.app.Activity.performResume(Activity.java:7300)
	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3814)
	... 12 more
Back traces end.
gblwokeq

gblwokeq6#

D/FlutterBoost_java(25850): #detachFromFlutterEngine: com.idlefish.flutterboost.containers.FlutterBoostActivity@bb8334d
D/FlutterBoost_java(25850): #onDetachedFromActivity: com.idlefish.flutterboost.FlutterBoostPlugin@a9c30de
D/FlutterBoost_java(25850): #onAttachedToActivity: com.idlefish.flutterboost.FlutterBoostPlugin@a9c30de
D/FlutterBoost_java(25850): #onAttach: PortalFragment{8df34c4} (f0482f54-60f1-4393-b89d-116c0b0e2660 id=0x7f0900b7)
D/FlutterBoost_java(25850): #onCreate: PortalFragment{8df34c4} (f0482f54-60f1-4393-b89d-116c0b0e2660 id=0x7f0900b7)
D/FlutterBoost_java(25850): #onCreateView: PortalFragment{8df34c4} (f0482f54-60f1-4393-b89d-116c0b0e2660 id=0x7f0900b7)
D/FlutterBoost_java(25850): #onContainerCreated: 233be81f-76df-433e-b97b-1b12105b8733_apps_portal_page, com.idlefish.flutterboost.FlutterBoostPlugin@a9c30de
E/FlutterBoost_java(25850): Oops! The activity url are MISSED! You should override the |getUrl|, or set url via |CachedEngineIntentBuilder.url|.
D/FlutterBoost_java(25850): #addContainer: 233be81f-76df-433e-b97b-1b12105b8733_apps_portal_page, activeContainers=2, [null,splashPage,]
D/FlutterBoost_java(25850): #onStart: PortalFragment{8df34c4} (f0482f54-60f1-4393-b89d-116c0b0e2660 id=0x7f0900b7)
D/FlutterBoost_java(25850): #onResume: isHidden=false, PortalFragment{8df34c4} (f0482f54-60f1-4393-b89d-116c0b0e2660 id=0x7f0900b7)
D/FlutterBoost_java(25850): #didFragmentShow: PortalFragment{8df34c4} (f0482f54-60f1-4393-b89d-116c0b0e2660 id=0x7f0900b7), isOpaque=true
D/FlutterBoost_java(25850): #detachFromEngineIfNeeded: com.idlefish.flutterboost.containers.FlutterBoostActivity@bb8334d
D/FlutterBoost_java(25850): #performDetach: com.idlefish.flutterboost.containers.FlutterBoostActivity@bb8334d
D/FlutterBoost_java(25850): #onDetachedFromActivity: com.idlefish.flutterboost.FlutterBoostPlugin@a9c30de
D/FlutterBoost_java(25850): #releasePlatformChannel: com.idlefish.flutterboost.containers.FlutterBoostActivity@bb8334d
D/FlutterBoost_java(25850): #onContainerAppeared: 233be81f-76df-433e-b97b-1b12105b8733_apps_portal_page, com.idlefish.flutterboost.FlutterBoostPlugin@a9c30de
E/FlutterBoost_java(25850): Oops! The activity url are MISSED! You should override the |getUrl|, or set url via |CachedEngineIntentBuilder.url|.
D/FlutterBoost_java(25850): #activateContainer: 233be81f-76df-433e-b97b-1b12105b8733_apps_portal_page,activeContainers=3, [null,splashPage,apps_portal_page,]
D/FlutterBoost_java(25850): #pushRoute start: apps_portal_page, 233be81f-76df-433e-b97b-1b12105b8733_apps_portal_page, com.idlefish.flutterboost.FlutterBoostPlugin@a9c30de
E/AndroidRuntime(25850): FATAL EXCEPTION: main
我是华为荣耀30 鸿蒙3.0 也遇到这个问题了;

相关问题