alibaba / alibaba/flutter_boost

container !=null 报错

Open
#1,614 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
7.2k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

## Steps to Reproduce
**A small application to reproduce the bug(最小化可复现的demo)**

集成方式:add-to-app
打开一个新Flutter页面(withContainer:true),必现
v3.0-preview.18 没有此问题

**Flutter Boost Version** : v3.0-release.1
**Target Platform:**: android
**Target OS version/browser:**:11
**Devices:**:huawei

## Logs
══╡ EXCEPTION CAUGHT BY SERVICES LIBRARY ╞═══════════════════════
The following assertion was thrown during a platform message
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)
#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 BoostFlutterRouterApi._addInOperationQueueOrExcute (package:flutter_boost/src/boost_flutter_router_api.dart:98:17)
#6 BoostFlutterRouterApi.onContainerShow (package:flutter_boost/src/boost_flutter_router_api.dart:73:5)
#7 FlutterRouterApi.setup. (package:flutter_boost/src/messages.dart:162:15)
#8 FlutterRouterApi.setup. (package:flutter_boost/src/messages.dart:159:35)
#9 BasicMessageChannel.setMessageHandler. (package:flutter/src/services/platform_channel.dart:73:49)
#10 BasicMessageChannel.setMessageHandler. (package:flutter/src/services/platform_channel.dart:72:47)
#11 _DefaultBinaryMessenger.handlePlatformMessage (package:flutter/src/services/binding.dart:284:33)
#12 _invoke3. (dart:ui/hooks.dart:221:15)
#16 _invoke3 (dart:ui/hooks.dart:220:10)
#17 PlatformDispatcher._dispatchPlatformMessage (dart:ui/platform_dispatcher.dart:457:7)
#18 _dispatchPlatformMessage (dart:ui/hooks.dart:90:31)
(elided 5 frames from class _AssertionError and dart:async)

```
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the add-to-app case by opening a new Flutter page with `withContainer: true` on Flutter Boost v3.0-release.1. Start with `boost_lifecycle_binding.dart:96` and follow `FlutterBoostAppState.onContainerShow` and `BoostFlutterRouterApi.onContainerShow` from the stack trace; done means this flow no longer triggers the `container != null` assertion on Android 11.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.