question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GetContentAsync no longer working after update

See original GitHub issue

I have a simple method

public virtual string GetHtml(Page page)
{
    return page.GetContentAsync().Result;
}

Before updating to 1.8 from 1.6 this method worked fine for me. However, it seems to hang whenever it is called now. The reason it is inside a method like this is that I have other overrides that fetch the html differently.

If I simply call the function it just hangs. However, If i call the same method using an await before doing it using .Result it works. The code below will work only if string temp = is used first.

string tmp = await Page.GetContentAsync();
var html = handler.GetHtml(page);

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
danhastingscommented, Oct 12, 2018

@kblok I downgraded to v1.7 and it is working again. This narrows it down a bit to something specific to v1.8. Ill have a look over the diff and see if i can find anything

0reactions
kblokcommented, Dec 24, 2018

Closed due to inactivity. Feel free to reopen it if needed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Question - GetContentAsync() timeout after 10 seconds
It always times out after 10 seconds, regardless of how much of the file has downloaded. The service status dashboard is reporting no...
Read more >
Use PuppeteerSharp.Page.GetContentAsync in Puppeteer ...
Use the GetContentAsync method in PuppeteerSharp package in your next Puppeteer-sharp project with LambdaTest Automation Testing Advisor.
Read more >
How to use CoreWebView2WebResourceResponseView. ...
I created one C# Windows Form App, and have the following code now: using Microsoft.Web.WebView2. ... GetContentAsync Method in WebView2.
Read more >
How to wait until web page is loaded before scraping ...
DOMContentLoaded method, so the data doesn't exist in the HTML when calling the GetContentAsync method. Here is how my codes looking (C#):
Read more >
Bad request on attempt to update Wiki page
Bad request on attempt to update Wiki page ... PageContent pageContent = await GetContentAsync(url); ... Any ideas why it does not work?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found