Skip to content

EvaluateScriptAsync stops working after about 15 minutes #5133

@Egzscure

Description

@Egzscure

Is there an existing issue for this?

  • I have searched both open/closed issues, no issue already exists.

CefSharp Version

137.0.100

Operating System

Windows 10

Architecture

x64

.Net Version

4.6.2

Implementation

WinForms

Reproduction Steps

If i run EvaluateScriptAsync, it works fine, even just setting a timer to run the samescript every few minutes, works fine, after about 15minutes, it doesnt work anymore.

I tested changing versions and it works fine on cefsharp 120.2.70, but im not sure which update, but i think after 121 something was broken, everytime a script runs after 15minutes of the ChromiumWebBrowser beeing initialized, it will no longer run any javascript injected with browser.EvaluateScriptAsync.

browser.EvaluateScriptAsync will return null and not run the script at all.

can test with a simple alert('hello world');, make it run every minute, in a simple static page, after about 15 minutes, it will no longer run the script that shows this alert, or any other script at all called with browser.EvaluateScriptAsync

This issue persists in all the versions until the current version, im surprised nobody else is complaining about this.

If i call the method ".reload()" i can again run scripts for another 15 minutes.. but its horrible experience.

Expected behavior

browser.EvaluateScriptAsync should run the script just like all the cefsharp versions until 120.2.70 , somewhere after this version, after around 15 minutes, the script no longer runs. Seems to be after an exact time of seconds passed, i didnt take note exactly of how many seconds it is, but for sure around 15 minutes.

It is not related to my project as i created an empty project and the same issue occurred

Actual behavior

after 15 minutes aproximately of initializing ChromiumWebBrowser, calling browser.EvaluateScriptAsync returns null and no longer runs the script passed in it, even a simple alert

Regression?

Does not occur on cefsharp versions <= 120.2.70

Known Workarounds

Only workaround is reloading it, calling the ".reload()" but still it makes the experience awful having to reload every 15 minutes to be able to continue running scripts.

Does this problem also occur in the CEF Sample Application

Yes using WPF/OffScreen command line args

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions