-
Notifications
You must be signed in to change notification settings - Fork 26.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[go_router]: Bad state: Origin is only applicable to schemes http and https #148389
Comments
@lokalathlet |
Hi @darshankawar, here a simple code sample. Click the button "Go to custom scheme".
main.dart
pubspec.yaml:
The working example with the old go_router 13.2.2 directs to the error page The non-working example runs into an exception (13.2.5 and higher), change the dependencies. |
Thanks for the update. I was able to replicate this as reported. stable, master flutter doctor -v
|
Any fix yet? Experiencing same issue |
I had to revert to 3.2.2 fixed version to get it working |
Facing the same issue here |
What package does this bug report belong to?
go_router
What target platforms are you seeing this bug on?
Android, iOS
Steps to reproduce
Change go_router dependency from version 13.2.2 to 13.2.5 (or 14.1.1)
The router(.dart) call 'GoRouteInformationParser.parseRouteInformationWithDependencies' before redirect.
The method processes the routeInformation:
String newUri = '${routeInformation.uri.origin}/';
This ends in an exception
StateError (Bad state: Origin is only applicable to schemes http and https: anyapp://redirect
The following StateError was thrown while dispatching
I/flutter (31737): │ notifications for GoRouteInformationProvider:
I/flutter (31737): │ Bad state: Origin is only applicable to schemes http and https:
I/flutter (31737): │ anyapp://redirect
Expected results
Actual results
Code snippet
parseRouteInformationWithDependencies from version 13.2.5 failing
parseRouteInformationWithDependencies from version 13.2.2 working
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: