Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Release] Page Restoration Restore Freezes and throws Dart Error: Class not found in library ''. #118565

Closed
@nandaprasetio97

Description

@nandaprasetio97

I have tried the sample given on this page regarding page restoration. When the application is running in debug mode (in app-debug.apk), the page restoration recovery is running. However, when the application is running in release (production) mode (in app-release.apk), the page restoration recovery freezes when switching from the application task via the multitask tray.

Steps to Reproduce

  1. Run flutter create --sample=widgets.RestorableRouteFuture.1 mysample for creating project based on this sample.
  2. Turn on developer mode and in these settings turn on "Don't keep activities".
  3. Run (through debug and release mode) this sample through phone/emulator.
  4. Create some in-memory state in the app on the phone, e.g. by navigating to a different screen.
  5. Background this sample app, then return to it.

Result

In Debug Mode

Expected results: Success restore its state.
Actual results: Success restore its state.

Video demonstration source: Here

In Release Mode

Expected results: Success restore its state.
Actual results: The restoration process suddenly freezes (it's been 10 seconds and it's still freezing).

Video demonstration source: Here

APK Source

APK Debug (app-debug.apk): Here
APK Release (app-release.apk): Here

Log

Using flutter doctor -v

Result:

[√] Flutter (Channel stable, 3.3.10, on Microsoft Windows [Version 10.0.19045.2364], locale en-ID)
    • Flutter version 3.3.10 on channel stable at C:\flutter-3.3.2
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 135454af32 (5 weeks ago), 2022-12-15 07:36:55 -0800
    • Engine revision 3316dd8728
    • Dart version 2.18.6
    • DevTools version 2.15.0

[√] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at C:\android\Sdk
    • Platform android-33, build-tools 33.0.1
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[X] Visual Studio - develop for Windows
    X Visual Studio not installed; this is necessary for Windows development.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components

[√] Android Studio (version 2021.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)

[√] Connected device (4 available)
    • Android SDK built for x86 (mobile) • emulator-5554 • android-x86    • Android 10 (API 29) (emulator)
    • Windows (desktop)                  • windows       • windows-x64    • Microsoft Windows [Version 10.0.19045.2364]
    • Chrome (web)                       • chrome        • web-javascript • Google Chrome 109.0.5414.74
    • Edge (web)                         • edge          • web-javascript • Microsoft Edge 108.0.1462.54

[√] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

Metadata

Metadata

Assignees

Labels

a: releaseChallenges faced when attempting to productionize an appa: state restorationRestorationManager and related APIsc: crashStack traces logged to the consoledependency: dartDart team may need to help usfound in release: 3.3Found to occur in 3.3found in release: 3.7Found to occur in 3.7frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer version

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions