Pandawan / deno_notify

✉️ Send desktop notifications on all platforms in Deno
MIT License
46 stars 1 forks source link

Could not obtain symbol from the Library error #5

Closed joshmkennedy closed 3 years ago

joshmkennedy commented 3 years ago

When I tried to use the library I get this message.

error: Uncaught Error: Could not obtain symbol from the library: dlsym(0x7fc7e8531920, init): symbol not found
Deno.openPlugin("./libdeno_notify.dylib");
     ^
    at deno:core/01_core.js:106:46
    at unwrapOpResult (deno:core/01_core.js:126:13)
    at Object.opSync (deno:core/01_core.js:140:12)
    at Object.openPlugin (deno:runtime/js/40_plugins.js:8:22)
    at file:///Users/joshkennedy00/sites/joshs/time-to-harvest/deno/test.ts:3:6

This happens both when I install the plugin locally and use the prepared endpoint.

Here is the code that I am running that causes the bug

import { notify } from "https://deno.land/x/deno_notify@0.4.5/ts/mod.ts";

Deno.openPlugin("./libdeno_notify.dylib");
const sendAlert = () =>
  notify({
    title: "TEST",
    message: "testing os notification",
  });

sendAlert();
Pandawan commented 3 years ago

Yeah, unfortunately Deno has removed support for plugins because they were too unstable and caused many issues. This means that this plugin will not work with current versions of Deno. However, a new FFI system is in the works which should allow me to continue this project. Once support for strings/buffers is added, I’ll be able to start work again on this. Sorry for the inconvenience.

Pandawan commented 3 years ago

Hey! I've finally finally been able to upgrade to the new FFI system since they've added buffer support. I've released it as v1.0.0. Hopefully that fixes your issues.

EDIT: This also comes with a new API so you'll want to check out the README for more info.