Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Serviceworker must be a dictionary in your web app manifest

I had done payment integration to razorpay and when click the button it throws an console error serviceworker must be a dictionary.

like image 422
Darren John Mathews Avatar asked Aug 01 '20 04:08

Darren John Mathews


People also ask

What is web app manifest and service worker API?

I don't know much about this error but still I would like to give some detail information about Web app manifest and Service Worker API The web app manifest is a JSON file that tells the browser about your Progressive Web App and how it should behave when installed on the user's desktop or mobile device.

How to use a service worker?

Before using a Service Worker, it must be registered by the application. The Service Worker is usually registered when the page is loaded. In the scripts.js file, complete the function called when the document is loaded with the following code: Reload the page, the following log should appear in the console once the page loaded.

How do I deploy a webmanifest for a web application?

Web app manifests are deployed in your HTML pages using a <link> element in the <head> of a document: < link rel = " manifest " href = " manifest.json " > The .webmanifest extension is specified in the Media type registration section of the specification (the response of the manifest file should return Content-Type: application/manifest+json ).

What is going on in the service worker section of Dev Tools?

Service Worker registered [object ServiceWorkerRegistration] Service Worker installing. Let's check what is going on in the Service Worker section of the Dev Tools. You should see something like this: When you refresh the page, the browser tries to install and activate the Service Worker with the new code.


1 Answers

This is an error coming from razorpay.js file. You can simply ignore this and you will be able to integrate any flow without an issue. I have recently integrated this and it is working fine in the production.

like image 63
Debjit Sinha Avatar answered Oct 22 '22 10:10

Debjit Sinha