I had done payment integration to razorpay and when click the button it throws an console error serviceworker must be a dictionary.
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.
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.
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 ).
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With