Cant Open Certain Apps using App.open() or os.popen()

Asked by BrazilMac

Hi,

Im on a Mac, running version 1.1.3

I have tried with the below apps:

App.open("/Applications/Dictionary.app")
App.open("/Applications/Calendar.app")

works fine, but certain apps like Firefox or Photoshop for example, the app will open and instantly close. I have tried also creating .sh file and using :

os.popen('sh /Users/herickpaiva/firefox.sh')

as well as:

someapp = App("App");
someapp open()

to try to open the apps, but same thing happens, app launches and "vanishes" instantly.

Anything else I can do?

Thanks again!

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

I am on macOS 10.13 and tried this:

App.open("firefox")
App.open("google chrome")

both worked as expected.

Both apps are in the /Applications folder.

Another example:
PhotoScape X is the app title as shown in the menubar, but in the app package itself (Content/MacOS/...) it is named PhotoScapeX (the file that is used to open the app)

App.open("photoscape x") does not work
App.open("photoscapex") works

But that should not have anything to do with your problem, since you say, that the apps open but close again immediately.
You must have another problem with your system.
Did you try the mac open command from a Terminal?

I tested with SikuliX 1.1.4 (current development head), but should not make a difference.

Revision history for this message
BrazilMac (isoripper) said :
#2

Hi RaiMan, thank you very much for your reply.

I have tried (manually) using Open /Applications/Spotify.app for example, it works as expected.

But via script on IDE, same issue.

I am running 1.1.3 as I plan to move the script later to be run on Ubuntu

I will record a video to show exactly what happens

Revision history for this message
RaiMan (raimund-hocke) said :
#3

--1. The App features on Linux work differently anyways.
... and the 1.1.4 for Ubuntu will be ready soon.

--2. might not be clear enough: please run in a Terminal:

open -a firefox

Revision history for this message
RaiMan (raimund-hocke) said :
#4

what macOS version?
what Java?

Revision history for this message
BrazilMac (isoripper) said :
#5

Hi Raiman, apologies for the delay, was away!

OSX El Captain 10.11.16

java version "10.0.1" 2018-04-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)

I have a docker build running Ubuntu 16 and it works fine there :D

Revision history for this message
RaiMan (raimund-hocke) said :
#6

Seems to be