#Conflict between deeplink plugin and single-instance plugin

15 messages · Page 1 of 1 (latest)

fleet shadow
#

I would like to combine the single-instance plugin with the deeplink plugin but it seems that they are conflicting with each other and the single-instance callback is not being executed but instead the deeplink plugin's callback is being triggered with an empty request.

Is this known/expected and are there ways to work around it?

Here is a minimal reproduction: https://github.com/matthme/deeplink-single-instance/tree/minimal

GitHub

Reproduction of a conflict between tauri-plugin-deeplink and tauri-plugin-single-instance - GitHub - matthme/deeplink-single-instance at minimal

golden grotto
#

Is this known/expected
yes

fleet shadow
#

Oh bummer...is there a github issue? I didn't find it...

#

Is it something that is fixable in principle with modifications to either of the plugins?

golden grotto
#

Oh bummer...is there a github issue? I didn't find it...
Probably not, the deep link plugin is not official after all so it's not expected to not conflict with official plugins. Though even if it would be official it's a bit tricky.

#

Is it something that is fixable in principle with modifications to either of the plugins?
Yes, i think so. Or i guess that depends on how you want the solution to look like

rapid citrus
#

is it solved in the newer build @golden grotto?

golden grotto
#

not in v1 builds. The official v2 deep link won't have the single instance mechanism my unofficial plugin had though i can't remember if that was the problem here.

rapid citrus
#

i am on v2 and using tauri_plugin_single_instance and i am emitting an event for deep link and listening to it on my svelte frontend along with that when i try to emit another event for single instance like this https://github.com/tauri-apps/plugins-workspace/tree/v1/plugins/single-instance so it is not working.

Also when i tried after removing the deep link emit it worked fine.

I also tried this way https://beta.tauri.app/features/single-instance/ mentioned here for the beta version but same result.

GitHub

All of the official Tauri plugins in one place! Contribute to tauri-apps/plugins-workspace development by creating an account on GitHub.

Tauri

Ensure that a single instance of your Tauri app is running at a time.

golden grotto
#

could you create a minimal reproduction or take a video of the issue? And before that, post the output of tauri info please so i know which platform we're talking about.

rapid citrus
#

Here is the plaform info

rapid citrus
golden grotto
#

Thank you very much. I will take a look as soon as i can.

#

One thing that may cause issues is the args[1]. If the Vec only has a single argument (index 0) this could panic too i think

#

Actually i am fairly sure that's the issue since you started the instance normally and not via a deep link, so args[1] should be undefined