/chromecast/community?hl=en
This content is likely not relevant anymore. Try searching or browse recent questions.
-
10/23/19
Chromecast crashes using Service Workers / Deep C++ Firmware Bug? 0 Recommended Answers 3 Replies 3 Upvotes
1 Recommended Answer
$0 Recommended Answers
Last edited 10/23/19
I filed a bug report on Issuetracker #143057613 but I noticed that there are more than 17 unanswered issues and I have low hopes that they will fix it anytime soon, that's why I'm posting it here to see if someone got more information regarding this problem/bug.

Chromecast receivers crashes "Something went wrong" when calling a service worker.
Tested on 1st and 2nd gen, ultra and TV build-in cast devices with latest firmware versions 1.42.172094 or 1.36154871.

When calling the 
​navigator.serviceWorker.register('serviceworker.js') 
the cast device will instantly crash without throwing any errors except for "Something went wrong" on the TV

Multiple receiver applications that uses the service workers stopped working because of this update.
Some people suggested that this could be a deep C++ bug in the chromecast firmware.

Here is the code snippet that worked before the firmware update, and now it crashes:
( Tested on both v2 and v3 cast receiver framework )

if ('serviceWorker' in navigator) {
  navigator.serviceWorker.register('serviceworker.js', {scope: './'}).then(() => {
    console.log('Service worker registered, starting receiver context')
    const ctx = cast.framework.CastReceiverContext.getInstance();
    ctx.start()
  }).catch(err => {
    console.log(err);
  })
}

It would be nice of someone from the cast developers team could take a look into this issue.

Kind regards,

Joey

PS: The script in the service worker is irrelevant, even if it's empty it won't even execute because the cast devices crashes before registering the service worker.
All Replies (3)
10/24/19
Hello Joey
 
If you are new to developing for Cast, learn more about our policies at the Cast Developer Help Center.
marked this as an answer
Helpful?
-
10/24/19
Hi James, I appreciate your help but this doesn't really answer my question 🤔
Last edited 10/24/19
marked this as an answer
Helpful?
-
10/30/19
marked this as an answer
Helpful?
This question is locked and replying has been disabled.
Discard post? You will lose what you have written so far.
Write a reply
10 characters required
Failed to attach file, click here to try again.
Discard post?
You will lose what you have written so far.
Personal information found

We found the following personal information in your message:

This information will be visible to anyone who visits or subscribes to notifications for this post. Are you sure you want to continue?

A problem occurred. Please try again.
Create Reply
Edit Reply
Delete post?
This will remove the reply from the Answers section.
Notifications are off
Your notifications are currently off and you won't receive subscription updates. To turn them on, go to Notifications preferences on your Profile page.
Report abuse
Google takes abuse of its services very seriously. We're committed to dealing with such abuse according to the laws in your country of residence. When you submit a report, we'll investigate it and take the appropriate action. We'll get back to you only if we require additional details or have more information to share.

Go to the Legal Help page to request content changes for legal reasons.

Reported post for abuse
Unable to send report.
Report post
What type of post are you reporting?
Google takes abuse of its services very seriously. We're committed to dealing with such abuse according to the laws in your country of residence. When you submit a report, we'll investigate it and take the appropriate action. We'll get back to you only if we require additional details or have more information to share.

Go to the Legal Help page to request content changes for legal reasons.

Reported post for abuse
Unable to send report.
This reply is no longer available.
/chromecast/threads
//accounts.google.com/ServiceLogin
You'll receive email notifications for new posts at
Unable to delete question.
Unable to update vote.
Unable to update subscription.
You have been unsubscribed
Deleted
Unable to delete reply.
Removed from Answers
Marked as Recommended Answer
Removed recommendation
Undo
Unable to update reply.
Unable to update vote.
Thank you. Your response was recorded.
Unable to undo vote.
Thank you. This reply will now display in the answers section.
Link copied
Locked
Unlocked
Unable to lock
Unable to unlock
Pinned
Unpinned
Unable to pin
Unable to unpin
Marked
Unmarked
Unable to mark
Reported as off topic
/chromecast/profile/0?hl=en