Would you please point to the code that calls function connectDevice() as I only find one instance in that snippet.
'Whenever it connects to the Puck it follow ups with an error'
Most likely as the web page isn't maintaining it's reference to the callback function supplied and the click event itself. Knowing your experience level debugging the event model within web pages along the amount of experience with Javascript using the Puck would assist us as I see your profile indicates a recent member to the forums. Debugging this may need several intermediate steps, adding/building internal content until success is achieved. Be patient as this may take some time.
'I've tried the suggested fix with little success'
While we applaud your enthusiasm with the attempts so far, it would really help us to understand where the hold up is with the extremely simple 'Try Me' click examples provided in detail within the link in #2 post, especially the link Gordon supplied in #3 post.
Try each and please report back where progress ceases. That should provide the insight needed to embed the snippets for your project.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Tue 2020.04.21
Would you please point to the code that calls function connectDevice() as I only find one instance in that snippet.
Most likely as the web page isn't maintaining it's reference to the callback function supplied and the click event itself. Knowing your experience level debugging the event model within web pages along the amount of experience with Javascript using the Puck would assist us as I see your profile indicates a recent member to the forums. Debugging this may need several intermediate steps, adding/building internal content until success is achieved. Be patient as this may take some time.
While we applaud your enthusiasm with the attempts so far, it would really help us to understand where the hold up is with the extremely simple 'Try Me' click examples provided in detail within the link in #2 post, especially the link Gordon supplied in #3 post.
Try each and please report back where progress ceases. That should provide the insight needed to embed the snippets for your project.