# Flutter Auth0: Stuck at Waiting for connection from debug service on chrome

**URL:** <https://community.auth0.com/t/flutter-auth0-stuck-at-waiting-for-connection-from-debug-service-on-chrome/141267>\
**Category:** Get Help\
**Tags:** sdks-quickstarts, quickstarts-regular-web-application\
**Created:** [August 18, 2024, 6:17pm UTC](https://community.auth0.com/t/flutter-auth0-stuck-at-waiting-for-connection-from-debug-service-on-chrome/141267 "2024-08-18T18:17:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MeshApps](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/meshapps/32/60259_2.png) [@MeshApps](https://community.auth0.com/u/MeshApps)\
**Post date:** [August 18, 2024, 6:17pm UTC](https://community.auth0.com/t/flutter-auth0-stuck-at-waiting-for-connection-from-debug-service-on-chrome/141267/1 "2024-08-18T18:17:07Z")

</div>

I want to use auth0 in the web while using flutter.

The docs from auth0 ([Auth0 Flutter (Web) SDK Quickstarts: Add login to your Flutter app](https://auth0.com/docs/quickstart/spa/flutter/interactive)) say to include this line of code in the index.html:

`<script src="https://cdn.auth0.com/js/auth0-spa-js/2.0/auth0-spa-js.production.js" defer></script>`

But if I include that and start in chrome I get this message while the chrome tab that opened up is all white:

`Flutter: Waiting for connection from debug service on Chrome...`

This a clean project with and no other changes happend to any settings files, only the index.html.

The body part of the index.html:

```auto
<body>
  <script src="https://cdn.auth0.com/js/auth0-spa-js/2.0/auth0-spa-js.production.js" defer></script>
  <script src="flutter_bootstrap.js" async></script>
</body>

```

I have no errors or logs available it only tells the message from above.

This error only happens if I start in debug mode. Release mode works sometimes.

Any ideas on how to fix this?

---

<div class="post-metadata">

**Author:** ![teodor.andrei](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/teodor.andrei/32/75320_2.png) [@teodor.andrei](https://community.auth0.com/u/teodor.andrei)\
**Post date:** [May 6, 2025, 12:00pm UTC](https://community.auth0.com/t/flutter-auth0-stuck-at-waiting-for-connection-from-debug-service-on-chrome/141267/3 "2025-05-06T12:00:59Z")

</div>

Hi @MeshApps, and sorry for the late reply!

While I cannot identify the problem from your snippet alone, since you mentioned this is a clean project, I suggest downloading the sample Flutter (Web) app from the Auth0 Dashboard and using it as an example. I will also provide you with a snippet that shows how the index.html is set up in the sample app.

```auto
<!DOCTYPE html>
<html>
<head>
  [...]
  <!-- This script adds the flutter initialization JS code -->
  <script src="flutter.js" defer></script>
  <script src="https://cdn.auth0.com/js/auth0-spa-js/2.0/auth0-spa-js.production.js" defer></script>
</head>
<body>
  <script>
    window.addEventListener('load', function(ev) {
      // Download main.dart.js
      _flutter.loader.loadEntrypoint({
        serviceWorker: {
          serviceWorkerVersion: serviceWorkerVersion,
        },
        onEntrypointLoaded: function(engineInitializer) {
          engineInitializer.initializeEngine().then(function(appRunner) {
            appRunner.runApp();
          });
        }
      });
    });
  </script>
</body>
</html>

```

Please let me know if there is more I can help you with!  
Teodor.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [May 20, 2025, 12:01pm UTC](https://community.auth0.com/t/flutter-auth0-stuck-at-waiting-for-connection-from-debug-service-on-chrome/141267/4 "2025-05-20T12:01:40Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
