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

A RenderViewport expected a child of type RenderSliver but received a child of type RenderErrorBox. #126064

Closed
sweeneyartstudio opened this issue May 4, 2023 · 4 comments
Labels
in triage Presently being triaged by the triage team waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds

Comments

@sweeneyartstudio
Copy link

Hi everyone, please can you help me out with this issue...
i am finding it difficult retrieving data from Firestore using StremBuilder. it retrieves data once and stops working then brings up the following error...

A RenderViewport expected a child of type RenderSliver but received a child of type RenderErrorBox.

RenderObjects expect specific types of children because they coordinate with their children during layout and paint. For example, a RenderSliver cannot be the child of a RenderBox because a RenderSliver does not understand the RenderBox layout protocol.
The RenderViewport that expected a RenderSliver child was created by: Viewport ← IgnorePointer-[GlobalKey#a5fd6] ← Semantics ← Listener ← _GestureSemantics ← RawGestureDetector-[LabeledGlobalKey#a0a2b] ← Listener ← _ScrollableScope ← _ScrollSemantics-[GlobalKey#eedc1] ← NotificationListener ← RepaintBoundary ← CustomPaint ← ⋯
The RenderErrorBox that did not match the expected child type was created by: ErrorWidget-[#a5df3] ← StreamBuilder<QuerySnapshot<Object?>> ← Viewport ← IgnorePointer-[GlobalKey#a5fd6] ← Semantics ← Listener ← _GestureSemantics ← RawGestureDetector-[LabeledGlobalKey#a0a2b] ← Listener ← _ScrollableScope ← _ScrollSemantics-[GlobalKey#eedc1] ← NotificationListener ← ⋯
The relevant error-causing widget was:
StreamBuilder<QuerySnapshot<Object?>> StreamBuilder:file:///C:/Users/USER/AndroidStudioProjects/logistics_user_app/lib/Screens/cart_screen.dart:191:11
When the exception was thrown, this was the stack:
#0 ContainerRenderObjectMixin.debugValidateChild. (package:flutter/src/rendering/object.dart:3286:9)
#1 ContainerRenderObjectMixin.debugValidateChild (package:flutter/src/rendering/object.dart:3313:6)
#2 MultiChildRenderObjectElement.insertRenderObjectChild (package:flutter/src/widgets/framework.dart:6289:25)
#3 _ViewportElement.insertRenderObjectChild (package:flutter/src/widgets/viewport.dart:268:11)
#4 RenderObjectElement.attachRenderObject (package:flutter/src/widgets/framework.dart:5996:35)
#5 RenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5673:5)
#6 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3817:16)
#7 Element.updateChild (package:flutter/src/widgets/framework.dart:3551:18)
#8 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4846:16)
#9 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4977:11)
#10 Element.rebuild (package:flutter/src/widgets/framework.dart:4529:5)
#11 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2659:19)
#12 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:891:21)
#13 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:370:5)
#14 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1146:15)
#15 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1083:9)
#16 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:997:5)
#20 _invoke (dart:ui/hooks.dart:151:10)
#21 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:308:5)
#22 _drawFrame (dart:ui/hooks.dart:115:31)
(elided 3 frames from dart:async)
The element being rebuilt at the time was index 2 of 3: StreamBuilder<QuerySnapshot<Object?>>
state: _StreamBuilderBaseState<QuerySnapshot<Object?>, AsyncSnapshot<QuerySnapshot<Object?>>>#0d1ea

@huycozy huycozy added the in triage Presently being triaged by the triage team label May 5, 2023
@huycozy
Copy link
Member

huycozy commented May 5, 2023

@sweeneyartstudio
Please see this StackOverflow answer if it can help.

Also, the goal of this Github repo is not to give assistance on personal code or the whole package/plugin project, but to improve Flutter framework reporting bugs or feature requests.

If you encounter behavior that you believe could be a bug, please provide a completed and minimal reproducible code sample that represents the problem. Also, please provide the output of flutter doctor -v as well.

Instead, if you think that the issue might depend on your implementation, please see flutter's community for resources and ask questions like this. You may also get some help if you post it on Stack Overflow and flutterhelp.

@huycozy huycozy added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 5, 2023
@sweeneyartstudio
Copy link
Author

Thanks a lot. I will do that

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 5, 2023
@huycozy huycozy added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 5, 2023
@github-actions
Copy link

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now.
If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones.
Thanks for your contribution.

@github-actions
Copy link

github-actions bot commented Jun 9, 2023

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
in triage Presently being triaged by the triage team waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds
Projects
None yet
Development

No branches or pull requests

2 participants