[2.0.5] macOS: IDE: not really usable with Java 8 since macOS 11.2.3 --- using Java 11 works

Asked by Jeff_Vallis

I see that getting here from IDE did not cop what I am using to Paste here
Imac - From About SikulixIDE-2.0.5 build 2021-03-03_09:10

[error] Mouse: not useable (blocked)
See: https://github.com/RaiMan/SikuliX1/wiki/Allow-SikuliX-actions-on-macOS

Cant see what I need to do from that page for the mouse

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jeff_Vallis (vallis-pj) said :
#1

Where can I post screen shots so you can see that Terminal is allowed in
Accessibility
Screen Recording

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

send me a mail with shots:
sikulix---at---outlook---dot---com

with ref to this question.

Revision history for this message
RaiMan (raimund-hocke) said :
#3
Revision history for this message
Jeff_Vallis (vallis-pj) said :
#4

Install Notes
https://github.com/RaiMan/SikuliX1/wiki/Allow-SikuliX-actions-on-macOS

What does this mean ?

when you want to run the SikuliX IDE from a Terminal using Java 8

           first in SysPrefs remove all entries with the name java (using - button)
                         I Presume this means Security and Privacy

           then use the + button to add java again: in the file dialog navigate to the respective java executable (..../bin/java)
What Does this mean - do I need to add something in Security and Privacy if so under which section
whatever the reply is I have no
root
/bin/java
e.g.
pwd ; ls -l
/bin
total 9336
-rwxr-xr-x 1 root wheel 121104 1 Jan 2020 [
-r-xr-xr-x 1 root wheel 1296640 1 Jan 2020 bash
-rwxr-xr-x 1 root wheel 121968 1 Jan 2020 cat
-rwxr-xr-x 1 root wheel 107552 1 Jan 2020 chmod
-rwxr-xr-x 1 root wheel 123232 1 Jan 2020 cp
-rwxr-xr-x 1 root wheel 1104640 1 Jan 2020 csh
-rwxr-xr-x 1 root wheel 277408 1 Jan 2020 dash
-rwxr-xr-x 1 root wheel 139264 1 Jan 2020 date
-rwxr-xr-x 1 root wheel 122160 1 Jan 2020 dd
-rwxr-xr-x 1 root wheel 121840 1 Jan 2020 df
-rwxr-xr-x 1 root wheel 120848 1 Jan 2020 echo
-rwxr-xr-x 1 root wheel 205648 1 Jan 2020 ed
-rwxr-xr-x 1 root wheel 121504 1 Jan 2020 expr
-rwxr-xr-x 1 root wheel 120864 1 Jan 2020 hostname
-rwxr-xr-x 1 root wheel 121232 1 Jan 2020 kill
-r-xr-xr-x 1 root wheel 2552352 1 Jan 2020 ksh
-rwxr-xr-x 1 root wheel 329344 1 Jan 2020 launchctl
-rwxr-xr-x 1 root wheel 105136 1 Jan 2020 link
-rwxr-xr-x 1 root wheel 105136 1 Jan 2020 ln
-rwxr-xr-x 1 root wheel 157360 1 Jan 2020 ls
-rwxr-xr-x 1 root wheel 104752 1 Jan 2020 mkdir
-rwxr-xr-x 1 root wheel 106176 1 Jan 2020 mv
-rwxr-xr-x 1 root wheel 291152 1 Jan 2020 pax
-rwsr-xr-x 1 root wheel 173568 1 Jan 2020 ps
-rwxr-xr-x 1 root wheel 120832 1 Jan 2020 pwd
-rwxr-xr-x 1 root wheel 106000 1 Jan 2020 rm
-rwxr-xr-x 1 root wheel 104368 1 Jan 2020 rmdir
-rwxr-xr-x 1 root wheel 120912 1 Jan 2020 sh
-rwxr-xr-x 1 root wheel 120784 1 Jan 2020 sleep
-rwxr-xr-x 1 root wheel 138656 1 Jan 2020 stty
-rwxr-xr-x 1 root wheel 120464 1 Jan 2020 sync
-rwxr-xr-x 1 root wheel 1104640 1 Jan 2020 tcsh
-rwxr-xr-x 1 root wheel 121104 1 Jan 2020 test
-rwxr-xr-x 1 root wheel 106000 1 Jan 2020 unlink
-rwxr-xr-x 1 root wheel 120752 1 Jan 2020 wait4path
-rwxr-xr-x 1 root wheel 1331248 1 Jan 2020 zsh

or
/Users/Jeff/bin/java
pwd ; ls -l
/Users/jeff
total 0
drwx------@ 4 jeff staff 128 22 Dec 09:59 Applications
drwx------+ 11 jeff staff 352 1 Apr 06:43 Desktop
drwx------@ 16 jeff staff 512 8 Mar 10:59 Documents
drwx------+ 11 jeff staff 352 26 Mar 08:50 Downloads
drwx------@ 81 jeff staff 2592 1 Feb 09:24 Library
drwx------ 5 jeff staff 160 13 Jan 13:07 Movies
drwx------+ 5 jeff staff 160 25 Dec 07:57 Music
drwx------+ 14 jeff staff 448 4 Mar 11:08 Pictures
drwxr-xr-x+ 4 jeff staff 128 21 Dec 06:25 Public

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

ok, thanks for feedback.

I have revised the information.

Please read again carefully from the beginning ;-)
Thanks

