From 48781ce3f9e98e13ef40f71bddfa01aa36959f48 Mon Sep 17 00:00:00 2001 From: Asaf Gabai <77976014+asafgabai@users.noreply.github.com> Date: Wed, 13 Sep 2023 12:00:24 +0300 Subject: [PATCH] Fix ERR_ABORTED when opening links (#416) Ignore ERR_ABORTED errors caused because JBCef cancels redirections when opening in an external browser. --- .../java/com/jfrog/ide/idea/ui/webview/WebviewManager.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/jfrog/ide/idea/ui/webview/WebviewManager.java b/src/main/java/com/jfrog/ide/idea/ui/webview/WebviewManager.java index 9444e78b..52658b45 100644 --- a/src/main/java/com/jfrog/ide/idea/ui/webview/WebviewManager.java +++ b/src/main/java/com/jfrog/ide/idea/ui/webview/WebviewManager.java @@ -51,6 +51,11 @@ public void onLoadEnd(CefBrowser browser, CefFrame frame, int httpStatusCode) { @Override public void onLoadError(CefBrowser browser, CefFrame frame, ErrorCode errorCode, String errorText, String failedUrl) { super.onLoadError(browser, frame, errorCode, errorText, failedUrl); + // When opening links in external browser, JBCef cancels the page redirection and opens the page in a new browser window. + // This cancelation causes CEF to throw an ERR_ABORTED error. + if (errorCode == ErrorCode.ERR_ABORTED) { + return; + } Logger.getInstance().error("An error occurred while opening the issue details view: " + errorText); } }, jbCefBrowser.getCefBrowser());