launchInDefaultBrowser() crashes on Android

URL manual_url( "" ) manual_url.launchInDefaultBrowser()

Causes an assertion on Android in File::parseAbsolutePath, followed by a crash. This code works fine on Win, Mac, iOS

else if (! path.startsWithChar (getSeparatorChar()))
    if (! (path.startsWith ("./") || path.startsWith ("../")))
        /*  When you supply a raw string to the File object constructor, it must be an absolute path.
            If you're trying to parse a string that may be either a relative path or an absolute path,
            you MUST provide a context against which the partial path can be evaluated - you can do
            this by simply using File::getChildFile() instead of the File constructor. E.g. saying
            "File::getCurrentWorkingDirectory().getChildFile (myUnknownPath)" would return an absolute
            path if that's what was supplied, or would evaluate a partial path relative to the CWD.

        Logger::writeToLog ("Illegal absolute path: " + path);

    return File::getCurrentWorkingDirectory().getChildFile (path).getFullPathName();

This should avoid hitting the assertion:

thx - will check shortly.

Hi, still getting the crash. Does this work ok for you?


OK, I’ve just reverted the above commit as that seems to be the cause of the crash. After reverting it, I can open URLs using launchInDefaultBrowser() and I’m not seeing the assertion any more. Can you see if it fixes it for you?

Hi, the assertion and crash have gone, but none of the links can be opened. Confirmed that this continues to work on iOS and Mac/Win.

Are you testing this on an actual device or in the simulator? It’s working fine for me on a physical Nexus 6 but it hangs in the simulator which I think is due to a lack of internet connection.

Hi, sorry - ignore, working ok. Forgot that the router was updated here a few days ago and needed to connect to a new network.