prestodb/presto · error · RedirectException
Could not open uri %s
Error message
Could not open uri %s
What it means
redirectTo could not launch a browser to open the external-authentication redirect URI: the OS-specific open command (macOS 'open', Windows 'cmd start', or a discovered Linux browser) failed to execute. The user must open the URL manually.
Source
Thrown at presto-client/src/main/java/com/facebook/presto/client/auth/external/SystemOpenRedirectHandler.java:73
throws RedirectException
{
String operatingSystem = System.getProperty("os.name").toLowerCase(ENGLISH);
try {
if (operatingSystem.contains("mac")) {
exec(uri, MACOS_OPEN_COMMAND);
}
else if (operatingSystem.contains("windows")) {
exec(uri, WINDOWS_OPEN_COMMAND);
}
else {
String executablePath = findLinuxBrowser()
.orElseThrow(() -> new FileNotFoundException("Could not find any known linux browser in $PATH"));
exec(uri, executablePath);
}
}
catch (IOException e) {
throw new RedirectException(format("Could not open uri %s", uri), e);
}
}
private static Optional<String> findLinuxBrowser()
{
List<String> paths = SPLITTER.splitToList(System.getenv("PATH"));
for (String path : paths) {
File[] found = Paths.get(path)
.toFile()
.listFiles((dir, name) -> LINUX_BROWSERS.contains(name));
if (found == null) {
continue;
}
if (found.length > 0) {
return Optional.of(found[0].getPath());
}View on GitHub (pinned to 55bb57d202)
Solutions
- Install or expose a known browser in $PATH on Linux
- Open the printed authentication URL manually in any browser
- Check OS detection and the open command availability
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at presto-client/src/main/java/com/facebook/presto/client/auth/external/SystemOpenRedirectHandler.java:73 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/5950fb9d3c23f29d.
Report an issue: GitHub.