Uncaught (in promise) DOMException: Registration failed - manifest empty or missing - javascript

Im trying to implement push notification using Polymer. I followed this link and was able to get the service worker to be registered. I got the following comments of the Javascript console.
Service Worker is ready :^) ServiceWorkerRegistration
But I also received this error.
Uncaught (in promise) DOMException: Registration failed - manifest empty or missing
Note:
<link rel="manifest" href="manifest.json">
is already in my index.html. Since Im using Google App Engine, in my app.yaml I have add the following as well
url: /manifest.json
static_files: templates/manifest.json
upload: templates/manifest.json
And if I try localhost:8080/manifest.json, my manifest json is displayed on the browser. Im unable to get it working. Please provide some help, suggestions to check if manifest.json is actually accessible in my index.html

Related

": Error: Not found: 'dart:js'" in a Flutter Application

I am trying to call a Javascript function in a js file from the flutter "main.dart" but when I imported the JS library, I am getting the following error.
: Error: Not found: 'dart:js'
The below picture link represents the error message.
The Error shown in the debug console
Please help me to solve this issue, I tried everything which is already available.

serviceworker.js:1 Uncaught (in promise) TypeError: Request failed .Net Core 3.1

I am trying to create a PWA from a simple Asp.Net Core 3.1 application with Razor Pages. The manifest file works fine, the service worker registers fine, but gives the following error:
sw.js: 1 Uncaught (in promise) TypeError: Request failed.
Can anyone help me solve it?
Attached image of the error:
Thanks in advance
The code for service worker I have obtained from the following url:
https://www.spheregen.com/implementing-pwa-behavior-to-asp-net-mvc-5-apps/
And it is the same as:
https://gist.github.com/TanmaySM/33118c2366fa544fb08197bcb770f9ef#file-serviceworker-js
service worker error
Check your manifest.json or your appsettings.json if you are catching a url that doesnt exist!
That worked for me :)

Failed to Load Resource In Production but Not Locally

I am working on a Django project and I have it deployed on pythonanywhere.com. In my project, I am using Django Jsignature which works fine on my local machine. In production, however, when I load the particular template, I get this error in my console - 'myurl' portion is not the real url.
https://myurl.com/static/js/jSignature.min.js net::ERR_ABORTED 404 (Not Found)```
So I don't get this locally, but do in Production. Can anyone suggest for me where to start on this? I'm not even really sure where to begin, it's my first time deploying anything.
EDIT
you can see the details of django jsignature here: https://pypi.org/project/django-jsignature/
the {{form.media}} should load this script.
UPDATE 2
This is no longer working locally either. Here are the error in my console.
Uncaught SyntaxError: Invalid or unexpected token jSignature.min.js:70
Uncaught TypeError:
$(...).jSignature is not a function

Failed to register service-worker TypeError - Expo Error

I have recently encountered the following error when I npm run start my expo app;
Uncaught DOMException: Failed to execute 'importScripts' on
'WorkerGlobalScope': The script at
'http://localhost:19006/service-worker.js' failed to load.
at http://localhost:19006/expo-service-worker.js:93:6
The script has an unsupported MIME type ('text/html').
This error has never occurred until of late, in which I pulled down the app source code onto a new machine, so I have a incline that this could be the issue.
When I used to Service Worker debugger using Chrome Dev Tools, the error flags up on the last line of the code in expo-service-worker.js (see screenshot)
I have literally done nothing different, I have seen other solutions stating I should modify some of the service-worker registration code, but this sits uncomfortable with me being as this is an automatic process when running the app.
The app boots-up fine, but it has trouble connecting to the external api linked to the app, because the service worker is not being registered.
One my other machine, the app launches, registers a service worker and connects to the api fine, just not on the machine currently.
Any suggestions?
Thanks.
A service worker importScripts() script must be served with a valid javascript content-type header. See:
https://w3c.github.io/ServiceWorker/#dfn-bad-import-script-response
In this case you are getting a content-type of text/html. One common way this can happen is if the server returns a 404 for the resource URL passed to importScripts.

Registering Serviceworker in Laravel

I'm using pushpad (from pushpad.xyz) and followed the 3 initial steps to setup this SDK with my Laravel 5.5 Project.
But as soon as I visit a test view it just cannot find and register the Serviceworker.js
i tried placing it all over the place, almost in every folder now. So i know this is vaguely described but if you take a quick look at the Docs from pushpad you know what I mean.
Moreover, when i manually try to open it i get a 404.
also getting 404 when i try to import it via from the https:// link where its located
when i copy its content and use it in a script tag i also get a 404.
im quite clueless as how to proceed
A bad HTTP response code (404) was received when fetching the script.
Failed to load resource: net::ERR_INVALID_RESPONSE
push-test:1 Uncaught (in promise) TypeError: Failed to register a
ServiceWorker: A bad HTTP response code (404) was received when fetching the
script.
You need to make sure that you have a service-worker.js file in the root directory of your website.
You can verify the installation by typing https://example.com/service-worker.js in your browser.

Categories