Freeze application with ExecuteJavaScriptSyn

I have a problem with my application that uses a webview that opens a website and through a timer executes javascript with this function ExecuteJavaScriptSync me returns the values correctly.
The problem occurs when a dialog box is opened from the webview to upload a file, the application Freeze without any error message and I am forced to close the app.