Chrome Extension mv3 - how to active service worker - google-chrome-extension

I am migrating a v2 extension to v3. Looking for a way to activate background.js, my extension goes blank as the service worker is killed.
I have tried adding some listeners, they work fine and can log messages, but the service worker not active when the listener is fired.

Related

Does Azure Functions throw 503 errors while app settings are being updated?

Whenever I update my application settings for a Function app and hit the Save button on Azure Portal, I observe that this action temporarily stops my function app while the changes are being persisted to the active worker(s). I need to understand if this is indeed the case or if I'm making a false assumption.
What happens exactly when app settings are updated in the portal?
503 is thrown while active worker(s) are being updated
OR
Another worker is specialized with the new host file. The old worker(s) stop once this one becomes active.
I keep getting 503 Service Unavailable errors. Is there any way to avoid this in production? I need to periodically rotate connection strings/keys, but I can't afford to disrupt the service constantly.
If you update the app settings, the app will be restarted. That's why you got 503 error.
Usually in the production environment, we will not change the app settings frequently.
Anyway, to avoid such situation, you can use the slot feature

Azure cloud web apps slows load at start

Not sure if you are experiencing the slowness of Azure cloud web apps loading at start even though AlwaysOn has been turned on.
Looking for any idea to solve this issue.
Thanks,
Riki
As a workaround, we can create a Web Job that it will continue to call our web app according to a certain period, for example, every five minutes. By this way,our application pool is never unloaded and our site is always ready to serve users.
More information about Web JOB, we can refer to: Run Background tasks with WebJobs in Azure App Service
We can create a console application and upload it to Azure as our web job program. You can find how to do it with above documentation
Update:
As you said that you have turned on "Always-On", I guess the reason for this problem is the Recycling feature of IIS Application Pool.
We can disable it with this article: Avoid automatic recycle of Azure Cloud Services Web Role

How can i fix a "System.Security.SecurityException" within an Azure web application?

I've uploaded my web app onto azure and get the following error when i try to run it:
The source was not found, but some or all event logs could not be searched. To create the source, you need permission to read all event logs to make sure that the new source name is unique. Inaccessible logs: Security.
The code does write event logs and it works on local machines cause you can run it as an administrator.
How am i able to work around this in Azure?
Applications can write to the application event log but they do not have access to the SECURITY logs due to the sandbox . Any event logs written to application event log are visible in event log.xml....
More details in https://github.com/projectkudu/kudu/wiki/Azure-Web-App-sandbox

Azure Service Fabric activation error

The deployment of one of my apps to a Service Fabric Cluster failed and triggered an Unhealthy Evaluation with an error event saying: There was an error during CodePackage activation.The service host terminated with exit code:3762504530
However, on the node where the app is deployed, Health State indicates: The application was activated successfully.
Is there any way to get a more detailed report on the error event?
I usually connect via RDP to the affected node and do the following things in such a case:
Check Console-Out / Console-Error logs: Service Fabric stores console output (if enabled via <ConsoleRedirection> in your ServiceManifest.xml) and errors in a log folder. On your DEV cluster, this should be C:\SfDevCluster\Data\_App\Node.x\<ApplicationTypeFolder>\log. On a default installation in Azure, it should be D:\SvcFab\_App\<ApplicationTypeFolder>\log
EventLog: .NET exceptions sometimes show up in the "Application" log, but Service Fabric also has its own subfolder which might contain helpful events.
PerfView: PerfView is a very powerful tool to monitor ETW events (Event Tracing for Windows). Since .NET exceptions are logged as ETW events, PerfView might show you helpful exceptions. Here's a quick tutorial:
Download and run PerfView
Go to "Collect -> Collect". De-Select "Merge".
Click "Start Collection".
Now kill your Service Fabric Service through Process Explorer, in case it is running. Moments later, Service Fabric will start it again.
If your service is not running, re-deploy your service.
After the service failed, press "Stop collection" in PerfView.
Now double-click on "Events" in the left tree - this will open all recorded ETW events.
Search for "Microsoft-Windows-DotNETRuntime/Exception/Start" and double click on it.
You should now see all .NET exceptions that occurred, ordered by time.

Getting IIS application pool recycle events to be logged in the Windows Event Log

I am trying to get IIS 7 application pool recycle, start, stop, etc. events to be logged to the Windows Event Log. I followed the steps outlined in this article but didn't have any success. I restarted the application pool and nothing was logged in the Event Log. (I checked both the "Application" and "System" logs.) But when I do an IIS reset that gets logged.
For IIS 7, IIS Manager can be used to enable recycle events to be logged in the Windows Event Log:
Open IIS Manager.
Click Application Pools.
Click the application pool of interest and click Advanced Settings....
Under Recycling, expand Generate Recycle Event Log Entry.
The available recycle events that can be logged are:
Application Pool Configuration Changed
Isapi Reported Unhealthy
Manual Recycle
Private Memory Limit Exceeded
Regular Time Interval
Request Limit Exceeded
Specific Time
Virtual Memory Limit Exceeded
This article made it clear why events were not registered in event log:
http://blogs.msdn.com/b/david.wang/archive/2006/02/28/why-iis6-application-pool-recycle-events-are-not-logged.aspx

Resources