-
Notifications
You must be signed in to change notification settings - Fork 29.2k
Closed
flutter/packages
#9426Closed
Copy link
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listfound in release: 3.32Found to occur in 3.32Found to occur in 3.32found in release: 3.33Found to occur in 3.33Found to occur in 3.33has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: go_routerThe go_router packageThe go_router packagepackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-webWeb applications specificallyWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
Description
What package does this bug report belong to?
go_router
What target platforms are you seeing this bug on?
Web
Have you already upgraded your packages?
Yes
Dependency versions
pubspec.lock
packages:
go_router:
dependency: "direct main"
description:
name: go_router
sha256: "0b1e06223bee260dee31a171fb1153e306907563a0b0225e8c1733211911429a"
url: "https://pub.dev"
source: hosted
version: "15.1.2"
Steps to reproduce
- go_router configuration:
final GoRouter _router = GoRouter(
initialLocation: '/',
routes: <RouteBase>[
GoRoute(path: '/', builder: (_, _) => Home(),),
GoRoute(path: '/abc', builder: (_, _) => Home(),),
GoRoute(path: '/ABC', builder: (_, _) => Home(),),
],
);
- Run the app.
- Open "/abc", it should work.
- Open "/ABC", throws an exception.
Expected results
The part of the URL after the domain name (the "path" or "directory" part) is generally case-sensitive on most web servers, especially those running on Unix-like operating systems, so expectation is that all three endpoints should render Home().
Actual results
"/ABC" throws
======== Exception caught by widgets library =======================================================
The following assertion was thrown building DefaultSelectionStyle:
Assertion failed: file:///C:/Users/user/AppData/Local/Pub/Cache/hosted/pub.dev/go_router-15.1.2/lib/src/match.dart:245:12
uriPathToCompare.startsWith(newMatchedLocationToCompare)
is not true
Code sample
Code sample
final GoRouter _router = GoRouter(
initialLocation: '/',
routes: <RouteBase>[
GoRoute(path: '/', builder: (_, _) => Home(),),
GoRoute(path: '/abc', builder: (_, _) => Home(),),
GoRoute(path: '/ABC', builder: (_, _) => Home(),),
],
);
Screenshots or Videos
Logs
Logs
======== Exception caught by widgets library =======================================================
The following assertion was thrown building DefaultSelectionStyle:
Assertion failed: file:///C:/Users/user/AppData/Local/Pub/Cache/hosted/pub.dev/go_router-15.1.2/lib/src/match.dart:245:12
uriPathToCompare.startsWith(newMatchedLocationToCompare)
is not true
Flutter Doctor output
Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.32.0, on Microsoft Windows [Version 10.0.22631.5189], locale en-US)
[√] Windows Version (11 Pro 64-bit, 23H2, 2009)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[√] Android Studio (version 2024.3.2)
[√] IntelliJ IDEA Community Edition (version 2023.1)
[√] VS Code (version 1.100.2)
[√] Connected device (3 available)
[√] Network resources
iapicca
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listfound in release: 3.32Found to occur in 3.32Found to occur in 3.32found in release: 3.33Found to occur in 3.33Found to occur in 3.33has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: go_routerThe go_router packageThe go_router packagepackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-webWeb applications specificallyWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team