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.

InvalidOperationException

See original GitHub issue

I know that it is hard to fix issue when it is not reproducible but this is one of that case where i can not reproduce this error. Our crawler works 2-3 days and stop permanently and gives below exception. I have to restart application when this is happened.

AngleSharp version is 9.9. .Net version is 4.6.1

Let me know if is there anything you need to know more.

System.InvalidOperationException: Exception of type 'System.InvalidOperationException' was thrown.
   at System.Runtime.CompilerServices.ConditionalWeakTable`2.VerifyIntegrity()
   at System.Runtime.CompilerServices.ConditionalWeakTable`2.Add(TKey key, TValue value)
   at AngleSharp.Dom.Node..ctor(Document owner, String name, NodeType type, NodeFlags flags)
   at AngleSharp.Dom.Document..ctor(IBrowsingContext context, TextSource source)
   at AngleSharp.Dom.Html.HtmlDocument.<LoadAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at AngleSharp.BrowsingContextExtensions.<OpenAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NinjaSpider.Engine.WebsiteCrawler.<GetHtmlDocumentAsync>d__28.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NinjaSpider.Engine.WebsiteCrawler.<GetPageInfoAsync>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NinjaSpider.Engine.SpiderQueue.<CrawlPageAsync>d__19.MoveNext() 

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:17 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
ushenkodmitrycommented, May 5, 2017

Nothing special. Just use “using”:

using(IDocument document = await BrowsingContext.New().OpenAsync(r => r.Address(uri).Content(content)))
{
}
0reactions
FlorianRapplcommented, May 23, 2017

Thanks for the info!

Read more comments on GitHub >

github_iconTop Results From Across the Web

InvalidOperationException Class (System)
InvalidOperationException is used in cases when the failure to invoke a method is caused by reasons other than invalid arguments.
Read more >
C# Exception Guide: InvalidOperationException
The InvalidOperationException exception type is thrown when a method call is invalid for the object's current state.
Read more >
Why is this code throwing an InvalidOperationException?
As you can see here, the First method throws an InvalidOperationException when the sequence on which it is called is empty.
Read more >
FIX: You receive a System.InvalidOperationException ...
InvalidOperationException exception when you start a .NET Framework-based application that runs Extensible Object Markup Language workflows on a computer ...
Read more >
Type: System.InvalidOperationException
InvalidOperationException is used in cases when the failure to invoke a method is caused by reasons other than invalid arguments.
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