puppeteer-sharp: browser.NewPageAsync() dies in IIS
browser.NewPageAsync() dies in IIS same problem as #375
Hello again, today I found a issue that was asked before on #375, the browser.NewPageAsync is not returning anything, don’t know if there is an argument missing (probably not), or there was something that wasn’t right at the master code, so i tried to find a solution, i’ve kinda made it work but unfortunatly, i can’t find how can i open the other ISS’ port (something like that but this part doesn’t matter, just know that it worked), and when i tried to migrate the code the other side, it blow up
There is some part of my code
Remember, Im using my addon, so any method missing Async, is my doing
private Browser GetBrowser()
{
loggerFactory = new LoggerFactory();
return PuppeteerEx.Launch(new LaunchOptions()
{
Headless = true,
ExecutablePath = _ExecutionPath_, //It goes to the HostingEnvirounment
LogProcess = true,
},
loggerFactory;
);
private Page GetNavigatedPage(Browser browser)
{
Page page = browser.NewPage();
page.GoTo(Link, 30000);
return page;
}
catch (Exception e)
{
Debug.WriteLine(e);
throw e.GetBaseException();
}
private Page GetPage()
{
var browser = GetBrowser();
var Navigate = GetNavigatedPage(browser);
return Navigate;
}
}
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 47 (21 by maintainers)
@lucascebertin I don’t think so. I read a little bit about this issue and the problem is that ASP.NET thread management. I can’t confirm it yet, but it seems that ASP.NET is assigning only one thread per request and that deadlocks the execution because it doesn’t allow the connection (which is using
Task.Runto listen to new messages.I bet I’ll be working on this after I release 1.10.
@willsbctm @taz4270 reproduced guys.
@willsbctm I’ll take a look running it on IIS.