I think you have covered the bases pretty well, but maybe the last resort is to execute the binary that resides inside “Applications/AppFolder/Contents/MacOs”, this can be interesting if you want to pass parameters to the executable during startup.
run this to check if the bundle identifier is spelled correctly
set {TID, text item delimiters} to {text item delimiters, return}
tell application "System Events"
set mozillaProcesses to (get name of processes whose name contains "mozilla") as text
end tell
set text item delimiters to TID
display dialog mozillaProcesses
tell application "System Events"
get name of every process whose name contains "mozilla"
--> {}
end tell
tell application "AppleScript Editor"
display dialog ""
--> {button returned:"OK"}
end tell
Result:
{button returned:"OK"}
set {TID, text item delimiters} to {text item delimiters, return}
tell application "System Events"
set mozillaProcesses to (get bundle identifier of processes whose bundle identifier contains "mozilla") as text
end tell
set text item delimiters to TID
display dialog mozillaProcesses
The problem is that Mozilla does not conform to the bundle identifier naming convention
From the documentation: The bundle ID string must be a uniform type identifier (UTI) that contains only alphanumeric (A-Z,a-z,0-9), hyphen (-), and period (.) characters. The string should also be in reverse-DNS format.