SimformSolutionsPvtLtd / flutter_showcaseview

Flutter plugin that allows you to showcase your features on flutter application. 👌🔝🎉
https://pub.dev/packages/showcaseview
MIT License
1.48k stars 433 forks source link

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

Open akvus opened 1 month ago

akvus commented 1 month ago

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 commented 1 month ago

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

this error generally happens when widget is not ready

akvus commented 1 month ago

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 commented 6 days ago

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

akvus commented 4 days ago

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