-
-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error with .NET Core 2.1 and Razor Pages #36
Comments
Same problem here. I believe the 'Update Constants.cs #29' commit is the issue. |
Going back to 1.0.33 fixed the issue, it's working again! |
Same problem here. Going back to 1.0.33 fixed the issue for me also. |
I know it's not ideal but if you disable registering both the service worker and manifest:
You can then manually add both back to your layout:
and
|
Facing same issue. Using other way around by setting |
@madskristensen It appears the latest WebEssentials.AspNetCore.SPA NuGet package doesn't work with .NET Core 2.1 because of the tilde, as described in the first post in this thread. |
Having the same issue. |
the last nuget package Version=1.0.42.0 has also again this error the master branch source are |
Same issue with .NET Core 2.1 |
Thanks! |
I was wondering if anyone has the status on this issue? Found a couple potential workarounds but if there's a plan to push a NuGet update for a fix I'd be fine waiting for that. Thanks for any update. |
Thanks for keeping me in the loop. I’d be interested in the workarounds and any info on a possible NuGet update.
From: Caden Sumner <notifications@github.com>
Sent: Wednesday, February 6, 2019 2:47 PM
To: madskristensen/WebEssentials.AspNetCore.ServiceWorker <WebEssentials.AspNetCore.ServiceWorker@noreply.github.com>
Cc: scearces <stevenscearce@hotmail.com>; Author <author@noreply.github.com>
Subject: Re: [madskristensen/WebEssentials.AspNetCore.ServiceWorker] Error with .NET Core 2.1 and Razor Pages (#36)
I was wondering if anyone has the status on this issue? Found a couple potential workarounds but if there's a plan to push a NuGet update for fix I'd be fine waiting for that.
Thanks for any update.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#36 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AnKx1YqxEv64gTOTqH_v5tZK8kx5j3Akks5vKzE2gaJpZM4VJoHH>.
|
May be is a similar issue and that is the reason to ask here.
All parameters are correct and it is working perfect when services.AddProgressiveWebApp() is not applied. But when you add it:
I tried to apply PWA options to:
It's working but is not good solution for me. Is there some better solution to resolve this issue? Are you planning to fix it in next version? AspNetCore version: 2.2 |
My configuration: localhost, Windows 10, Visual Studio 2017, ASP.NET Core 2.1, Razor Pages. The WebEssentials.AspNetCore.PWA package injects 2 lines into _Layout.cshtml. The first line, in the head, should be link rel="manifest" href="/manifest.webmanifest" /. Instead, in my configuration it generates link rel="manifest" href=" ~ /manifest.webmanifest" /. See the extra tilde . This causes chrome to fail to locate the manifest.webmanifest. The second line it injects, in html region, should be script nws-csp-add-nonce='true'>'serviceWorker' in navigator && navigator.serviceWorker.register('/serviceworker') /script. Instead it is injecting script nws-csp-add-nonce='true' 'serviceWorker'in navigator&&navigator.serviceWorker.register('~/serviceworker') /script>. Again, see the tilde. This cause the service worker registration to fail be cause Chrome can't locate it. My question is what do I need to do to make it generate the code correctly? Is it because I am using .NET Core 2.1 instead of .NET Core 2.0 or is there something else I need to change? Thanks.
The text was updated successfully, but these errors were encountered: