Skip to content
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] errorBuilder and errorPageBuilder are working only in debug mode #111088

Closed
MaudFarizon opened this issue Sep 7, 2022 · 4 comments
Closed
Labels
r: duplicate Issue is closed as a duplicate of an existing issue

Comments

@MaudFarizon
Copy link

Steps to Reproduce

  1. Add go_router: ^4.3.0 to pubspec.yaml file
  2. Execute flutter run --profile on the code sample (see below)
  3. Tap on button "Non-existent screen", which will push a route not declared in go router routes.

Expected results: Redirection to the RouterError page. That would be the same bevahiour as when running the app with debug mode.

Actual results: Nothing happens

Code sample
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';

void main() => runApp(App());

class App extends StatelessWidget {
  App({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp.router(
      routeInformationProvider: _router.routeInformationProvider,
      routeInformationParser: _router.routeInformationParser,
      routerDelegate: _router.routerDelegate,
      title: 'GoRouter Example',
    );
  }

  final GoRouter _router = GoRouter(
    errorBuilder: (_, __) => const RouterError(),
    routes: <GoRoute>[
      GoRoute(
        path: '/',
        builder: (BuildContext context, GoRouterState state) {
          return const InitialPage();
        },
      ),
      GoRoute(
        path: '/red',
        builder: (BuildContext context, GoRouterState state) {
          return const ScreenRed();
        },
      ),
    ],
  );
}

class InitialPage extends StatelessWidget {
  const InitialPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: [
            OutlinedButton(
              child: const Text('Red screen'),
              onPressed: () => context.push('/red'),
            ),
            OutlinedButton(
              child: const Text('Non-existent screen'),
              onPressed: () => context.push('/nonexistent'),
            ),
          ],
        ),
      ),
    );
  }
}

class ScreenRed extends StatelessWidget {
  const ScreenRed({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Container(
        color: Colors.red,
      ),
    );
  }
}

class RouterError extends StatelessWidget {
  const RouterError({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return const Scaffold(
      body: Center(
        child: Text("Ooops, we couldn't find this page."),
      ),
    );
  }
}
Logs

Output of running flutter run --profile --verbose:

[ +175 ms] ✓  Built build/app/outputs/flutter-apk/app-profile.apk (12.3MB).
[   +9 ms] executing: /Users/maudfarizon/Library/Android/sdk/build-tools/31.0.0/aapt dump xmltree /Users/maudfarizon/workspace/go_router_error_builder_app/build/app/outputs/flutter-apk/app.apk AndroidManifest.xml
[  +25 ms] Exit code 0 from: /Users/maudfarizon/Library/Android/sdk/build-tools/31.0.0/aapt dump xmltree /Users/maudfarizon/workspace/go_router_error_builder_app/build/app/outputs/flutter-apk/app.apk AndroidManifest.xml
[        ] N: android=http://schemas.android.com/apk/res/android
             E: manifest (line=2)
               A: android:versionCode(0x0101021b)=(type 0x10)0x1
               A: android:versionName(0x0101021c)="1.0.0" (Raw: "1.0.0")
               A: android:compileSdkVersion(0x01010572)=(type 0x10)0x1f
               A: android:compileSdkVersionCodename(0x01010573)="12" (Raw: "12")
               A: package="com.example.go_router_error_builder_app" (Raw: "com.example.go_router_error_builder_app")
               A: platformBuildVersionCode=(type 0x10)0x1f
               A: platformBuildVersionName=(type 0x10)0xc
               E: uses-sdk (line=7)
                 A: android:minSdkVersion(0x0101020c)=(type 0x10)0x10
                 A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1f
               E: uses-permission (line=15)
                 A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET")
               E: application (line=17)
                 A: android:label(0x01010001)="go_router_error_builder_app" (Raw: "go_router_error_builder_app")
                 A: android:icon(0x01010002)=@0x7f080000
                 A: android:name(0x01010003)="android.app.Application" (Raw: "android.app.Application")
                 A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff
                 A: android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory" (Raw: "androidx.core.app.CoreComponentFactory")
                 E: activity (line=23)
                   A: android:theme(0x01010000)=@0x7f0a0000
                   A: android:name(0x01010003)="com.example.go_router_error_builder_app.MainActivity" (Raw: "com.example.go_router_error_builder_app.MainActivity")
                   A: android:exported(0x01010010)=(type 0x12)0xffffffff
                   A: android:launchMode(0x0101001d)=(type 0x10)0x1
                   A: android:configChanges(0x0101001f)=(type 0x11)0x40003fb4
                   A: android:windowSoftInputMode(0x0101022b)=(type 0x11)0x10
                   A: android:hardwareAccelerated(0x010102d3)=(type 0x12)0xffffffff
                   E: meta-data (line=38)
                     A: android:name(0x01010003)="io.flutter.embedding.android.NormalTheme" (Raw: "io.flutter.embedding.android.NormalTheme")
                     A: android:resource(0x01010025)=@0x7f0a0001
                   E: intent-filter (line=42)
                     E: action (line=43)
                       A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN")
                     E: category (line=45)
                       A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER")
                 E: meta-data (line=52)
                   A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding")
                   A: android:value(0x01010024)=(type 0x10)0x2
                 E: uses-library (line=56)
                   A: android:name(0x01010003)="androidx.window.extensions" (Raw: "androidx.window.extensions")
                   A: android:required(0x0101028e)=(type 0x12)0x0
                 E: uses-library (line=59)
                   A: android:name(0x01010003)="androidx.window.sidecar" (Raw: "androidx.window.sidecar")
                   A: android:required(0x0101028e)=(type 0x12)0x0
[   +5 ms] Stopping app 'app.apk' on RMX2001.
[   +1 ms] executing: /Users/maudfarizon/Library/Android/sdk/platform-tools/adb -s 9LPZQK4XDM79PJXS shell am force-stop com.example.go_router_error_builder_app
[  +96 ms] executing: /Users/maudfarizon/Library/Android/sdk/platform-tools/adb -s 9LPZQK4XDM79PJXS shell pm list packages com.example.go_router_error_builder_app
[ +151 ms] package:com.example.go_router_error_builder_app
[   +1 ms] executing: /Users/maudfarizon/Library/Android/sdk/platform-tools/adb -s 9LPZQK4XDM79PJXS shell cat /data/local/tmp/sky.com.example.go_router_error_builder_app.sha1
[  +67 ms] 78fbe5715fdcfd2d37b019cbb10deec890b4fc79
[   +2 ms] Latest build already installed.
[        ] executing: /Users/maudfarizon/Library/Android/sdk/platform-tools/adb -s 9LPZQK4XDM79PJXS shell -x logcat -v time -t 1
[  +67 ms] --------- beginning of main
           09-07 15:12:55.786 D/OppoExLayer(  876): ~Layer() sequence=93522, name=Surface(name=9a4953f InputMethod)/@0xa033355 - animation-leash#0@0xb400007754d10000
[  +15 ms] executing: /Users/maudfarizon/Library/Android/sdk/platform-tools/adb -s 9LPZQK4XDM79PJXS shell am start -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x20000000 --ez enable-dart-profiling true
com.example.go_router_error_builder_app/com.example.go_router_error_builder_app.MainActivity
[  +80 ms] Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x20000000 cmp=com.example.go_router_error_builder_app/.MainActivity (has extras) }
[        ] Waiting for observatory port to be available...
[ +293 ms] Observatory URL on device: http://127.0.0.1:46193/x6TtGAXE_BY=/
[   +1 ms] executing: /Users/maudfarizon/Library/Android/sdk/platform-tools/adb -s 9LPZQK4XDM79PJXS forward tcp:0 tcp:46193
[  +19 ms] 50550
[        ] Forwarded host port 50550 to device port 46193 for Observatory
[  +11 ms] Connecting to service protocol: http://127.0.0.1:50550/x6TtGAXE_BY=/
[  +66 ms] Launching a Dart Developer Service (DDS) instance at http://127.0.0.1:0, connecting to VM service at http://127.0.0.1:50550/x6TtGAXE_BY=/.
[ +180 ms] DDS is listening at http://127.0.0.1:50553/KP8y3Yr6Mv0=/.
[  +76 ms] Successfully connected to service protocol: http://127.0.0.1:50550/x6TtGAXE_BY=/
[   +9 ms] Application running.
[  +58 ms] Connected to RMX2001
[   +2 ms] Flutter run key commands.
[   +1 ms] h List all available interactive commands.
[        ] c Clear the screen
[        ] q Quit (terminate the application on the device).
[        ] An Observatory debugger and profiler on RMX2001 is available at: http://127.0.0.1:50553/KP8y3Yr6Mv0=/
[ +307 ms] The Flutter DevTools debugger and profiler on RMX2001 is available at: http://127.0.0.1:9100?uri=http://127.0.0.1:50553/KP8y3Yr6Mv0=/
[+55780 ms] D/ViewRootImpl(27059): enqueueInputEventMotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=807.0, y[0]=1773.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0,
edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=598377669, downTime=598377669, deviceId=4, source=0x1002, displayId=0 }
[   +3 ms] D/ViewRootImpl[MainActivity](27059): processMotionEvent MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=807.0, y[0]=1773.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0,
flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=598377669, downTime=598377669, deviceId=4, source=0x1002, displayId=0 }
[   +1 ms] D/ViewRootImpl[MainActivity](27059): dispatchPointerEvent handled=true, event=MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=807.0, y[0]=1773.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0,
classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=598377669, downTime=598377669, deviceId=4, source=0x1002, displayId=0 }
[ +569 ms] D/ViewRootImpl[MainActivity](27059): processMotionEvent MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=831.0, y[0]=1837.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0,
flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=598378250, downTime=598377669, deviceId=4, source=0x1002, displayId=0 }
[   +4 ms] D/ViewRootImpl[MainActivity](27059): dispatchPointerEvent handled=true, event=MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=831.0, y[0]=1837.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0,
classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=598378250, downTime=598377669, deviceId=4, source=0x1002, displayId=0 }
[ +865 ms] D/ViewRootImpl(27059): enqueueInputEventMotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=508.0, y[0]=1254.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0,
edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=598379119, downTime=598379119, deviceId=4, source=0x1002, displayId=0 }
[   +1 ms] D/ViewRootImpl[MainActivity](27059): processMotionEvent MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=508.0, y[0]=1254.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0,
flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=598379119, downTime=598379119, deviceId=4, source=0x1002, displayId=0 }
[   +1 ms] D/ViewRootImpl[MainActivity](27059): dispatchPointerEvent handled=true, event=MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=508.0, y[0]=1254.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0,
classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=598379119, downTime=598379119, deviceId=4, source=0x1002, displayId=0 }
[  +76 ms] D/ViewRootImpl[MainActivity](27059): processMotionEvent MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=508.0, y[0]=1254.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0,
flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=598379202, downTime=598379119, deviceId=4, source=0x1002, displayId=0 }
[        ] D/ViewRootImpl[MainActivity](27059): dispatchPointerEvent handled=true, event=MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=508.0, y[0]=1254.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0,
classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=598379202, downTime=598379119, deviceId=4, source=0x1002, displayId=0 }
[   +1 ms] I/flutter (27059): LateInitializationError: Local 'initialMatches' has already been initialized.
[   +1 ms] I/flutter (27059): #0      LateError._throwLocalAlreadyInitialized (dart:_internal-patch/internal_patch.dart:204)
[        ] I/flutter (27059): #1      GoRouteInformationParser.parseRouteInformation (package:go_router/src/parser.dart:69)
[   +1 ms] I/flutter (27059): #2      GoRouter.push (package:go_router/src/router.dart:186)
[        ] I/flutter (27059): #3      GoRouterHelper.push (package:go_router/src/misc/extensions.dart:41)
[        ] I/flutter (27059): #4      InitialPage.build.<anonymous closure> (package:go_router_error_builder_app/main.dart:53)
[        ] I/flutter (27059): #5      _InkResponseState.handleTap (package:flutter/src/material/ink_well.dart:1072)
[        ] I/flutter (27059): #6      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:253)
[        ] I/flutter (27059): #7      TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:627)
[        ] I/flutter (27059): #8      BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:306)
[        ] I/flutter (27059): #9      BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:239)
[        ] I/flutter (27059): #10     PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:615)
[        ] I/flutter (27059): #11     PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:98)
[        ] I/flutter (27059): #12     PointerRouter._dispatchEventToRoutes.<anonymous closure> (package:flutter/src/gestures/pointer_router.dart:143)
[        ] I/flutter (27059): #13     _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:617)
[        ] I/flutter (27059): #14     PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:141)
[        ] I/flutter (27059): #15     PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:127)
[        ] I/flutter (27059): #16     GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:460)
[        ] I/flutter (27059): #17     GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:440)
[        ] I/flutter (27059): #18     RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:337)
[        ] I/flutter (27059): #19     GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:395)
[        ] I/flutter (27059): #20     GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:357)
[        ] I/flutter (27059): #21     GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:314)
[        ] I/flutter (27059): #22     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:295)
[        ] I/flutter (27059): #23     _invoke1 (dart:ui/hooks.dart:167)
[        ] I/flutter (27059): #24     PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:341)
[        ] I/flutter (27059): #25     _dispatchPointerDataPacket (dart:ui/hooks.dart:94)
[+13356 ms] D/ViewRootImpl(27059): enqueueInputEventMotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=486.0, y[0]=1095.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0,
edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=598392563, downTime=598392563, deviceId=4, source=0x1002, displayId=0 }
[        ] D/ViewRootImpl[MainActivity](27059): processMotionEvent MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=486.0, y[0]=1095.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0,
flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=598392563, downTime=598392563, deviceId=4, source=0x1002, displayId=0 }
[        ] D/ViewRootImpl[MainActivity](27059): dispatchPointerEvent handled=true, event=MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=486.0, y[0]=1095.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0,
classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=598392563, downTime=598392563, deviceId=4, source=0x1002, displayId=0 }
[  +61 ms] D/ViewRootImpl[MainActivity](27059): processMotionEvent MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=486.0, y[0]=1095.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0,
flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=598392629, downTime=598392563, deviceId=4, source=0x1002, displayId=0 }
[        ] D/ViewRootImpl[MainActivity](27059): dispatchPointerEvent handled=true, event=MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=486.0, y[0]=1095.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0,
classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=598392629, downTime=598392563, deviceId=4, source=0x1002, displayId=0 }
[+1726 ms] D/ViewRootImpl(27059): processKeyEvent,KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_BACK, scanCode=0, metaState=0, flags=0x48, repeatCount=0, eventTime=598394340, downTime=598394340, deviceId=-1, source=0x101,
displayId=0 }
[   +1 ms] D/DecorView(27059): dispatchKeyEvent handled=true, KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_BACK, scanCode=0, metaState=0, flags=0x40000048, repeatCount=0, eventTime=598394340, downTime=598394340, deviceId=-1,
source=0x101, displayId=0 }, activity=com.example.go_router_error_builder_app.MainActivity@419a8a3, mFeatureId=-1
[ +106 ms] D/ViewRootImpl(27059): processKeyEvent,KeyEvent { action=ACTION_UP, keyCode=KEYCODE_BACK, scanCode=0, metaState=0, flags=0x48, repeatCount=0, eventTime=598394455, downTime=598394340, deviceId=-1, source=0x101, displayId=0
}
[        ] D/DecorView(27059): dispatchKeyEvent handled=true, KeyEvent { action=ACTION_UP, keyCode=KEYCODE_BACK, scanCode=0, metaState=0, flags=0x248, repeatCount=0, eventTime=598394455, downTime=598394340, deviceId=-1,
source=0x101, displayId=0 }, activity=com.example.go_router_error_builder_app.MainActivity@419a8a3, mFeatureId=-1
[+1882 ms] D/ViewRootImpl(27059): enqueueInputEventMotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=583.0, y[0]=1210.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0,
edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=598396342, downTime=598396342, deviceId=4, source=0x1002, displayId=0 }
[        ] D/ViewRootImpl[MainActivity](27059): processMotionEvent MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=583.0, y[0]=1210.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0,
flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=598396342, downTime=598396342, deviceId=4, source=0x1002, displayId=0 }
[        ] D/ViewRootImpl[MainActivity](27059): dispatchPointerEvent handled=true, event=MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=583.0, y[0]=1210.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0,
classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=598396342, downTime=598396342, deviceId=4, source=0x1002, displayId=0 }
[  +68 ms] D/ViewRootImpl[MainActivity](27059): processMotionEvent MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=583.0, y[0]=1210.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0,
flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=598396418, downTime=598396342, deviceId=4, source=0x1002, displayId=0 }
[   +1 ms] D/ViewRootImpl[MainActivity](27059): dispatchPointerEvent handled=true, event=MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=583.0, y[0]=1210.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0,
classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=598396418, downTime=598396342, deviceId=4, source=0x1002, displayId=0 }
[        ] I/flutter (27059): Another exception was thrown: Instance of 'ErrorSummary'

