Skip to content

authhelper: handle errors in auth diag collection #6675

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions addOns/authhelper/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Fixed
- Do not fail the authentication on diagnostic errors.
- Do not configure poll authentication verification without logged in indicator.
- Handle errors collecting the browser storage diagnostics.

## [0.27.0] - 2025-07-03
### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,25 +371,30 @@ private static <T> T resetWait(WebDriver wd, Supplier<? extends T> function) {
}

private void processStorage(JavascriptExecutor je, DiagnosticBrowserStorageItem.Type type) {
@SuppressWarnings("unchecked")
List<Map<String, String>> storage =
(List<Map<String, String>>) je.executeScript(type.getScript());
if (storage == null || storage.isEmpty()) {
return;
}
try {
@SuppressWarnings("unchecked")
List<Map<String, String>> storage =
(List<Map<String, String>>) je.executeScript(type.getScript());
if (storage == null || storage.isEmpty()) {
return;
}

storage.stream()
.map(
e -> {
DiagnosticBrowserStorageItem item = new DiagnosticBrowserStorageItem();
item.setCreateTimestamp(Instant.now());
item.setStep(currentStep);
item.setType(type);
item.setKey(e.get("key"));
item.setValue(e.get("value"));
return item;
})
.forEach(currentStep.getBrowserStorageItems()::add);
storage.stream()
.map(
e -> {
DiagnosticBrowserStorageItem item =
new DiagnosticBrowserStorageItem();
item.setCreateTimestamp(Instant.now());
item.setStep(currentStep);
item.setType(type);
item.setKey(e.get("key"));
item.setValue(e.get("value"));
return item;
})
.forEach(currentStep.getBrowserStorageItems()::add);
} catch (WebDriverException e) {
LOGGER.debug("Failed to process the storage:", e);
}
}

private DiagnosticWebElement createDiagnosticWebElement(
Expand Down
Loading