Skip to content

Cannot debug hello_world example on web - null exception in static interop #123784

Closed

Description

@annagrin

Repro

  • start VSCode in flutter/examples/hello_world
  • add a breakpoint on runMain
  • start debugging on web

Expected

Debugger starts and execution pauses on the breakpoint line

Actual: exception in chrome

"Error: Expected a value of type 'FontCollectionNamespace', but got one of type 'Null'
    at Object.throw_ [as throw] (http://localhost:55836/dart_sdk.js:5454:11)
    at Object.castError (http://localhost:55836/dart_sdk.js:5413:15)
    at dart.StaticInteropType.new.as (http://localhost:55836/dart_sdk.js:7328:40)
    at Object.getProperty (http://localhost:55836/dart_sdk.js:63119:14)
    at Object.CanvasKitExtension$124get$35FontCollection [as CanvasKitExtension|get#FontCollection] (http://localhost:55836/dart_sdk.js:195764:20)
    at [_registerWithFontProvider] (http://localhost:55836/dart_sdk.js:148200:128)
    at _engine.SkiaFontCollection.new.registerDownloadedFonts (http://localhost:55836/dart_sdk.js:148282:38)
    at initializeEngineServices (http://localhost:55836/dart_sdk.js:206223:39)
    at initializeEngineServices.next (<anonymous>)
    at http://localhost:55836/dart_sdk.js:40976:33
    at _RootZone.runUnary (http://localhost:55836/dart_sdk.js:40809:59)
    at _FutureListener.thenAwait.handleValue (http://localhost:55836/dart_sdk.js:36012:29)
    at handleValueCallback (http://localhost:55836/dart_sdk.js:36583:49)
    at _Future._propagateToListeners (http://localhost:55836/dart_sdk.js:36621:17)
    at [_completeWithValue] (http://localhost:55836/dart_sdk.js:36456:23)
    at http://localhost:55836/dart_sdk.js:35653:46
    at _RootZone.runUnary (http://localhost:55836/dart_sdk.js:40809:59)
    at _FutureListener.then.handleValue (http://localhost:55836/dart_sdk.js:36012:29)
    at handleValueCallback (http://localhost:55836/dart_sdk.js:36583:49)
    at _Future._propagateToListeners (http://localhost:55836/dart_sdk.js:36621:17)
    at [_completeWithValue] (http://localhost:55836/dart_sdk.js:36456:23)
    at http://localhost:55836/dart_sdk.js:35653:46
    at _RootZone.runUnary (http://localhost:55836/dart_sdk.js:40809:59)
    at _FutureListener.then.handleValue (http://localhost:55836/dart_sdk.js:36012:29)
    at handleValueCallback (http://localhost:55836/dart_sdk.js:36583:49)
    at _Future._propagateToListeners (http://localhost:55836/dart_sdk.js:36621:17)
    at [_completeWithValue] (http://localhost:55836/dart_sdk.js:36456:23)
    at async._AsyncCallbackEntry.new.callback (http://localhost:55836/dart_sdk.js:36490:35)
    at Object._microtaskLoop (http://localhost:55836/dart_sdk.js:41119:13)
    at _startMicrotaskLoop (http://localhost:55836/dart_sdk.js:41125:13)
    at http://localhost:55836/dart_sdk.js:36846:9"

Activity

  1. annagrin commented on Mar 30, 2023

    @annagrin
    ContributorAuthor

    /cc @srujzs could you please have a look?
    /cc @ditman could this possibly be due to a change in the engine?
    /cc @christopherfujino @elliette FYI

  2. annagrin commented on Mar 30, 2023

    @annagrin
    ContributorAuthor

    Update: this is a duplicate of as #123737, closing.

  3. added
    r: duplicateIssue is closed as a duplicate of an existing issue
    on Mar 30, 2023
  4. ditman commented on Mar 30, 2023

    @ditman
    Member

    @annagrin apologies for breaking this! Thanks for finding the root issue!

  5. github-actions commented on Apr 13, 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.

  6. locked as resolved and limited conversation to collaborators on Apr 13, 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

    r: 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