Some of my console.log aren't getting to the console. Is it because of PWA Builder?

176 Views Asked by At

I am trying to figure out how a WebRTC demo runs. ( https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/Build_a_phone_with_peerjs ) Some of my console.log's print to the developer's console, and some don't. They are both in the global space, right next to each other. I can make all the console.log's print by holding the mouse down on the refresh swirl, and picking Empty Cache and Hard Reload. But then the next regular refresh only prints some of the console.log's.

I see that the program has something in it I am not familiar with. Pwabuilder.

    <script type="module">
        import 'https://cdn.jsdelivr.net/npm/@pwabuilder/pwaupdate';

        const el = document.createElement('pwa-update');
        document.body.appendChild(el);
    </script>

When I comment this out, the program doesn't run at all. Does somebody know what is going on?

1

There are 1 best solutions below

0
user2171796 On

I figured this out. I needed to go to my Application tab (Chrome) and unregister the service worker.

It was so frustrating! I removed all those bits of code from the application, and restarted everything, but the strange logging behavior still persisted. Hadn't encounter extra-persistent service worker before.