holochain / launcher-tauri

Desktop launcher to install and use Holochain apps locally
262 stars 21 forks source link

Websocket url not replaced with latest client (type mismatch) #183

Closed mattyg closed 1 year ago

mattyg commented 1 year ago

Describe the bug Not sure if this requires a change in hc_launch or in @holochain/client, or both.

On the latest @holochain/client for 0.2.1, AppAgentWebsocket.connect takes a URL as its first parameter. In previous versions this was a string. To run your happ in hc_launch you would leave the string empty and it injects the websocket url for you.

Now, leaving the URL string empty throw an error. Putting an empty string as the first parameter throws a type error.

My current workaround is this:

    const client = await AppAgentWebsocket.connect(
      // eslint-disable-next-line @typescript-eslint/ban-ts-comment
      //@ts-ignore
      ""
      "my-app"
    );
matthme commented 1 year ago

That's just a breaking change in the js client that's now expecting a URL object there, see this line in the updated scaffolding tool for how to do it now.