{"record":{"id":"5950fb9d3c23f29d","repo":"prestodb/presto","slug":"could-not-open-uri-s","errorCode":null,"errorMessage":"Could not open uri %s","messagePattern":"Could not open uri (.+?)","errorType":"exception","errorClass":"RedirectException","httpStatus":null,"severity":"error","filePath":"presto-client/src/main/java/com/facebook/presto/client/auth/external/SystemOpenRedirectHandler.java","lineNumber":73,"sourceCode":"            throws RedirectException\n    {\n        String operatingSystem = System.getProperty(\"os.name\").toLowerCase(ENGLISH);\n\n        try {\n            if (operatingSystem.contains(\"mac\")) {\n                exec(uri, MACOS_OPEN_COMMAND);\n            }\n            else if (operatingSystem.contains(\"windows\")) {\n                exec(uri, WINDOWS_OPEN_COMMAND);\n            }\n            else {\n                String executablePath = findLinuxBrowser()\n                        .orElseThrow(() -> new FileNotFoundException(\"Could not find any known linux browser in $PATH\"));\n                exec(uri, executablePath);\n            }\n        }\n        catch (IOException e) {\n            throw new RedirectException(format(\"Could not open uri %s\", uri), e);\n        }\n    }\n\n    private static Optional<String> findLinuxBrowser()\n    {\n        List<String> paths = SPLITTER.splitToList(System.getenv(\"PATH\"));\n        for (String path : paths) {\n            File[] found = Paths.get(path)\n                    .toFile()\n                    .listFiles((dir, name) -> LINUX_BROWSERS.contains(name));\n\n            if (found == null) {\n                continue;\n            }\n\n            if (found.length > 0) {\n                return Optional.of(found[0].getPath());\n            }","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-client/src/main/java/com/facebook/presto/client/auth/external/SystemOpenRedirectHandler.java#L55-L91","documentation":"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.","triggerScenarios":"Thrown at presto-client/src/main/java/com/facebook/presto/client/auth/external/SystemOpenRedirectHandler.java:73 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}