Failed to register service-worker DOMException: Failed to register a ServiceWorker for scope ('http://localhost:19006/')

Please provide the following:

  1. SDK Version: 36
  2. Platforms(Android/iOS/web/all): web

When I access my app in development with htt://$ip:19006, it work fine, but when I try to access with http://localhost:19006 in order to use the geolocation, I have this error :

Failed to register service-worker DOMException: Failed to register a ServiceWorker for scope ('http://localhost:19006/') with script ('http://localhost:19006/expo-service-worker.js'): The script has an unsupported MIME type ('text/html').

I am quite concerned, is there a way to fix the localhost url? I have tried to open the dev tools, go to application, service worker, unregister and refresh, but that didn’t help.

Thanks a lot for reading,

Dimitri

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