question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Chromecast crashes when using serviceWorkers?

See original GitHub issue

Are serviceWorkers disabled on the chromecast, the app instantly crashed when called:

try {
    if ('serviceWorker' in navigator) {
        navigator.serviceWorker.getRegistrations().then(function(registrations) {
            for(let registration of registrations) {  
                registration.unregister();
                console.log('Unregister', registration)
            }
    	})
        navigator.serviceWorker.register('sw.js', {scope: './'}).then(function() {
          console.log('Success!')
        }).catch(function(err) {
            console.log(err);
        });
    } else {
        console.log('Service worker not supported')
    }
} catch (err) {
	console.log(err)
}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:19 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
joeyparrishcommented, Oct 22, 2019

Yes, all of our networking capabilities are in terms of our plugin interface. For example, see:

Those are implementations of the scheme plugin interface for http/https and data URIs respectively.

0reactions
Fennycommented, Oct 28, 2019

@joeyparrish , unfortunately nobody responded to the issue yet. https://issuetracker.google.com/issues/143057613 https://support.google.com/chromecast/thread/17509737?hl=en

To make sure it’s not on my end, I looked for multiple receiver snippets on github that also used service workers. I tried to run them on my receiver and I can confirm they also crashed, the newest repository using service workers on a receiver was 12 months old.

You said in issue 2205

I don’t believe Google removed service workers. They are still working in the Shaka Player Demo.

Can you confirm that shaka player executes the

navigator.serviceWorker.register()

function on the receiver end?

If this is the case, this means it’s not the actual function call that makes the chromecast crash.

I also found this on the chromium forum, I’m not sure if it has anything to do with the serviceWorker support on the chromecast:

Chromecast devtools API fixes. (issue 505393002) Side by Side Diff: chromecast/shell/browser/devtools/cast_dev_tools_delegate.cc

I’m not giving up 😉, maybe you could shine some extra light on this matter.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chromecast crashes when using serviceWorkers? · Issue #2205
Are serviceWorkers disabled on the chromecast, the app instantly crashed when called: try { if ('serviceWorker' in navigator) { navigator.
Read more >
Chromecast Keeps Crashing – The Most Common Fixes - Alphr
You're using an outdated version of the “Google Home” app or Chrome browser. The Chromecast device is not receiving sufficient power to stream....
Read more >
Why Does My Chromecast Keep Crashing? - Lifewire
A Chromecast that randomly disconnects, restarts, or crashes, can be hard to diagnose if you're not sure what's causing it to happen.
Read more >
3be933e393ec8c03ad16d48f0cc...
service worker : Bypass main thread for subresource loader ... update loader factories for service worker when the network service crashes.
Read more >
102 messages from Google Code
Re: Issue 573565 in chromium: Chrome does not use GpuVideoDecoder when h264 ... Re: Issue 584052 in chromium: Service worker crashes upon ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found