-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
'container != null': is not true. #1607
Comments
因为刚使用flutter boost,对里面的逻辑不是很熟,通过在onContainerShow 方法debug发现第一次显示的时候确实没有找到container。 追踪了下先调了pushWithInterceptor,而里面的pushContainer比onContainerShow会慢,导致了onContainerShow的时候还页面信息还没有塞进去 |
经过多次定位,将BoostFlutterRouterApi的pushRoute方法内容改为下面就好了 感觉像是_addInOperationQueueOrExcute异步了。 我同样的环境跑example里面的项目没问题,写个空的AndroidDemo,然后以module的形式集成进去就不行。iOS也没有问题,不知道是不是什么环境导致了异样的表现。 简单的对比了下就下面一点不一样 |
一样的升级到v3.0-release.1 就会报错,也是add-to-app的方式集成 |
近期的一次提交 解决这个问题, |
iOS也有这个问题啊 |
flutterboost集成到Android原生项目中,flutter页面首次显示会报下面的错误。
flutter boost版本:v3.0-release.1
flutter sdk:2.5.3
之前使用的是v3.0-release没有这个问题
═══════════════════════════════════════════════════════
The following assertion was thrown during a scheduler callback:
'package:flutter_boost/src/boost_lifecycle_binding.dart': Failed assertion: line 96 pos 12:
'container != null': is not true.
When the exception was thrown, this was the stack:
#2 BoostLifecycleBinding.containerDidShow (package:flutter_boost/src/boost_lifecycle_binding.dart:96:12)
I/flutter: #3 FlutterBoostAppState.onContainerShow (package:flutter_boost/src/flutter_boost_app.dart:635:36)
#4 BoostFlutterRouterApi.onContainerShow. (package:flutter_boost/src/boost_flutter_router_api.dart:74:16)
#5 BoostOperationQueue.runPendingOperations (package:flutter_boost/src/boost_operation_queue.dart:23:17)
#6 FlutterBoostAppState.initState. (package:flutter_boost/src/flutter_boost_app.dart:108:36)
#7 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1143:15)
#8 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1088:9)
#9 SchedulerBinding.scheduleWarmUpFrame. (package:flutter/src/scheduler/binding.dart:863:7)
(elided 13 frames from class _AssertionError, class _RawReceivePortImpl, class _Timer, dart:async, and dart:async-patch)
══════════════════════════════════════════════════════════
The text was updated successfully, but these errors were encountered: