Skip to content

Generic “Launch Services error -50” on OSX #193

@NotDrBright

Description

@NotDrBright

I have found an error (LS -50, cannot open application) on MacOS. This is probably device / system specific or maybe it’s literally just a problem on my side.

This error appears whenever the following code is used: var _ok = OS.shell_open(ProjectSettings.globalize_path("user://mods”))

Upon cheating my way into a solution (I did not make this nor do I take credit for it) replacing every instance of the code above (any time OS.shell_open() is used) with the following:

var path = ProjectSettings.globalize_path("user://mods")
	if OS.get_name() == "OSX":
		#macOS workaround using 'open' command directly
		OS.execute("open", [path], false)
	else:
		#Other platforms (Windows, Linux) use shell_open
		OS.shell_open(path)

This worked in a Godot debug session for me when I replaced every instance of OS.shell that stopped me from messing around with trying to make a mod. I have not tried to test it outside of a debug session. I also don’t know if this solution works for other platforms as well.

I hope this helps, if not then I’m sorry to waste time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions