Skip to content

Issues in JS interpreter/API #2610

Description

@jackmcbrezel

Describe the bug:
While developing an app I discovered a few problems in the JS interpreter API

1. dialog.choice() sporadicly closes on prev/next key press

When sing the choice-dialog it sometimes closes when toggling the different options via the prev/next key (which is bad because you have to use these keys to select your option).

2. storage.write() is failing on binary content

I tried to fetch some binary content via http request (literally a jpg file) and tries to store it to the SD card. The response.body array had the expected length after the http request but the written file was empty.

3. storage.write() uses littleFS as default

When trying to save a file only with the file name specified, the write() method persists the files to the littleFS storage whereas the read() function uses the SD card as declared in the documentation.

4. wifi.connectDialog() should have a blocking option

When trying to show the wifi connection dialog on missing wifi connection, the dialog closes instantly after popping up for some ms. This is not helpful as the user has to select a network first.

5. dialog popups always wait for key press

Despite the documentation, the info/error/warning/success popups always require a key press if the waitForKeyPress option is not declared.

Steps To Reproduce:

Write script and use the described functions.

  • Device used: T-Embed CC1101 Plus

Expected behavior:

As written in the documentation.

Actual behavior:

As described above.

Additional context / logs:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions