Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not obtain symbol from the Library error #5

Closed
joshmkennedy opened this issue Sep 20, 2021 · 2 comments
Closed

Could not obtain symbol from the Library error #5

joshmkennedy opened this issue Sep 20, 2021 · 2 comments

Comments

@joshmkennedy
Copy link

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/[email protected]/ts/mod.ts";

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

sendAlert();
@Pandawan
Copy link
Owner

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
Copy link
Owner

Pandawan commented Oct 25, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants