0

I am trying to create a redirect to a specific screen of my app. I is a child route.

GoRoute(
          path: '/redirect',
          routes: [
            GoRoute(
              path: 'google',
              builder: (context, state) => GoogleRedirect(state.queryParams),
            )
          ],
          builder: (context, state) => const LoadingScreen(),
        ),

The path works correctly when called via the address bar manually. When the link is accessed from a external site, it is rendered blank. The browser's console shows me this error:

Exception while loading service worker: DOMException: Failed to register a ServiceWorker for scope ('http://localhost:8999/redirect/') with script ('http://localhost:8999/redirect/flutter_service_worker.js?v=null'): The script has an unsupported MIME type ('text/html').

Refused to execute script from 'http://localhost:8999/redirect/main.dart.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

What am I doing wrong here?

Mudassir
  • 725
  • 6
  • 28

0 Answers0