Skip to content

framework canvaskit cache is not being cleared with engine rolls #123737

Description

@kevmoo

Sayith @eyebrowsoffire "So the WebBuiltInAssets target always assumes that these are static and can be cached forever. But it now copies canvaskit over from the web sdk, which is not static forever."

Activity

  1. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    platform-webWeb applications specifically
    on Mar 30, 2023
  2. kevmoo commented on Mar 31, 2023

    @kevmoo
    ContributorAuthor

    @eyebrowsoffire – reports that this is NOT fixed - #123794 (comment)

  3. eyebrowsoffire commented on Apr 1, 2023

    @eyebrowsoffire
    Contributor

    Re-opening due to further issues here. #123915 should fix it though.

  4. darshankawar commented on Apr 6, 2023

    @darshankawar
    Member

    Hello @kevmoo and @eyebrowsoffire

    I tried running a sample app on web flutter run -d chrome using latest master and main channels but still seeing below error:

    Launching lib/main.dart on Chrome in debug mode...
    Waiting for connection from debug service on Chrome...             20.0s
    This app is linked to the debug service: ws://127.0.0.1:49414/M2WfAhbvFAY=/ws
    Debug service listening on ws://127.0.0.1:49414/M2WfAhbvFAY=/ws
    
    🔥  To hot restart changes while running, press "r" or "R".
    For a more detailed help message, press "h". To quit, press "q".
    
    A Dart VM Service on Chrome is available at: http://127.0.0.1:49414/M2WfAhbvFAY=
    Rejecting promise with error: Expected a value of type 'FontCollectionNamespace', but got one of type 'Null'
    _js_helper.TypeErrorImpl.new
    
    
    

    master version: Channel master, 3.9.0-22.0.pre.56, on macOS 12.2.1 21D62

    main version: Channel main, 3.9.0-22.0.pre.56, on macOS 12.2.1 21D62

  5. eyebrowsoffire commented on Apr 6, 2023

    @eyebrowsoffire
    Contributor

    @darshankawar I haven't been able to reproduce this on my end. Does this still reproduce after you clear the browser cache?

  6. darshankawar commented on Apr 10, 2023

    @darshankawar
    Member

    @eyebrowsoffire
    No. After following #123794 (comment), I didn't get the said error, although earlier I thought that it was more of a workaround until this original issue gets fixed, so thought to report it here for your reference.

  7. mit-mit commented on Apr 10, 2023

    @mit-mit
    Member

    It looks like #123784 was closed as a dupe of the present issue, but I just hit it again in dart-lang/sdk#51998

    I think we have to fix this for 3.10!

  8. eyebrowsoffire commented on Apr 12, 2023

    @eyebrowsoffire
    Contributor

    After some digging, I was able to get my setup into a state that reproduced this problem, and I have put out a fix: #124641

  9. eyebrowsoffire commented on Apr 12, 2023

    @eyebrowsoffire
    Contributor

    To give a more clear characterization of this bug:

    Users who had the flutter repo checked out between #121902 and #123915 and used a web-based flutter tool command (such as flutter run -d chrome or flutter build web) will have stale canvaskit versions in their cache in an old location. Those artifacts confuse the web runner, and cause it to serve these stale versions of canvaskit. This, in turn, causes the user's application to crash when they run flutter run -d chrome with newer versions of the framework.

    From what I can tell, none of the existing tags (3.6, 3.7, 3.8, 3.9 or 3.10) fall within the range between those two PRs, and do not load any of these stale artifacts in the cache. #124641 fixes the issue for anyone in that state. Otherwise, the workaround is to manually delete the bin/cache/canvaskit folder.

  10. mit-mit commented on Apr 12, 2023

    @mit-mit
    Member

    OK, the fairly short window to trigger the issue lowers the priority a bit, and its nice that there is a workaround. BUT when it fails, it fails in a way that is very hard to understand (I got JS interop issues), so I still think we should pick the fix if we think it's relatively low risk of causing regressions.

  11. added
    r: fixedIssue is closed as already fixed in a newer version
    on Apr 13, 2023
  12. github-actions commented on Apr 27, 2023

    @github-actions

    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.

  13. locked as resolved and limited conversation to collaborators on Apr 27, 2023
  14. added
    P0Critical issues such as a build break or regression
    and removed on Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P0Critical issues such as a build break or regressionplatform-webWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versiontoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions