Opening a file in the Espruino Web IDE

Posted on
  • I'm sure it used to pop up some kind of file selector, but now when I click on the folder icon to try to open a file in the Web IDE (Chrome/Linux), nothing happens. Anyone come across this problem?

  • I have this with firefox on windows. I hit F12 to see the console and got Uncaught ReferenceError: chrome is not defined
    So i guess it's only for chrome :)

    Do you get any errors in your devtools console when you hit the icon (I would guess it is F12 too)?

  • Thanks - I'd recently noticed this too on a new PC, but on the laptop I'm on right now it's fine. What version of Chrome do you have @skm?

    @Micha that may actually be a separate issue. However even if you have it running on Firefox you're unlikely to be able to do much with it as Web Serial/Bluetooth aren't implemented on that

  • using it for the emulator "when not at home" ;)

  • Just fixed the open file issue on Firefox - not live on /ide yet but­E/ will work.

    As far as Chrome goes:

    • v99 Chrome on Linux works fine for me
    • v99 Chromium on Linux and v98 don't work - they fail with a DOMException: Failed to execute 'showOpenFilePicker' on 'Window': Must be handling a user gesture to show a... error (if you turn on 'pause on caught exceptions' in the .

    I'm a bit stumped to be honest - it feels like a web browser bug, because it's pretty obvious from the call stack when you step through it that the function is being called in response to a user gesture.

  • Should be fixed - try now

  • Yes, confirmed working for me now, thanks! For the record, I am using v99.0.4844.51 on Linux.

  • Ahh - so @skm it's possible it was a Linux issue. I wonder whether the OS-provided file chooser fails to run if there's no 'description' for the file format (which ended up being the problem - according to the docs it's supposed to be optional). My Laptop may have worked because it used a different Linux distro.

    It seemed like an odd problem as usually the web browser would give a better, more targeted error when something like that happens

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

Opening a file in the Espruino Web IDE

Posted by Avatar for skm @skm