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

StateError Bad state: RenderBox was not laid out: RenderTransform #464

Closed
akvus opened this issue Jul 25, 2024 · 4 comments · Fixed by #487
Closed

StateError Bad state: RenderBox was not laid out: RenderTransform #464

akvus opened this issue Jul 25, 2024 · 4 comments · Fixed by #487

Comments

@akvus
Copy link

akvus commented Jul 25, 2024

Describe the bug
We get the following exception in Sentry:

StateError layout_overlays.dart in AnchoredOverlay.build..

Screenshot 2024-07-25 at 11 04 41

To Reproduce

Unable to reproduce on local, we only get many reports of this issue in Sentry. Both iOS and Android.

Expected behavior
No error.

@pawanbangar
Copy link

pawanbangar commented Jul 30, 2024

make sure to wrap your startShowcase code inside
WidgetsBinding.instance.addPostFrameCallback((_) { //. your code })

this error generally happens when widget is not ready

@akvus
Copy link
Author

akvus commented Jul 31, 2024

Thank you for your answer. I verified our code and we already have all calls wrapped with addPostFrameCallback with one exception where call is done in onPressed. But also based on breadcrumbs I see that's not the problematic call. In each case we also have the if (mounted) check. Is there anything else we may be missing?

@aditya-chavda
Copy link

Hi @akvus,
Can you please share the entire stack trace with me ?

@aditya-css aditya-css added the more-info-required Provide more information label Sep 7, 2024
@akvus
Copy link
Author

akvus commented Sep 9, 2024

Hi @aditya-chavda
Sure, please find it below. Copied from Sentry. We still have never seen this while testing, but reports keep landing at Sentry.

Dart 3.4.4
Both Android and iOS, a range of different devices and versions.

box.dart in RenderBox.size at line 2201 within flutter
System
proxy_box.dart in RenderFractionalTranslation.applyPaintTransform at line 2936 within flutter
System
object.dart in RenderObject.getTransformTo at line 3354 within flutter
System
box.dart in RenderBox.localToGlobal at line 2886 within flutter
System
layout_overlays.dart in AnchoredOverlay.build.<fn>.<fn> at line 71 within showcaseview
In App
overlay.dart in _OverlayEntryWidgetState.build at line 398 within flutter
System
framework.dart in StatefulElement.build at line 5599 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5487 within flutter
System
framework.dart in StatefulElement.performRebuild at line 5650 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in StatefulElement.update at line 5673 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in Element.updateChildren at line 4058 within flutter
System
framework.dart in MultiChildRenderObjectElement.update at line 6929 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in StatefulElement.performRebuild at line 5650 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in StatefulElement.update at line 5673 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in ProxyElement.update at line 5816 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in ProxyElement.update at line 5816 within flutter
System
inherited_notifier.dart in _InheritedNotifierElement.update at line 105 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in StatefulElement.performRebuild at line 5650 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in StatefulElement.update at line 5673 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in ProxyElement.update at line 5816 within flutter
System
inherited_notifier.dart in _InheritedNotifierElement.update at line 105 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in StatefulElement.performRebuild at line 5650 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in StatefulElement.update at line 5673 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in StatefulElement.performRebuild at line 5650 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in StatefulElement.update at line 5673 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in SingleChildRenderObjectElement.update at line 6776 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in SingleChildRenderObjectElement.update at line 6776 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in ProxyElement.update at line 5816 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in ProxyElement.update at line 5816 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in StatefulElement.performRebuild at line 5650 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in StatefulElement.update at line 5673 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in ProxyElement.update at line 5816 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in ProxyElement.update at line 5816 within flutter
System
inherited_notifier.dart in _InheritedNotifierElement.update at line 105 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in StatefulElement.performRebuild at line 5650 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in StatefulElement.update at line 5673 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in StatefulElement.performRebuild at line 5650 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in StatefulElement.update at line 5673 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in SingleChildRenderObjectElement.update at line 6776 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in SingleChildRenderObjectElement.update at line 6776 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in Element.updateChildren at line 3976 within flutter
System
framework.dart in MultiChildRenderObjectElement.update at line 6929 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in StatefulElement.performRebuild at line 5650 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in StatefulElement.update at line 5673 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in StatefulElement.performRebuild at line 5650 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in StatefulElement.update at line 5673 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in ProxyElement.update at line 5816 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in SingleChildRenderObjectElement.update at line 6776 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in StatelessElement.update at line 5563 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in StatelessElement.update at line 5563 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in StatelessElement.update at line 5563 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in ProxyElement.update at line 5816 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in ProxyElement.update at line 5816 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in Element.updateChildren at line 3976 within flutter
System
framework.dart in MultiChildRenderObjectElement.update at line 6929 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in ProxyElement.update at line 5816 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in StatefulElement.performRebuild at line 5650 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in StatefulElement.update at line 5673 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in StatefulElement.performRebuild at line 5650 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in StatefulElement.update at line 5673 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in ProxyElement.update at line 5816 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in StatefulElement.performRebuild at line 5650 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in StatefulElement.update at line 5673 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in SingleChildRenderObjectElement.update at line 6776 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in ProxyElement.update at line 5816 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in SingleChildRenderObjectElement.update at line 6776 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in StatefulElement.performRebuild at line 5650 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in StatefulElement.update at line 5673 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in StatefulElement.performRebuild at line 5650 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in StatefulElement.update at line 5673 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in ProxyElement.update at line 5816 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in ProxyElement.update at line 5816 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in ProxyElement.update at line 5816 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in StatefulElement.performRebuild at line 5650 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in StatefulElement.update at line 5673 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in ProxyElement.update at line 5816 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in StatefulElement.performRebuild at line 5650 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in StatefulElement.update at line 5673 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in StatefulElement.performRebuild at line 5650 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in StatefulElement.update at line 5673 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in StatefulElement.performRebuild at line 5650 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in StatefulElement.update at line 5673 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in StatelessElement.update at line 5563 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in SingleChildRenderObjectElement.update at line 6776 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in StatelessElement.update at line 5563 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in SingleChildRenderObjectElement.update at line 6776 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in SingleChildRenderObjectElement.update at line 6776 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in StatefulElement.performRebuild at line 5650 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in StatefulElement.update at line 5673 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in Element.updateChildren at line 3976 within flutter
System
framework.dart in MultiChildRenderObjectElement.update at line 6929 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in StatefulElement.performRebuild at line 5650 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in StatefulElement.update at line 5673 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in SingleChildRenderObjectElement.update at line 6776 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in StatefulElement.performRebuild at line 5650 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in StatefulElement.update at line 5673 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in SingleChildRenderObjectElement.update at line 6776 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in ComponentElement.performRebuild at line 5512 within flutter
System
framework.dart in StatefulElement.performRebuild at line 5650 within flutter
System
framework.dart in Element.rebuild at line 5203 within flutter
System
framework.dart in StatefulElement.update at line 5673 within flutter
System
framework.dart in Element.updateChild at line 3827 within flutter
System
framework.dart in SingleChildRenderObjectElement.update at line 6776 within flutter
System

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants