hammerspoon: "internal.so" cannot be opened because the developer cannot be verified

I’m encountering ‘“internal.so” cannot be opened because the developer cannot be verified’ for the hammerspoon _asm spaces module. Unsure what could be causing it. This is a new computer, but I had just set this all up on another new computer last month and it worked fine.

Discussion on irc:

snowe2010
08:46:37
asked this yesterday, but think my client messed up, so lost all the history. 
Unable to find anything in the github issues, but I'm encountering '"internal.so" cannot be opened because the developer cannot be verified' for the hammerspoon _asm spaces module. Unsure what could be causing it. This is a new computer, but I had just set this all up on another new computer last month and it worked fine.this is on Catalina btw.
Ng
08:47:22
snowe2010: that's macOS being secure at you :/
where did you put the internal.so?
snowe2010
08:47:54
it's just in my dotfiles, then I symlink the hammerspoon folder. let me link my layout. 
https://github.com/snowe2010/dotfiles/tree/master/hammerspoon/hammerspoon.symlink
Ng
08:48:14
hmm, I thought we specified that we wanted to be able to load arbitrary library files
snowe2010
08:50:19
internal.so is here https://github.com/snowe2010/dotfiles/tree/master/hammerspoon/hammerspoon.symlink/hs/_asm/undocument...
snowe2010
09:02:36
here's the full error:
2020-08-10 17:06:48: *** ERROR: error loading module 'hs._asm.undocumented.spaces.internal' from file '/Users/tyler.thrailkill/.hammerspoon/hs/_asm/undocumented/spaces/internal.so':	dlopen(/Users/tyler.thrailkill/.hammerspoon/hs/_asm/undocumented/spaces/internal.so, 6): no suitable image found.  Did find:	/Users/tyler.thrailkill/.hammerspoon/hs/_asm/undocumented/spaces/internal.so: code signature in (/Users/tyler.thrailkill/.hammerspoon/hs/_asm/undocumented/spaces/internal.so) not valid for use in process using Library Validation: library load disallowed by system policystack traceback:	[C]: in ?	[C]: in function 'rawrequire'	...app/Contents/Resources/extensions/hs/_coresetup/init.lua:579: in function 'require'	...ilkill/.hammerspoon/hs/_asm/undocumented/spaces/init.lua:8: in main chunk	[C]: in function 'rawrequire'	...app/Contents/Resources/extensions/hs/_coresetup/init.lua:579: in function 'require'	...thrailkill/.hammerspoon/Spoons/MoveSpaces.spoon/init.lua:26: in main chunk	[C]: in function 'rawrequire'	...app/Contents/Resources/extensions/hs/_coresetup/init.lua:579: in function 'require'	...app/Contents/Resources/extensions/hs/_coresetup/init.lua:259: in field 'loadSpoon'	...oon.app/Contents/Resources/extensions/hs/spoons/init.lua:240: in function 'hs.spoons.use'	...railkill/.hammerspoon/Spoons/SpoonInstall.spoon/init.lua:386: in function 'SpoonInstall.andUse'	/Users/tyler.thrailkill/.hammerspoon/init.lua:49: in main chunk	[C]: in function 'xpcall'	...app/Contents/Resources/extensions/hs/_coresetup/init.lua:630: in function 'hs._coresetup.setup'	(...tail calls...)
agh. I should have used pastebin. give me a sec
https://pastebin.com/z4KsKEwz
snowe2010
10:02:37
Ng, anything I can dig into here to figure out why this is happening?
Ng
10:04:09
snowe2010: sorry, I'm not sure. I know why this is happening, I'm just surprised that it is
we moved to the new macOS hardened runtime, but I'm sure I applied the setting for "allow loading unsigned libraries"
your easiest option would be to downgrade to HS 0.9.75
but there may also be things you can do to break HS' code signature, thus disabling some of these checks
snowe2010
10:28:16
hm.. found the same issue here, https://developer.apple.com/forums/thread/115451, where it sounds like they did the same thing but had the same error.
snowe2010
10:30:27
I install using homebrew, maybe that's part of the issue? that makes it more difficult to downgrade though.
Ng
10:47:54
ah interesting
it could be that asm's build is too old
Ng
10:49:17
snowe2010: could you run: otool -l /Users/tyler.thrailkill/.hammerspoon/hs/_asm/undocumented/spaces/internal.so | grep -B 1 -A 3 LC_VERSION_MIN
snowe2010
10:49:40
❯ otool -l /Users/tyler.thrailkill/.hammerspoon/hs/_asm/undocumented/spaces/internal.so | grep -B 1 -A 3 LC_VERSION_MINLoad command 8      cmd LC_VERSION_MIN_MACOSX  cmdsize 16  version 10.10      sdk 10.12
blargh, that looks bad. need me to post in pastebin? I'm using kiwi right now as this is a brand new computer and don't have weechat setup...
Ng
10:50:49
no that's fine
but it blows that theory out of the window, because 10.10 should be new enough
snowe2010
10:52:07
:(
Ng
11:00:53
snowe2010: would you mind opening a github issue? in the worst case, I'm happy to codesign asm's build
❯ otool -l /Users/tyler.thrailkill/.hammerspoon/hs/_asm/undocumented/spaces/internal.so | grep -B 1 -A 3 LC_VERSION_MIN

Load command 8
      cmd LC_VERSION_MIN_MACOSX
  cmdsize 16
  version 10.10
      sdk 10.12

Versions:

macOS Catalina 10.15.6 Hammerspoon 0.9.78 (5164)

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 25 (16 by maintainers)

Most upvoted comments

Glad we got it figured out. I would not have thought to look there for approving a dylib!

Screen Shot 2020-08-12 at 12 39 41 PM

🤦

thanks for all the help. I’ve had to approve a lot of stuff in that spot, no clue why I didn’t go look there for this one…

Hmm, so the coroutine fix is also newer than our latest release… I guess it has been long enough that I had forgotten that…

And now that I recall, prior to that I hadn’t made precompiled binaries for as many modules as I do now, so I don’t even find one in the history that I deleted prematurely.

I’ve just compiled a version against the formal release and confirmed that it loads. Can’t test it much further on this machine without undoing a major amount of Hammerspoon configuration, but I’ll try it on another machine (that currently doesn’t have Hammerspoon installed, so it will be pristine) but won’t have time until later today or tomorrow. If you want to check it out sooner, visit https://github.com/asmagill/hs._asm.undocumented.spaces and download spaces-v0.2.release.tar.gz.


I get it about spending time on other projects… I recently purchased a 3d printer and am still in the tweaking/honeymoon phase, and I’m restoring an old Heathkit Hero JR RT-1, so… a bit distracted myself 😁 But I’m trying to avoid the long separation from Hammerspoon that I went through last year by poking at it at least once a week… I’m mostly succeeding 😜