Revision history for this message
Jeff_Vallis (vallis-pj) said :
#6

Info on my Java

 /usr/libexec/java_home -V
Matching Java Virtual Machines (1):
    1.8.281.09 (x86_64) "Oracle Corporation" - "Java" /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
jeff@Jeffs-iMac ~ %

However you did not answer my last question
on you setup you instruct
when you want to run the SikuliX IDE from a Terminal using Java 8

first in SysPrefs remove all entries with the name java (using - button)
then use the + button to add java again: in the file dialog navigate to the respective java executable (..../bin/java)

Result
The only place I found Java was in
Full Disk Access - Java 8 Update
so I deleted it
but could not add it as I am unable to find it

Revision history for this message
Jeff_Vallis (vallis-pj) said :
#7

my setup

https://www.youtube.com/watch?v=P0HXoXUTHFE

https://www.youtube.com/watch?v=sFr7ngymKPg

I was just about to do a third video showing what happens after doing the setup and the Restarting

Revision history for this message
Jeff_Vallis (vallis-pj) said :
#8

Additional Video
This is what happens running 2.0.5 after a Restart

Runs ok first time
Failes on subsequent tries

This is fine with the IDE as it can just be ignored
however running a script aborts with the invalid message

https://www.youtube.com/watch?v=ci5MrzBJYVs

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

I am really sorry for this very odd behavior.

With macOS 11.2.2 it worked with Java 8 as documented.

With macOS 11.2.3 it does not work any more. It even behaves different on my MacBook Pro and my iMac4k, though they are both on 11.2.3 now.

I herewith have to say, that with the latest macOS 11.2.3 SikuliX is not usable with Java 8.
I did not find a way, to make it usable.

You have to follow my general recommendation and use Java 11 from AdoptOpenJDK.
With Java 11 it works without problems after having switched on Accessibility and ScreenRecording for the Terminal app.

Another option to have something that opens the IDE with a double-click:
Make a SikuliX.app using Automator by adding the correct java command to a shell script action.

Revision history for this message
Jeff_Vallis (vallis-pj) said :
#10

java -version
openjdk version "11.0.10" 2021-01-19
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.10+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.10+9, mixed mode)

no other actions - previous setup valid

Ran IDE - no error
Ran IDE again - no error ( Previously this gave an error )
Ran script - no errors

I am wondering now if setup was not required when moving from 2.0.4 to 2.0.5

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

For running Jython scripts nothing else is needed but the ide-mac jar (all is bundled).

one exception though: Tesseract has to be installed using HomeBrew (only if needed)

Revision history for this message
Jeff_Vallis (vallis-pj) said :
#12

All running fine now on 2.0.5 with Java 11

Thank for working out the problem.

Regards
Jeff

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

Thank YOU for your contribution, which finally brought me to the light of insight ;-)

Revision history for this message
Jeff_Vallis (vallis-pj) said :
#14

One more silly thing which I can live with
Using Java 11
when you run Sikuli - if while its loading you move the mouse
[error] Mouse: not useable (blocked)

As I said I can live with this mark as fixed if you feel its ok

Revision history for this message
Jeff_Vallis (vallis-pj) said :
#15

as Suggested I downloaded Java 11 from AdoptOpenJDK
today my Mac wanted me to update Java 8
System Preferences > Java --- still showing that I iMac is using Java 8 and wants me to upgrade
any Idea how to stop this

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

The browser support on macOS is still on Java 8.

So just do whatever Apple suggests to do about Java 8.

For SikuliX IDE and script run just do it from a Terminal session, where you can select the Java to be used (11 in our case) as discussed here.

Revision history for this message
Bhumika Rao (bhuvirao) said :
#17

 Can I know what exact SikuliX features needs to be enabled in Accessibility window? I'm working in Intel based MacOS Pro system. I am using SikuliX features in my Selenium testing script running in IntelliJ IDEA. In System Preferences ->Security & Privacy -> Accessibility , I have enabled the below features:
1. Activity Monitor
2. Automator
3. IntelliJ IDEA
4. java
5. Screenshot
6. Script Editor
7. Slack
8. Terminal

Can someone guide me what else to do to solve my problem of:
[error] Mouse: not useable (blocked)
org.sikuli.script.SikuliXception: Mouse.init: Mouse not useable (blocked) - Screenshots might not work either!

Can you help with this problem?

Provide an answer of your own, or ask Jeff_Vallis for more information if necessary.

To post a message you must log in.