Skip to content
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

The host is disposed and cannot be used. Object name: 'LoggerFactory'. #11

Open
skafaliev-dev opened this issue Jan 16, 2021 · 2 comments
Assignees

Comments

@skafaliev-dev
Copy link

Hello, thank you for this package.

There is some issue when I try to use it with Azure function v3 and netcoreapp3.1.
Here is my .csproj file.

<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>netcoreapp3.1</TargetFramework> <AzureFunctionsVersion>v3</AzureFunctionsVersion> </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="3.0.11" /> <PackageReference Include="PuppeteerExtraSharp" Version="1.2.0" /> <PackageReference Include="PuppeteerSharp" Version="2.0.4" /> </ItemGroup> <ItemGroup> <None Update="host.json"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> <None Update="local.settings.json"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToPublishDirectory>Never</CopyToPublishDirectory> </None> </ItemGroup> </Project>
The error is:
Microsoft.Azure.WebJobs.Script.WebHost: The host is disposed and cannot be used. Disposed object: 'Microsoft.Azure.WebJobs.Script.WebHost.ScriptLoggerFactory'. Microsoft.Extensions.Logging: Cannot access a disposed object. Object name: 'LoggerFactory'.
and it happens once code returns.

When I user only PuppeteerSharp , everything is fine.

@Overmiind
Copy link
Owner

Hello, thanks for your feedback. I'm really busy with work right now, but I will try to fix it as soon as possible.

@Overmiind Overmiind self-assigned this Jan 16, 2021
@Overmiind
Copy link
Owner

Overmiind commented Feb 4, 2021

I'm sorry to have kept you waiting. How are you using puppeteer with Azure? As I know there are 2 ways: SaaS like browserless.io or docker. Сould you send me a test project if you got one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants