szymonkaliski / hhtwm

hackable tiling window manager for macOS and Hammerspoon
MIT License
237 stars 11 forks source link

hs/window/filter.lua:1430: attempt to call a nil value (method 'newWatcher') #4

Closed virtualirfan closed 4 years ago

virtualirfan commented 4 years ago

I get this error:

2020-05-13 13:11:16: *** ERROR: ...n.app/Contents/Resources/extensions/hs/window/filter.lua:1430: attempt to call a nil value (method 'newWatcher')
stack traceback:
    ...n.app/Contents/Resources/extensions/hs/window/filter.lua:1430: in upvalue 'startAppWatcher'
    ...n.app/Contents/Resources/extensions/hs/window/filter.lua:1559: in upvalue 'startGlobalWatcher'
    ...n.app/Contents/Resources/extensions/hs/window/filter.lua:1722: in upvalue 'start'
    ...n.app/Contents/Resources/extensions/hs/window/filter.lua:1913: in method 'subscribe'
    /Users/irfan/.dotfiles/hs/hhtwm/init.lua:790: in function 'hs.hhtwm.start'
    /Users/irfan/.dotfiles/hammerspoon-init.lua:391: in main chunk

My ~/.hammerspoon/init.lua has this:

hhtwm = require("hs.hhtwm")
hhtwm.start()

I'm using top of master versions of hammerspoon and axuieleement and spaces compiled myself.

The line of code in filter.lua:1430 is this:

local function startAppWatcher(app,appname,retry,nologging)
...
  local watcher = app:newWatcher(appWindowEvent,appname)
...
end

I have tried to debug for a few hours but figured it might not be user error. Plain vanilla everything so any help in debugging this much appreciated.

szymonkaliski commented 4 years ago

Hm, seems to fail at hs.window.filter.new() which is built-in Hammerspoon thing - so doesn't seem like an issue in HHTWM - can you try running just:

filter = hs.window.filter.new():setDefaultFilter()

and see if that fails?