Skip to content

[Platform-Web] App crashes with Expected a value of type 'FontCollectionNamespace', but got one of type 'Null' #123794

Closed

Description

@asashour

Steps to Reproduce

  1. Create a new web project with IntelliJ with master on 8c5d223
  2. Run it with Chrome (web)

There is an error:

Rejecting promise with error: Expected a value of type 'FontCollectionNamespace', but got one of type 'Null'
_js_helper.TypeErrorImpl.new

flutter doctor -v
[!] Flutter (Channel master, 3.9.0-19.0.pre.71, on Microsoft Windows [Version 10.0.19045.2728], locale de-DE) 
    • Flutter version 3.9.0-19.0.pre.71 on channel master at c:\use\flutter                                   
    ! Upstream repository https://github.com/asashour/flutter is not a standard remote.                       
      Set environment variable "FLUTTER_GIT_URL" to https://github.com/asashour/flutter to dismiss this error.
    • Framework revision 8c5d223bab (47 minutes ago), 2023-03-30 09:19:14 -0700                               
    • Engine revision 7d190aa0e1                                                                              
    • Dart version 3.0.0 (build 3.0.0-384.0.dev)
    • DevTools version 2.22.2
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform
      update checks and upgrades.

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at C:\Users\\AppData\Local\Android\Sdk
    • Platform android-33, build-tools 33.0.0
    • ANDROID_SDK_ROOT = C:\Users\\AppData\Local\Android\Sdk
    • Java binary at: C:\Program Files\Android\Android Studio1\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-9505619)
    • All Android licenses accepted.

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

[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.4.4)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.4.33213.308
    • Windows 10 SDK version 10.0.22000.0

[√] Android Studio (version 2022.1)
    • Android Studio at C:\Program Files\Android\Android Studio1
    • 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.15+0-b2043.56-9505619)

[√] IntelliJ IDEA Community Edition (version 2022.3)
    • IntelliJ at C:\Users\\AppData\Local\JetBrains\Toolbox\apps\IDEA-C\ch-0\223.8836.41
    • Flutter plugin version 72.1.4
    • Dart plugin version 223.8888

[√] IntelliJ IDEA Community Edition (version 2023.1)
    • IntelliJ at C:\Users\\AppData\Local\JetBrains\Toolbox\apps\IDEA-C\ch-0\231.8109.175
    • Flutter plugin version 72.1.5
    • Dart plugin version 231.8109.91

[√] IntelliJ IDEA Ultimate Edition (version 2023.1)
    • IntelliJ at C:\Users\\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\231.8109.175
    • 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
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 111.0.5563.147
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 111.0.1661.44

[√] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

