Skip to content

Router crashed if RouteInformation.state is not a string #87823

@chunhtai

Description

@chunhtai

Runs the book_store example of https://github.com/tomgilder/routemaster/tree/main/example will cause the crash

Error: Expected a value of type 'String?', but got one of type '_JsonMap'
    at Object.throw_ [as throw] (http://localhost:62458/dart_sdk.js:5087:11)
    at Object.castError (http://localhost:62458/dart_sdk.js:5046:15)
    at Object.cast [as as] (http://localhost:62458/dart_sdk.js:5371:17)
    at dart.NullableType.new.as (http://localhost:62458/dart_sdk.js:6874:60)
    at Object.JsonExtensions$124tryString [as JsonExtensions|tryString] (http://localhost:62458/dart_sdk.js:181075:25)
    at _engine.EngineSingletonFlutterWindow.new.<anonymous> (http://localhost:62458/dart_sdk.js:176611:168)
    at Generator.next (<anonymous>)
    at runBody (http://localhost:62458/dart_sdk.js:38671:34)
    at Object._async [as async] (http://localhost:62458/dart_sdk.js:38702:7)
    at http://localhost:62458/dart_sdk.js:176586:57
    at _engine.EngineSingletonFlutterWindow.new._waitInTheLine (http://localhost:62458/dart_sdk.js:176577:27)
    at _waitInTheLine.next (<anonymous>)
    at http://localhost:62458/dart_sdk.js:38652:33
    at _RootZone.runUnary (http://localhost:62458/dart_sdk.js:38523:59)
    at _FutureListener.thenAwait.handleValue (http://localhost:62458/dart_sdk.js:33725:29)
    at handleValueCallback (http://localhost:62458/dart_sdk.js:34277:49)
    at Function._propagateToListeners (http://localhost:62458/dart_sdk.js:34315:17)
    at _Future.new.[_completeWithValue] (http://localhost:62458/dart_sdk.js:34163:23)
    at async._AsyncCallbackEntry.new.callback (http://localhost:62458/dart_sdk.js:34184:35)
    at Object._microtaskLoop (http://localhost:62458/dart_sdk.js:38790:13)
    at _startMicrotaskLoop (http://localhost:62458/dart_sdk.js:38796:13)
    at http://localhost:62458/dart_sdk.js:34531:9

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listc: regressionIt was better in the past than it is nowengineflutter/engine related. See also e: labels.f: routesNavigator, Router, and related APIs.platform-webWeb applications specifically

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions