foliojs / font-manager

A C++ module for Node.js providing access to the system font catalog.
MIT License
295 stars 100 forks source link

Verification error on macOS Catalina #48

Open Chap92 opened 4 years ago

Chap92 commented 4 years ago

When you try to run font-manager on macOS Catalina, you get an error: "fontmanager.node" cannot be opened because the developer cannot be verified. Will notorization resolve this issue?

devongovett commented 4 years ago

What do you mean by "run"? Could you give a code example? It works for me on Catalina.

Chap92 commented 4 years ago

Does it work without getting it notarized? I tried to integrate font-manager into an Adobe CEP extension, which uses Node.js v7.7.4. font-manager was locally installed in the folder of the extension. The extension works as expected in macOS High Sierra and Mojave, but gives the above error in Catalina: ("fontmanager.node" cannot be opened because the developer cannot be verified). I'm guessing the C++ source files have to be re-compiled and notarized for it to work correctly?

devongovett commented 4 years ago

Yeah I didn't do anything to notarize it. You're getting that with just require('font-manager')?

Chap92 commented 4 years ago

No, the error does not come with just require ('font-manager'). The error pops-up when you try to invoke function getAvailableFonts ():

    app.get ("/get-fonts", (req,res,next) => {
        fontManager.getAvailableFonts(function(fonts) { 
            res.status(200).send(fonts);
        });

    });

I'm guessing that is the point where it tries to access fontmanager.node. Did you make any changes to your machine to disable Gatekeeper? Like sudo spctl --master-disable maybe?