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
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
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");
});
Best AnswerI 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?
Best Answer