rickbutterfield / Umbraco.Community.Sustainability

A package from the Umbraco Community Sustainability Team which helps developers and editors see and improve the carbon impact of their websites.
MIT License
6 stars 3 forks source link

Issue running under IIS - Umbraco 13 / Net 8.0 #7

Open binraider opened 3 months ago

binraider commented 3 months ago

Which Umbraco.Community.Sustainability version are you using?

1.0.0-alpha.2

Which Umbraco version are you using? For example: 10.4.0 - don't just write v10

13.2.0

Bug summary

When running in Debug mode there is no problem, but once i deployed to a local folder on windows 10 (22H2) in IIS (which i do with all my .Net core websites) the website refuses run.

The error message is like so:

Application '/LM/W3SVC/100/ROOT' with physical root 'C:\ClientData\Clients\Umbraco-Testers\Umbraco13A6\Published\' hit unexpected managed exception, exception code = '0xe0434352'. First 30KB characters of captured stdout and stderr logs:
Failed to install browsers
Error: EPERM: operation not permitted, mkdir 'C:\WINDOWS\system32\config\systemprofile\AppData\Local\ms-playwright'
Unhandled exception. System.Exception: Playwright exited with code 1
   at Umbraco.Community.Sustainability.SustainabilityComposer.Compose(IUmbracoBuilder builder)
   at Umbraco.Cms.Core.Composing.ComposerGraph.Compose()
   at Umbraco.Cms.Core.DependencyInjection.UmbracoBuilderExtensions.AddComposers(IUmbracoBuilder builder)
   at Program.<Main>$(String[] args) in C:\ClientData\Clients\Umbraco-Testers\Umbraco13A6\Umbraco13A6\Program.cs:line 3
   at Program.<Main>(String[] args)

I created the reportedly errant folder, C:\Windows\System32\config\systemprofile\AppData\Local\ms-playwright but it still complained.

Steps to reproduce

Install fresh copy of Umbraco 13.2 Install the Umbraco.Community.Sustainability package Publish to a folder which is set up in IIS to be a website Navigate to said site

Expected result / actual result

The expected result is that the site should start.

image

rickbutterfield commented 2 months ago

Hey @binraider! v1.0.2 has just been released with a fix for this particular issue, please can you give it a try and report back?

JohanReitsma83 commented 1 month ago

This issue still remains with the following packages:

Error: EPERM: operation not permitted, lstat 'd:\' at Object.realpathSync (node:fs:2668:25) at toRealPath (node:internal/modules/helpers:55:13) at Module._findPath (node:internal/modules/cjs/loader:697:22) at resolveMainPath (node:internal/modules/run_main:26:23) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:24) at node:internal/main/run_main_module:28:49 { errno: -4048, code: 'EPERM', syscall: 'lstat', path: 'd:\' }

Node.js v20.11.0 Unhandled exception. System.Exception: Playwright exited with code 1 at Umbraco.Community.Sustainability.SustainabilityComposer.Compose(IUmbracoBuilder builder) at Umbraco.Cms.Core.Composing.ComposerGraph.Compose() at Umbraco.Cms.Core.DependencyInjection.UmbracoBuilderExtensions.AddComposers(IUmbracoBuilder builder) at Program.

$(String[] args) in D:\DevOps\agent_work\4390\s\Demo.Website\Program.cs:line 19 at Program.
(String[] args)