Error "The application "Preview" can't be opened" -1703

My AppleScript applet has a user guide in its resources folder. The guide is in PDF format. To show the guide, my applet has this code:

set path_to_Applet_alias to path to me as alias
set help_file to (path to resource "Help.pdf" in bundle path_to_Applet_alias) as string
tell application "Finder"
	open file help_file
end tell

That code works. The applet is localised for a few languages. When I set the language in my applet to another language, e.g. French, that code punches an error:

"The application "Preview" can't be opened" -1703

According to Apple, the "-1703" error means "The wrong data type was detected". But, the data type hasn't changed.

I suspect something is going on with the translation but, I can't figure out what.

Any ideas ?

Answered by OMDDOUDOU in 709170022

Monterey 12.3.1 seems to be OK for this... Thanks Apple <);o)

Same for me since Monterey 12.3 Since this last upgrade i have the same error (with the app name corresponding to the files in selection)

Try this simple code with selection of files in Finder :

tell application "Finder" set myTest to selection repeat with itemTest in myTest open itemTest end repeat end tell

Same for me since Monterey 12.3

Since this last upgrade i have the same error (with the app name corresponding to the files in selection)

Try this simple code with selection of files in Finder :

tell application "Finder"
	set myTest to selection
	repeat with itemTest in myTest
		open itemTest
	end repeat
end tell

Hello, try this, it must be OK :

set path_to_Applet_alias to path to me as alias
set help_file to (path to resource "Help.pdf" in bundle path_to_Applet_alias) as string
tell current application to do shell script "open " & quoted form of POSIX path of help_file

And my example is now working:

tell application "Finder"
	set myTest to selection
	repeat with itemTest in myTest
		tell current application to do shell script "open " & quoted form of POSIX path of (itemTest as string)
	end repeat
end tell

I’m not tracking this issue in detail but there definitely seems to be a regression in macOS 12.3 that’s affecting a wide range of products (FB9958432). I can’t offer any details about when this will be fixed but, as per usual, my advice is that you re-test with beta releases of the system as we seed them.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Is that what you expect ?

Yes )-:

In general you can only see bugs that you file [1], so you can’t access this bug. I post bug numbers primarily as a reference for Apple folk, including Future Quinn™. It’s also important to have a bug number handy if you decide to escalate an issue with Apple via other channels.

I’ve stopped posting rdar: URLs for this reason: it confuses folks into thinking that they may be able to view the bug. In this case, however, DevForums automatically converts FBxxx numbers into links )-: You can prevent this from happening by quoting them as code (using backquotes, so FB9958432) and I’ll try to remember to do that in the future.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] Modulo the teams support, which is super cool but doesn’t help you here.

Just adding to this chain. Getting the same error when trying to open a smart object from Adobe Photoshop, that should open in Adobe Illustrator.

The application "Adobe Illustrator 2022" can't be opened. -1703

Coworkers running Monterey version 12.2.1 are not facing this issue. Only those on 12.3.

Hope this gets ironed out soon.

Running into the same issue here with Unity trying to open sublime and audacity to view/edit assets. When Unity tries to launch these other programs, I get a: The application "Audacity" can't be opened. -1703

Accepted Answer

Monterey 12.3.1 seems to be OK for this... Thanks Apple <);o)

Yep, looks like this issue was fixed with yesterday's macOS 12.3.1 (21E258) release.

+1. Yes, macOS 12.3.1 seems to have fixed my original problem.

I've already changed my AS code from Finder to System Events – which is usually quicker than Finder anyway. Think I'll leave it there.

Error "The application "Preview" can't be opened" -1703
 
 
Q