Missing Characters and Opaque Error Message

Posted on
  • The bluetooth serial port appears to miss characters. An example screenshot is attached. The specific missing characters in the 'Espruino' header change each time, but the error it gives is the same every time.

    The following has been tried after searching on the forums for a bit:

    • Resetting the board before sending code
    • Power cycling board and reconnecting
    • Turning on and off throttling in settings.

    It doesn't help that the error message doesn't make any sense. I'm using several local modules in the code, and line 7 in all of them is taken up by a comment containing information about the file (author, purpose, etc...). So the error doesn't specify a module, nor a line with any code on it.

    The class mentioned in the error should say 'Electrodes' and 'ElectrodeController()'.

    I'm using the native Windows IDE on Windows 10.

    Having guessed at which file and line the error was in, the 'ReferenceError' has been fixed (and it wasn't on line 7, 17, 27, or 7x either). Is this kind of behaviour normal? Does the software report where an error was on its minified code instead of the code as written?

    1 Attachment

    • 2021-11-05 12_38_34-Espruino Web IDE.png
  • What device are you uploading to?

    I remember this being a problem on early Native IDEs when used with new Espruino firmwares, but I thought the most recent one had fixed this.

    Is there any chance you could just use Chrome/Edge and espruino.com/ide? Should work fine on Windows 10 and it may solve all your communication problems.

    Does the software report where an error was on its minified code instead of the code as written?

    If you upload minified code then that's all Espruino has to go on, so it'll report errors in that. Usually it'll be normal though

  • @user135646, with resources so sparse that even minimal debug info is a resource issue, exact (error) location detection / referencing is a challenge. With JS in browser (nodejs) world we (can) have separate map files that help to figure where things go belly up. Many things in Espruino are the way they are because of intentionally accepted resource constraints.

    Last but not least for that reason I use cross build techniques / build my own cross development environment where I have plenty of resources and tool support to 'get my (code) ducks in a row', and then move the pieces into the Espruino context. If I can do that using the modules folder the better and easier is the transition: develop emulating in cross environment, upload from same resources location ont Espruino board without any transmission in between.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

Missing Characters and Opaque Error Message

Posted by Avatar for user135646 @user135646