Hi, I am not sure what is causing this issue, but but the constructor always hangs due tonotificationListener(). I put in sanity logging throughout the code, and it appears to hang on this block:
let runLoop = () => {
let pool = $.NSAutoreleasePool('alloc')('init');
try {
// ✅ GETS HERE OK (does next line take forever sometimes?)
app('nextEventMatchingMask', $.NSAnyEventMask.toString(),
'untilDate', $.NSDate('distantFuture'),
'inMode', $.NSDefaultRunLoopMode,
'dequeue', 1);
// ❌ FAILS TO GET HERE
} catch(e) {
// ❌ALSO FAILS TO GET HERE
errorCallback(e);
}
pool('drain');
setTimeout(runLoop, 500);
}
Also, the code directly after including nowplaying never executes:
const nowplaying = require('nowplaying');
console.log('does not get here :( – assume constructor at fault?');
Basically, the built-in callbacks fire within setupNotifications, but I am never able to attach nowplaying.on() listeners in my main code because the constructor for NowPlaying locks the process execution.
I have tried the following versions of node:
v6.13.0 LTS
v7.10.1
v8.9.4 LTS
On macOS High Sierra 10.13.3 (17D102)
Is there possibly a missing library I need through brew? I have libffi. It spews a fair amount of warnings upon install, but it has worked fine for my ffmpeg installation.
Hi, I am not sure what is causing this issue, but but the constructor always hangs due to
notificationListener(). I put in sanity logging throughout the code, and it appears to hang on this block:Also, the code directly after including
nowplayingnever executes:Basically, the built-in callbacks fire within
setupNotifications, but I am never able to attachnowplaying.on()listeners in my main code because the constructor forNowPlayinglocks the process execution.I have tried the following versions of node:
v6.13.0LTSv7.10.1v8.9.4LTSOn macOS High Sierra
10.13.3 (17D102)Is there possibly a missing library I need through
brew? I havelibffi. It spews a fair amount of warnings upon install, but it has worked fine for myffmpeginstallation.