#Plugin Websocket TLS error: native-tls error: The token provided to the function is invalid

58 messages · Page 1 of 1 (latest)

dense ginkgo
#

The plugin's v2 is for use with Tauri v2. You're probably using Tauri v1 if you're getting that compile error. The way to know for sure is to check what tauri info reports.

#

Are you using a self-signed certificate? If so, how did you generate the certificate?

true lotus
dense ginkgo
true lotus
dense ginkgo
#

You used wss:// which is a secure websockets connection. The websocket server that is listening on localhost:3000 should have a certificate.

#

If it doesn't have a certificate, then you should try with ws:// instead. Note the single s.

true lotus
dense ginkgo
#

What are you using to host the websocket at localhost:3000?

true lotus
dense ginkgo
#

The plugin doesn't host a websocket, it connects to one.

true lotus
#

Shoud I have an independent server to handle the plugin?

dense ginkgo
#

It's a client.

#

Yes.

true lotus
#

Sorry out messages overlap

#

Shoud I have an independent server to handle the plugin?

dense ginkgo
#

Yes.

true lotus
#

Oh I see

dense ginkgo
#

Do you expect the app to host it's own websocket? What is the use-case here?

true lotus
#

Is there any mencion to that anywhere? I think its so basic i wasnt even worth to mention haha I am embarrassed

true lotus
dense ginkgo
#

It's not explicitly written anywhere. It's implied by the "connect". To connect, you need something to connect to.

true lotus
#

Is there any docs on creating a server with certificates on tauri?

dense ginkgo
#

To my knowledge, there's no plugin for the server side of websockets, only the client. You would have to use a Rust library for it.

#

There might be a better way to do this. Is the need for websockets due to a JS library you're using?

true lotus
#

My app originally uses pusher io and its host online. Now I am trying to create a tauri app from it to run locally with no internet connection so I cant use pusher anymore.

#

Am I on the right path with this implamentation?

dense ginkgo
#

If you're not using pusher's library, then you should be fine without the websockets.

#

Where does the real-time data come from?

#

Since there's no internet connection, I mean.

true lotus
#

from the client. What I do is to update data on multiple browsers

#

In this case my first attempt will be to prompt a new window of the app that will reflect the updated data

dense ginkgo
#

Oh, so the Tauri app is GUI controls for the data on LAN browsers?

#

When you say browser, do you mean Firefox/Chrome/Safari/OtherCommonBrowser?

true lotus
#

specifically i have a dashboard that triggers data and I need to show that data on a different window that will be use on a different screen

dense ginkgo
#

Different screen, same computer, yes?

true lotus
#

Yes in this first attempt

dense ginkgo
#

Then you could use Tauri's events to broadcast data to each window.

true lotus
#

Next I would try to sync different apps on different pcs

#

But I thinks that is a hole different thing

dense ginkgo
#

Synchronising between multiple computers would involve a server of some kind.

true lotus
dense ginkgo
#

Would the server need to have a GUI?

true lotus
#

Not really for what I understand the server would be just to make the websockets work right? Sorry I dont know much about this matter. I am using pusher io and that is as close as I got to websockets

true lotus
dense ginkgo
#

Does the data that you display to the users need to be manipulated or interacted with by anyone before it gets sent?

true lotus
#

Yes all users should see the same data and be able to interact with it

dense ginkgo
#

But nobody is expected to be at the server pushing buttons?

true lotus
#

No. All the activity is on the clients

dense ginkgo
#

Then you don't need a Tauri app for the server, you can just make a WebSocket server in any language you're comfortable working in.

#

The clients would be Tauri apps that connect to the server.

true lotus
#

I see. I think I have a much better understanding of what is going on here.

#

I really appreciate the time you have spent with me today thank you

dense ginkgo
#

No problem. The event API is only compatible with one Tauri app so definitely use the websockets approach.

true lotus
#

I will thank you very much really you have been very helpful

#

Have a great day! It was really nice meeting you