03-20-2019 09:32
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-20-2019 09:32
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hey everyone,
I am having a problem with messaging. Sometimes, seemingly randomly, one or bot peer sockets (of watch and Companion) won't open. Several restarts then sometimes solve the problem. Sometimes I also just have to wait for a while. This is really annoying so I would like to know whether there is a way to manually open the sockets or how to assure that they are properly opened when the app is launched.
Best
Simon

03-20-2019 12:14
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


03-20-2019 12:14
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I think that when you're repeatedly installing, you need to wait for your existing companion to teardown before the latest one can launch. If you add some logging in the main body of code and the onunload, see if that's what's happening.
import { me as companion } from "companion";
console.log("Companion loading");
companion.addEventListener("unload", () => {
console.log("Companion unloading");
});

03-21-2019 01:43
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-21-2019 01:43
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I added the code you sent to my companion. Apparently, it did not load. Not even when I tried it for the first time today. Do you have an idea what I could do?

