Strange error running osascript -e [command] on macOS Mojave
Asked Answered
U

1

7

I've just done a clean install of macOS Mojave (albeit various bits and pieces reinstalled) and getting a strange error running a bash script which in turn runs AppleScript via osascript. Any command passed to osascript -e seems to produce the same error, even though the actual command appears to complete.

e.g. $ osascript -e 'say "hello"'

Error is:

2018-12-03 22:35:26.301 osascript[39652:590470] isPrefsCreateCacheFromEnabledAndDefaultInputSources - can't find anything from GetInputSourceEnabledPrefs, use defaultASCIIKeyLayoutDict = {type = mutable dict, count = 3,
entries =>
0 : {contents = "InputSourceKind"} = {contents = "Keyboard Layout"}
1 : {contents = "KeyboardLayout ID"} = {value = +2, type = kCFNumberSInt64Type}
9 : {contents = "KeyboardLayout Name"} = British
}

Running the same command via the ScriptEditor application works fine.

Using system bash, one keyboard configured at install (British).

Anyone have the same issue or idea what the problem is?

Utu answered 3/12, 2018 at 23:0 Comment(0)
U
16

The issue went away when I added an extra keyboard via System Preferences > Keyboard > Input Sources. (Australian if anyone is interested.)

The issue stayed away after removing the extra keyboard. (I sporadically need the £.)

Report logged with Apple.

Utu answered 6/12, 2018 at 23:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.