FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
127 stars 26 forks source link

iOS - Significant amount of crashes after the Flutter 3.22 update #3483

Closed isegal closed 1 day ago

isegal commented 3 months ago

Can we access your project?

Current Behavior

After updating to Flutter 3.22 and consuming FlutterFlow's pubspec updated, we are seeing 11000%+ increase in crash rate on TestFlight.

Crashes on some iOS devices but not all devices. Very hard to replicate, but significantly unstable at scale.

Expected Behavior

No random crashes

Steps to Reproduce

Create a project with the first page playing a Lottie animation

Reproducible from Blank

Bug Report Code (Required)

IT4ghcnfz5Fgobhc0bXuY+9amiE7KXp8aK00sd4bGA0dCJzuPLMQdvWlYkttcNOgYFVAO0SmmlEJ/6nqkuLLDfk6ITGCbqZY/qVcSA7wIT6ie5OBBs2WbX98HZ5hCnXD4bbQsBB4GPB2c1oFw12MGeqQdDLYN7WxImdISq/LZO4=

Visual documentation

image

Environment

- FlutterFlow version: 3.22.2
- Platform: iOS
- Browser name and version: N/A
- Operating system and version affected: iPhone 11,  iOS 17.5.1

Additional Information

FF team, please let me know how I can provide you with a TestFlight link privately.

We have a backtrace of the issue:

#0  (null) in 0x101a4c000 ()
#1  (null) in NativeCanvas._restore$Method$FfiNative ()
#2  0x000000010a4d6a88 in _NativeCanvas.restore ()
#3  0x000000010a4d6a88 in BaseLayer.draw ()
#4  0x000000010a4ee1d4 in CompositionLayer.drawLayer ()
#5  0x000000010a4d65c0 in BaseLayer.draw ()
#6  0x00000001098bed90 in LottieDrawable.draw ()
#7  0x00000001098bea64 in RenderLottie.paint ()
#8  0x000000010988d088 in RenderObject._paintWithContext ()
#9  0x000000010988cfd4 in PaintingContext.paintChild ()
#10 0x00000001098ab4a8 in RenderProxyBoxMixin.paint (#2) ()
#11 0x000000010988d088 in RenderObject._paintWithContext ()
#12 0x000000010988d6e4 in PaintingContext._repaintCompositedChild ()
#13 0x0000000109a78368 in PaintingContext.repaintCompositedChild ()
#14 0x0000000109a78368 in PipelineOwner.flushPaint ()
#15 0x0000000109a78460 in PipelineOwner.flushPaint ()
#16 0x0000000109a70810 in RendererBinding.drawFrame ()
#17 0x0000000109a70320 in WidgetsBinding.drawFrame ()
#18 0x0000000109a6fce4 in RendererBinding._handlePersistentFrameCallback (#2) ()
#19 0x0000000109a6fca8 in RendererBinding._handlePersistentFrameCallback ()
#20 0x00000001097986c4 in SchedulerBinding._invokeFrameCallback ()
#21 0x0000000109798468 in SchedulerBinding.handleDrawFrame ()
#22 0x000000010979830c in SchedulerBinding._handleDrawFrame (#2) ()
#23 0x00000001097981e4 in SchedulerBinding._handleDrawFrame ()
#24 0x0000000109767c34 in invoke ()
#25 0x000000010976a928 in PlatformDispatcher._drawFrame ()
#26 0x000000010976a8ec in drawFrame ()
#27 0x000000010976a958 in drawFrame (#2) ()
#28 (null) in stub InvokeDartCode ()
isegal commented 3 months ago

We suspect that we are looking at this upstream issue:

https://github.com/flutter/flutter/issues/149340

Dear FF team, any chance it would be possible to rollback/downgrade flutter version? Based on other reports such as crashes with dropdown widget, the latest one is not acceptable for production use.

leighajarett commented 3 months ago

Thanks for sending this over - taking a closer look!

leighajarett commented 3 months ago

We're working on a fix that we think would solve this issue - we will deploy it soon and see if it helps!

wenkaifan0720 commented 3 months ago

Hi @isegal. The project linked to the bug report code you provided contains some errors in the custom code, so I can't run it. Could you provide a test project with only the problematic Lottie animation? Thank you!

isegal commented 3 months ago

@wenkaifan0720 Unfortunately I do not have a test project as we're in a bit of a crunch. If it is any help, here is the snapshot link to the page that has the animation asset. FlutterFlow is welcome to use the asset and page layout to replicate this issue (permission is hereby granted).

https://app.flutterflow.io/snapshot/peWsn8KxR6Sq4FxRzLOq?tab=uiBuilder&page=Checkup You will likely need to ask the QA group, as this is not something that is easy to reproduce. We found that some iOS devices crash 90% of the time, and other devices never crash. It has to be a production (non debug) build.

gayatrisood12 commented 3 months ago

We're facing the same issue with dropdowns - more specifically multi select dropdowns (single select drop downs work fine). The app just shuts down when the user tries to select a value.

github-actions[bot] commented 3 months ago

This issue is stale because it has been open for 7 days with no activity. If there are no further updates, a team member will close the issue.

wenkaifan0720 commented 3 months ago

According to the linked Flutter issue (https://github.com/flutter/flutter/issues/149340), it will be fixed in Flutter 3.23.x release (the next minor release).

isegal commented 3 months ago

@agreaves I thought could use your attention and as a takeaway/feedback.

Flutter team has confirmed the crash in 3.22 and their fix is not until the 3.23 release.

https://github.com/flutter/flutter/issues/138607#issuecomment-2270477814

This puts us between a rock and a hard place.

We can't downgrade to prior version, but we also can't wait until 2.23 because we have no idea when it will be available. Switching to beta channel is also risky. We are at the scale of tens of thousands of users. I worry that if we roll out our update we will have hundreds or even thousands of customers who will not be able to get into the app.

I understand that upstream dependencies are a tough problem, but I hope that FlutterFlow can start brainstorming and thinking about ways to avoid such problems where a botched upstream flutter version is force pushed on to FlutterFlow customers with no choice but to upgrade and way to roll it back.

Ideally flutter needs an LTS version that prioritize stability above all.

isegal commented 3 months ago

@wenkaifan0720 Flutter 3.24 is out. Upon attempting to upgrade, we are not able to build the project due to a package pointer_interceptor_ios not being compatible:

Plugin pointer_interceptor:ios provides an implementation for pointer_interceptor_platform_interface
and also references a default implementation for pointer_interceptor_ios, which is currently not
supported. Ask the maintainers of pointer_interceptor to either remove the implementation via
`implements: pointer_interceptor_platform_interface` or avoid referencing a default implementation via
`platforms: ios: default_package: pointer_interceptor_ios`.

Error: Please resolve the plugin pubspec errors

FlutterFlow team, please advice. If there is no workaround for 3.22, has the testing started with 3.24?

wenkaifan0720 commented 3 months ago

We are looking into upgrading to Flutter 3.24. For this specific package, have you tried using it's latest version (0.10.1+2)?

isegal commented 3 months ago

There was a version override in pubspec.yaml for pointer_interceptor After removing it, the issue was resolved.

Additionally I had to upgrade the transient dependency for archive in order to get rid of the following error:

Error (Xcode): ../../../../.pub-cache/hosted/pub.dev/archive-3.4.6/lib/src/bzip2/bzip2.dart:5:7:
Error: Method not found: 'UnmodifiableUint8ListView'.

Could not build the application for the simulator.
Error launching application on iPhone SE (3rd generation).

Updating archive package from 3.4.6 to 3.6.1 resolved the issue (flutter pub upgrade archive).

Good news: When attempting to play the animation, our app no longer crashes on the devices that used to crash.

Tentatively confirming that 3.24 indeed may have fixed the issue.

wenkaifan0720 commented 3 months ago

We will handle these dependency upgrades when we upgrade to Flutter 3.24. And glad to hear that the crash is not happening now!

github-actions[bot] commented 2 months ago

This issue is stale because it has been open for 7 days with no activity. If there are no further updates, a team member will close the issue.

isegal commented 1 month ago

Hi FlutterFlow team,

Just checking in to confirm that 3.24 is stable at scale on our side.

Is there an ETA for FlutterFlow 3.24 upgrade?

We've been custom-building our FlutterFlow apps and running 3.24 in production. Flutter team has stated that the rendering stability fixes only made it to 3.24 and has made no patches to 3.22 since mid-July.

Currently we have to maintain a separate branch and build path to release FlutterFlow apps with 3.24. It would greatly help us once FlutterFlow upgrades to 3.24 as the extra steps to maintain the branch will no longer be necessary.

leighajarett commented 1 month ago

We're testing out the upgrade now - we are hoping to have this available in the next few releases