Comments (13)
Going back to 1.0.33 fixed the issue, it's working again!
from webessentials.aspnetcore.serviceworker.
Same problem here. I believe the 'Update Constants.cs #29' commit is the issue.
from webessentials.aspnetcore.serviceworker.
I know it's not ideal but if you disable registering both the service worker and manifest:
services.AddProgressiveWebApp(new PwaOptions
{
RegisterServiceWorker = false,
RegisterWebmanifest = false,
OfflineRoute = "offline"
});
You can then manually add both back to your layout:
<meta name="theme-color" content="#FFFFFF" />
<link rel="manifest" href="/manifest.webmanifest" />
and
<script>'serviceWorker' in navigator && navigator.serviceWorker.register('/serviceworker')</script>
from webessentials.aspnetcore.serviceworker.
Same problem here. Going back to 1.0.33 fixed the issue for me also.
from webessentials.aspnetcore.serviceworker.
Facing same issue. Using other way around by setting RegisterServiceWorker
and RegisterWebmanifest
to false
and adding both file manually as mentioned by @jpisano
from webessentials.aspnetcore.serviceworker.
@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.
from webessentials.aspnetcore.serviceworker.
Having the same issue.
from webessentials.aspnetcore.serviceworker.
the last nuget package Version=1.0.42.0 has also again this error the master branch source are
public const string ServiceworkerRoute = "/serviceworker";
the reflected one is "~/serviceworker" with dll Version=1.0.42.0
from webessentials.aspnetcore.serviceworker.
Same issue with .NET Core 2.1
from webessentials.aspnetcore.serviceworker.
Thanks!
from webessentials.aspnetcore.serviceworker.
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.
from webessentials.aspnetcore.serviceworker.
from webessentials.aspnetcore.serviceworker.
May be is a similar issue and that is the reason to ask here.
I have follow code which is using RazorViewEngine to return compiled string when apply the model:
using (var output = new StringWriter())
{
var viewContext = new ViewContext(
actionContext,
view,
new ViewDataDictionary<TModel>(
metadataProvider: new EmptyModelMetadataProvider(),
modelState: new ModelStateDictionary())
{
Model = model
},
new TempDataDictionary(
actionContext.HttpContext,
_tempDataProvider),
output,
new HtmlHelperOptions());
await view.RenderAsync(viewContext);
return output.ToString();
}
All parameters are correct and it is working perfect when services.AddProgressiveWebApp() is not applied. But when you add it:
Unhandled Exception: System.AggregateException: One or more errors occurred. (Object reference not set to an instance of an object.) ---> System.NullReferenceException: Object reference not set to an instance of an object.
at WebEssentials.AspNetCore.Pwa.ServiceWorkerTagHelperComponent.Process(TagHelperContext context, TagHelperOutput output)
at Microsoft.AspNetCore.Razor.TagHelpers.TagHelperComponent.ProcessAsync(TagHelperContext context, TagHelperOutput output)
at Microsoft.AspNetCore.Mvc.Razor.TagHelpers.TagHelperComponentTagHelper.ProcessAsync(TagHelperContext context, TagHelperOutput output)
at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.RunAsync(TagHelperExecutionContext executionContext)
at AspNetCore._Views__EmailLayout.ExecuteAsync()
at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context)
at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, Boolean invokeViewStarts)
at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderLayoutAsync(ViewContext context, ViewBufferTextWriter bodyWriter)
at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context)
at Mvc.RenderViewToString.RazorViewToStringRenderer.RenderViewToStringAsync[TModel](String viewName, TModel model) in D:\Projects\TFS\GetTaxSolutions\Tools\MailKit Client\SendMailKit\TazorToString\RazorViewToStringRenderer.cs:line 58
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at Mvc.RenderViewToString.Program.Main() in D:\Projects\TFS\GetTaxSolutions\Tools\MailKit Client\SendMailKit\TazorToString\Program.cs:line 24
Press any key to continue . . .
I tried to apply PWA options to:
RegisterServiceWorker = false, RegisterWebmanifest = false,
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
Pwa: 1.0.49
Thanks
from webessentials.aspnetcore.serviceworker.
Related Issues (20)
- Manifest and Authorization HOT 1
- duplicate script tag added to page
- Detecting offline mode; navigator.onLine not working HOT 1
- Veracode Static Analysis Scan
- errors after configuring pwa with WebEssentials.AspNetCore.PWA HOT 1
- Multi Language
- Error Publish Server HOT 1
- Doubled registration
- service worker is not being registered and rendered when .NET core 5 app is published into IIS HOT 7
- iOS Install App Prompt Workarounds? HOT 4
- Bad Response + Manifest: Line: 1, column: 1, Syntax error. + Failed to register a ServiceWorker HOT 3
- unable to add to blazor server project
- ADB2C infinite loop HOT 1
- Error Activate
- WebManifest.IsValid implementation is wrong
- Google and Linkedin OAuth Fails in iOS and Safari browser on MacOS after adding service worker
- Failed to execute 'put' on 'Cache' HOT 1
- No matching service worker detected when accessed using IP
- Obsolete reference to "NWebsec.AspNetCore.Mvc.TagHelpers" HOT 1
- How to fix "Site cannot be installed: Page is not served from a secure origin"? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webessentials.aspnetcore.serviceworker.