Output of running flutter analyze :

Analyzing go_router_error_builder_app...                                
No issues found! (ran in 7.6s)

Output of running flutter doctor -v :

[✓] Flutter (Channel stable, 3.3.0, on macOS 12.0.1 21A559 darwin-x64, locale fr-FR)
    • Flutter version 3.3.0 on channel stable at /Users/maudfarizon/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ffccd96b62 (9 days ago), 2022-08-29 17:28:57 -0700
    • Engine revision 5e9e0e0aa8
    • Dart version 2.18.0
    • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/maudfarizon/Library/Android/sdk
    • Platform android-33, build-tools 31.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 13F100
    • CocoaPods version 1.11.2

[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Android Studio (version 2020.3)
    • 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.10+0-b96-7281165)

[✓] VS Code (version 1.63.2)
    • VS Code at /Users/maudfarizon/Downloads/Visual Studio Code.app/Contents
    • Flutter extension version 3.36.0

[✓] Connected device (2 available)
    • RMX2001 (mobile) • 9LPZQK4XDM79PJXS • android-arm64 • Android 11 (API 30)
    • macOS (desktop)  • macos            • darwin-x64    • macOS 12.0.1 21A559 darwin-x64

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.
@huycozy huycozy added the in triage Presently being triaged by the triage team label Sep 8, 2022
@huycozy
Copy link
Member

huycozy commented Sep 8, 2022

Hi @MaudFarizon, I can not reproduce the issue on the latest stable and master channels with provided sample code.
When clicking on button Non-existent screen, it redirects to RouterError page as desired (in profile mode)
Plugin version: go_router: ^4.3.0

Demo
Screen.Recording.2022-09-08.at.11.56.59.mp4
flutter doctor -v
[✓] Flutter (Channel stable, 3.3.1, on macOS 12.5 21G72 darwin-x64, locale en-VN)
    • Flutter version 3.3.1 on channel stable at /Users/huynq/Documents/GitHub/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 4f9d92fbbd (26 hours ago), 2022-09-06 17:54:53 -0700
    • Engine revision 3efdf03e73
    • Dart version 2.18.0
    • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-33, build-tools 31.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 13E113
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • 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.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Community Edition (version 2020.3.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.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

[✓] IntelliJ IDEA Community Edition (version 2022.1.1)
    • IntelliJ at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/221.5591.52/IntelliJ IDEA CE.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.71.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.48.0

[✓] Connected device (3 available)
    • SM T225 (mobile) • R9JT3004VRJ • android-arm64  • Android 12 (API 31)
    • macOS (desktop)  • macos       • darwin-x64     • macOS 12.5 21G72 darwin-x64
    • Chrome (web)     • chrome      • web-javascript • Google Chrome 104.0.5112.101

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!
[✓] Flutter (Channel master, 3.4.0-19.0.pre.136, on macOS 12.5 21G72 darwin-x64, locale en-VN)
    • Flutter version 3.4.0-19.0.pre.136 on channel master at /Users/huynq/Documents/GitHub/flutter_master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 165cb0b986 (5 minutes ago), 2022-09-08 08:11:31 +0530
    • Engine revision 24babd254b
    • Dart version 2.19.0 (build 2.19.0-177.0.dev)
    • DevTools version 2.17.0

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-33, build-tools 31.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 13E113
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • 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.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Community Edition (version 2020.3.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.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

[✓] IntelliJ IDEA Community Edition (version 2022.1.1)
    • IntelliJ at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/221.5591.52/IntelliJ IDEA CE.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.71.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.48.0

[✓] Connected device (3 available)
    • SM T225 (mobile) • R9JT3004VRJ • android-arm64  • Android 12 (API 31)
    • macOS (desktop)  • macos       • darwin-x64     • macOS 12.5 21G72 darwin-x64
    • Chrome (web)     • chrome      • web-javascript • Google Chrome 105.0.5195.102

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Which environment did this issue happen in? (Android/iOS/Web/MacOS/Windows/Linux)
Also, the latest Flutter stable is 3.3.1 and the master is 3.4.0. Please try upgrading them and retry to see if this issue still reproduces.

@huycozy huycozy added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Sep 8, 2022
@mraleph
Copy link
Member

mraleph commented Sep 8, 2022

Duplicate of #109261

@mraleph
Copy link
Member

mraleph commented Sep 8, 2022

CP requested for the fix: dart-lang/sdk#49923

@huycozy huycozy added r: duplicate Issue is closed as a duplicate of an existing issue and removed waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds in triage Presently being triaged by the triage team labels Sep 8, 2022
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
r: duplicate Issue is closed as a duplicate of an existing issue
Projects
None yet
Development

No branches or pull requests

3 participants