openbullet / openbullet/OpenBullet2
[Bug]: Unhandled exception on puppeteer close browser
Open
@openbullet is already working on this.
Since Jun 6, 2024.
bug
- Dominant language
- C#
- Stars
- 2.4k
- Forks
- 603
- PR merge metrics
- No merged PRs in 30d
Description
Version of the software
0.2.5
Operating system
Windows 11
Browser / Native
Mozilla
What happened?
On browser close, OB2 Crashes and there is the error in the command line :
Unhandled exception. Unhandled exception. Unhandled exception. PuppeteerSharp.TargetClosedException: Protocol error(Page.addScriptToEvaluateOnNewDocument): Target closed. (Target.detachedFromTarget)
at PuppeteerSharp.CDPSession.SendAsync(String method, Object args, Boolean waitForCallback)
at PuppeteerSharp.FrameManager.EnsureIsolatedWorldAsync(String name)
at PuppeteerSharp.FrameManager.CreateFrameManagerAsync(CDPSession client, Page page, Boolean ignoreHTTPSErrors, TimeoutSettings timeoutSettings)
at PuppeteerSharp.Page.InitializeAsync(Boolean ignoreHTTPSErrors)
at PuppeteerSharp.Page.CreateAsync(CDPSession client, Target target, Boolean ignoreHTTPSErrors, ViewPortOptions defaultViewPort, TaskQueue screenshotTaskQueue)
at PuppeteerSharp.Target.CreatePageAsync()
at PuppeteerExtraSharp.PuppeteerExtra.<>c__DisplayClass9_0.<<Register>b__1>d.MoveNext()
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
at System.Threading.QueueUserWorkItemCallback.<>c.<.cctor>b__6_0(QueueUserWorkItemCallback quwi)
at System.Threading.ExecutionContext.RunForThreadPoolUnsafe[TState](ExecutionContext executionContext, Action`1 callback, TState& state)
at System.Threading.QueueUserWorkItemCallback.Execute()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
I tried using safe mode but it doesn't catch it, I tried to catch it myself but I failed (maybe I'm dumb but it's probably a bug).
Relevant LoliCode if needed
BLOCK:PuppeteerOpenBrowser
ENDBLOCK
BLOCK:PuppeteerNavigateTo
url = "https://google.fr"
loadedEvent = DOMContentLoaded
ENDBLOCK
BLOCK:PuppeteerGetAttributeValue
findBy = Selector
identifier = "body>div>div:nth-child(2)>div>img"
index = 0
attributeName = "src"
=> VAR @supersrc
ENDBLOCK
BLOCK:PuppeteerCloseBrowser
ENDBLOCK
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.