No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Firebase Push notification not working in quasar framework n Vue.js

    Framework
    4
    6
    1643
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • U
      udaylal2007 last edited by

      I am using firebase to send push notification inside quasar framework. Its working fine locally.
      But when we deploy code to dev server .
      Then it gives error:-Failed to register a ServiceWorker: A bad HTTP res…code (404) was received when fetching the script.

      Because after building quasar app it generate its own service-worker.js file when we want to add code or add our own service woker then it dosenot work.

      1.Please tell me how to use our own firease-messaging-sw.js in place of quasar generated service-worker.js.
      Becouse for firebase push notification search service worker file with name of " firease-messaging-sw.js"
      2.Even i add my code to service-worker.js then also it dont reflect in code.

      Thanks in advance

      1 Reply Last reply Reply Quote 1
      • K
        kiani last edited by

        Hi, I’m having a similar problem, I can’t find a way to use firebase-messaging-sw.js instead of custom-service-worker.js (or additionally). Did you solve the problem? Thanks!

        1 Reply Last reply Reply Quote 1
        • J
          jitendra16 last edited by

          /node_modules/@firebase/messaging/dist/index.cjs.js

          You will find index.esm.js, index.cjs.js.map and index.esm.js.map also at above location.Total 4 files.

          var DEFAULT_SW_PATH = ‘/service-worker.js’;
          var DEFAULT_SW_SCOPE = ‘/’;

          Do above two changes wherever you find DEFAULT_SW_PATH and DEFAULT_SW_SCOPE
          then build again, everything will work fine.

          1 Reply Last reply Reply Quote 1
          • C
            cata-orellana last edited by

            So, the only way is modifying the firebase node_module?
            How can you handle that in different environments and buildings, nodes modules are installed each time a build is made with continuos integration strategy.

            J 1 Reply Last reply Reply Quote 0
            • J
              jitendra16 @cata-orellana last edited by

              @cata-orellana said in Firebase Push notification not working in quasar framework n Vue.js:

              So, the only way is modifying the firebase node_module?
              How can you handle that in different environments and buildings, nodes modules are installed each time a build is made with continuos integration strategy.

              I would also like to know the solution in said case.

              1 Reply Last reply Reply Quote 0
              • J
                jitendra16 last edited by

                @cata-orellana
                https://github.com/quasarframework/quasar/discussions/9065

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post