[fixed with 3.0 compiled universal/ M1+intel] Preview.app not working [for some M1, Big Sur customers]

Hi Luc, thanks for this. I created a test account, launched Hook, and activated it in Preview, and the same issue happened - a beachball for what seems like a few minutes, followed by no linkable item found.

1 Like

thanks for letting us know, @tedsvo .

Seeing same situation on my MBP (new M1 running Big Sur 11.2.3).

Same problem related to preview on my MacBook Air M1 running newest Big Sur 11.2.3

+1 (MacBook Pro instead of Air)

This is extremely unlikely to be a Hook issue. We have seen that macOS 11 can sometimes get confused with respect to permissions.

We have seen that even if an app is listed in Automation, it may be necessary to toggle it off and on.

Please try this:

  1. Open System Preferences
  2. Click on the Security & Privacy button
  3. Click on the Privacy tab
  4. click on the Automation tab
  5. if the problematic app (here Preview) is not enabled, enable it.
  6. if the problematic app is enabled, try unchecking it, then checking the checkbox again.
  7. You may need to relaunch Hook in the app.

A reboot after changing Automation settings of an app may be required.

We have significantly updated the No Linkable Item in page, for one-stop shopping on the issue.

I think this is a problem with the m1. I have both an intel Mac mini and and M1 MacBook Air. Invoking Hook in Preview works in the former but not in the latter. I’ve checked everything that is mentioned in this post.
Also, notice the the M1 is the common thread.
Thanks for the great App, by the way. It has been very useful for my research although I fill I’ve just started learning how to use it.

1 Like

Are you running an old (2020) version of Timing? There was an issue where Timing would block AppleScript. Not specific to Hook, but Hook was collateral damage due to its use of AppleScript.

Welcome to the Hook Productivity Forum , @andresgm_org, and thanks for letting us know, and the kind words about Hook.

When No linkable item found in <App> happens for a supported app on M1/Big Sur, it’s almost always resolved to permissions issues. Either user declining the privileges accidentally, or Big Sur reverting permission for unknown reasons. Like I mentioned above, for the long delay case, we found an old version of Timing as being the source. This can be checked by running AppleScript directly from Script Editor, independently of Hook (potentially in a loop with some logging, if it’s an occasional problem.)

Hi Luc, no I don’t use Timing and I didn’t transfer any backup to this M1 MBP when I bought it, so it shouldn’t have other cruft from prior applications.

Still getting the beachball and No Linkable Item problems. I tried toggling Preview automation for Hook and restarting Hook to no avail. Perhaps I should try totally reinstalling Hook?

Teddy

Same here; New installation from scratch on M1 MBP, no Timing never ever but same problem. Tried every solution suggested several times without any luck so far …

1 Like

Strictly with Preview app, @racemase ?

could someone who is having this issue search for “Hook” in /Applications/Utilities/Console.app , replicate the issue, save the file, compress it, and mail or PM it to us? (Please don’t paste it in the public forum however. There’s a Message to Support button at the top of this web page.)

@tedsvo and @racemase . It may be that macOS permissions for Preview got corrupted on your Mac (that happens, not
due to Hook). You could try this:

  sudo tccutil reset All com.cogsciapps.hook

That will reset all of Hook’s access for all apps. You’ll need to give permission for any app that you want to use Hook with.

See also:

Hi Luc, I did this and restarted Hook and it asked me to reauthorize Accessibility, as well as grant permissions in each app I tried to invoke it in. When I tried to invoke it in Preview, Hook beachballed for a minute or two and then asked for permissions to control Preview. When I granted it it said no linkable item found, and now it’s back to stalling and doing nothing when I invoke it in Preview. I have to quit Hook from Activity Monitor to be able to use it again.

Fwiw I’m not running 11.3, and the problem hasn’t changed.

I’m also using M1 Mac and preview also doesn’t work for me as well. I also had a impression that the app just stuck for a minute when I was trying to give permission.

Thank you @tedsvo for your console output file.
(1) Could you please restart the machine after run the following command and see if it helps? Ignore this if you have done so.
sudo tccutil reset All com.cogsciapps.hook
(2) Could you please run the following command in /Applications/Utilities/Script Editor and send us the result?

tell application "Preview"
	set fpath to path of front document
	#tell application "System Events" to set myFileUrl to URL of fpath
	set escapedfpath to do shell script "python -c \"import urllib, sys; print (urllib.quote(sys.argv[1]))\" " & quoted form of fpath
	return "file://" & escapedfpath
end tell

Thank you

Hi,

so, I’ve updated my M1 MBP to 11.3 and still had the issue. I then restarted my machine and reset the permissions by running the shell command. After invoking hook within Preview it beachballed for almost two minutes, then asked for permissions and after granting them it showed “No linkable item”. This ist new. Before it just did nothing. So, I had the “No linkable item” before, with UI skripting Soulver as I run a German macOS. But as far as I understand, here it’s Apple Script and the different name of the application (Vorschau instead of Preview) should not be an issue. As noted, it run fine before on my non M1 MacBook on 10.15 (?).
I run the script in Script editor and the output is the path and filename of the opened pdf: “file:///Users/myusername/Downloads/Reparaturauftrag_2018-01-05.pdf”

I have never used the Console App and struggled a little but I will try to send you the output I’ve received privately.

Kind regards

Marco

FYI, we have been working behind the scenes (with some PMs) to isolate the issue. We thought it might be a cache problem (as that can sometimes affect AppleScript), but that hypothesis was refuted.

We’re now looking into whether on some Big Sur installations, the use of a python by a non-Apple app (viz. Hook) may be causing issues. [Script Editor is not bothered by it]. So we’ve replaced that bit of code for some to try to see if it’s an issue.

We’ll report back later.