Activity

  1. AleksandrUkrainets commented on Mar 31, 2023

    @AleksandrUkrainets

    I have the same error today.
    I have created new project in the VS Code.

  2. danagbemava-nc commented on Mar 31, 2023

    @danagbemava-nc
    Member

    The issue is reproducible on the master but not on beta or stable only on web in debug mode. It worked fine for me in release and profile mode.

    Steps to reproduce (on master channel)

    • Run flutter create foo and cd into foo
    • Run flutter run -d chrome

    Error logs are shown above

    flutter doctor -v(master)
    [!] Flutter (Channel master, 3.9.0-20.0.pre.54, on macOS 13.2.1 22D68 darwin-arm64, locale en-GB)
        • Flutter version 3.9.0-20.0.pre.54 on channel master at /Users/nexus/dev/sdks/flutters
        ! Warning: `flutter` on your path resolves to /Users/nexus/dev/sdks/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutters. Consider adding /Users/nexus/dev/sdks/flutters/bin to the front of your path.
        ! Warning: `dart` on your path resolves to /Users/nexus/dev/sdks/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutters. Consider adding /Users/nexus/dev/sdks/flutters/bin to the front of your path.
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision bd4c792ba4 (2 hours ago), 2023-03-31 02:37:09 -0400
        • Engine revision a6421ed6bb
        • Dart version 3.0.0 (build 3.0.0-387.0.dev)
        • DevTools version 2.22.2
        • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
        • Android SDK at /Users/nexus/Library/Android/sdk
        • Platform android-33, build-tools 33.0.0
        • Java binary at: /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/221.6008.13.2211.9619390/Android Studio.app/Contents/jbr/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 14.2)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Build 14C18
        • CocoaPods version 1.11.3
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 2022.1)
        • Android Studio at /Applications/Android Studio.app/Contents
        • 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.15+0-b2043.56-8887301)
    
    [✓] Android Studio (version 2022.1)
        • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/221.6008.13.2211.9619390/Android Studio.app/Contents
        • 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.15+0-b2043.56-8887301)
    
    [✓] Android Studio (version 2022.1)
        • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/221.6008.13.2211.9477386/Android Studio.app/Contents
        • 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.15+0-b2043.56-8887301)
    
    [✓] IntelliJ IDEA Ultimate Edition (version 2023.1)
        • IntelliJ at /Users/nexus/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app
        • Flutter plugin version 72.1.5
        • Dart plugin version 231.8109.91
    
    [✓] IntelliJ IDEA Ultimate Edition (version 2023.1)
        • IntelliJ at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/231.8109.175/IntelliJ IDEA.app
        • 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
    
    [✓] VS Code (version 1.76.2)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.60.0
    
    [✓] Connected device (3 available)
        • Nexus (mobile)  • 00008020-001875E83A38002E • ios            • iOS 16.4 20E247
        • macOS (desktop) • macos                     • darwin-arm64   • macOS 13.2.1 22D68 darwin-arm64
        • Chrome (web)    • chrome                    • web-javascript • Google Chrome 111.0.5563.146
        ! Error: Nexus is busy: Waiting to connect and unlock the device. Xcode will continue when Nexus is finished. (code -10)
    
    [✓] Network resources
        • All expected network resources are available.
    
    ! Doctor found issues in 1 category.
    
    
  3. added
    c: regressionIt was better in the past than it is now
    c: crashStack traces logged to the console
    platform-webWeb applications specifically
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    and removed
    in triagePresently being triaged by the triage team
    on Mar 31, 2023
  4. Arun789788 commented on Mar 31, 2023

    @Arun789788
  5. changed the title [-]Expected a value of type 'FontCollectionNamespace', but got one of type 'Null'[/-] [+][Platform-Web] App crashes with "Expected a value of type 'FontCollectionNamespace', but got one of type 'Null'"[/+] on Mar 31, 2023
  6. changed the title [-][Platform-Web] App crashes with "Expected a value of type 'FontCollectionNamespace', but got one of type 'Null'"[/-] [+][Platform-Web] App crashes with `Expected a value of type 'FontCollectionNamespace', but got one of type 'Null'`[/+] on Mar 31, 2023
  7. kevmoo commented on Mar 31, 2023

    @kevmoo
    Contributor

    Duplicate of #123737

    Should be fixed at latest HEAD

  8. asashour commented on Mar 31, 2023

    @asashour
    ContributorAuthor

    I am afraid it is not fixed in HEAD (now d5e25f2)

  9. RomanIvn commented on Apr 2, 2023

    @RomanIvn

    Just updated flutter and unable to debug web apps. Any way to manually bypass the issue for now? (without downgrading flutter)

    [√] Flutter (Channel main, 3.9.0-20.0.pre.84, on Microsoft Windows [Version 10.0.19044.2728], locale he-IL) • Flutter version 3.9.0-20.0.pre.84 on channel main at C:\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision cb19c0d66f (80 minutes ago), 2023-04-02 03:52:34 -0400 • Engine revision fc9c1504f9 • Dart version 3.0.0 (build 3.0.0-397.0.dev) • DevTools version 2.22.2

  10. kevmoo commented on Apr 2, 2023

    @kevmoo
    Contributor

    I don't think there's a way to work-around. We have a PR pending w/ a fix.

  11. kevmoo commented on Apr 2, 2023

    @kevmoo
    Contributor

    @RomanIvn – try deleting your flutter/bin/cache/ directory

  12. thepresencecompany commented on Apr 3, 2023

    @thepresencecompany

    Same issue, is there no work around to debug web apps?

  13. asashour commented on Apr 3, 2023

    @asashour
    ContributorAuthor

    As mentioned in #123794 (comment), deleting flutter/bin/cache/ works with me, till #123915 is merged.

  14. github-actions commented on Apr 17, 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.

  15. locked as resolved and limited conversation to collaborators on Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: debuggingDebugging, breakpoints, expression evaluationc: crashStack traces logged to the consolec: regressionIt was better in the past than it is nowfound in release: 3.9Found to occur in 3.9has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyr: duplicateIssue is closed as a duplicate of an existing issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions