So, I figured it out. I was going to vote to close the question, but I decided that I would leave it here when I saw other people with this question who did not know how to resolve it. Although this is super-stupid :) (or rather, me).
So, I launched the website using the Play button, as well as the Start Debugging button, which in Visual Studio 2017 launches a special Chrome window in which the above error will be displayed.
To get around the problem, I can (or you can, the Internet traveler of the future) simply start without debugging, host the website in IIS, etc.
EDIT: If there is a better way around the path where I can use the service worker in debug mode, suggest it and I will mark this as an answer. However, for my specific problem, the above solution works fine :).
source share