-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[bug] No command register_listener found for plugin #8068
Comments
This is a serious bug and should be handled ASAP. The mobile plugin event system is completely unusable as of 2.0.4 |
There was an error with
My code is: addPluginListener("plugin-name", "eventName", eventCallback); Additionally, the My plugin and example project depend on However, when I changed the code to const handler = new Channel();
handler.onmessage = eventCallback;
invoke("plugin:plugin-name|register_listener", { event: "eventName", handler }).then(
() => new PluginListener("plugin-name", "eventName", handler.id)
); Result:Sorry, It's my bad, I didn't configure some settings correctly.
After completing the above steps, |
Very helpful description of your issue, thank you ! I used it to benchmark mine (roughly the same). Side note, you don't need to reimplement import { addPluginListener } from '@tauri-apps/api/core'; I can confirm it does the same thing. |
Describe the bug
I create a plugin directly in a project on my own, I have a requirement that the plugin returns specified data to the front-end via a trigger. When using
addPluginListener
it reports an errorNo command register_listener found for plugin
. I found that the naming in @TauriPlugin isregisterListener
, and I'm not sure if the listener registration fails because the naming is not converted.addPluginListener code and TauriPlugin Code
And I made a plugin directly in the source project, I don't know if this has an effect or not.
Here is the code:
Rust:
Kotlin:
TS:
Reproduction
No response
Expected behavior
No response
Platform and versions
Stack trace
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: