Mac Web IDE problems.

Posted on
of 2
/ 2
  • Enjoying our new Espruino board - opens up a world of possibilites for me and the kids - but am having some issues with the Web IDE on my Mac (10.6.8)

    I have no issues using 'screen', that connects lovely, but I'm trying to set the Web IDE up for my kids and the GUI scratch style interface.

    First I downloaded it via Chrome, and could not key anything to the left pane 'terminal', nor push the default LED script up. Tried both the TTY and CU interfaces which appear.

    Tried to flash the firmware via the IDE that also failed - with error referencing not being able to find STM Loader. Same with the advanced flashing option, when I pointed it at a file on your website.

    Managed to flash the device using Python thinking the firmware may be too old, but still the same issues in the IDE.

    Uninstalled the IDE and then cloned your Github repo but unfortunately the issues persist.

    Can anyone help me on this one? If I can offer up any more info about my system please let me know.

  • Argh, sorry it's not working...

    Only thing I can think of right now is that maybe you have an old version of Chrome? Can you check in settings and see what it is?

  • Hi Gordon, really appreciate you taking the time out to reply to my post.

    I don't think it's Chrome, I'm running what my Mac tells me is the latest (v36.0.1985.125).

    We have Screen/Terminal access working fine - so we can work with the board - but the IDE would be the icing on the cake.

  • Hmm. My wife has 10.6.8 on her laptop iirc so I'll give this a go next week.

    As you've installed from git you should be able to right click, inspect element, and swap to the console. It might show you if there are some errors?

  • Experienced the same... but for some unknown reasons/actions/restarts/clicking all over the place/hitting esacpe, it came alive and works just fine ever since (I'm using a 2009 MacBook Pro) with OSX 10.9.3

  • This is the Dev tools console output (attached console.txt). I went through the connection process, trying to type in the terminal pane, and then trying to push the default script. There quite a few errors and one warning.

    This line represents the bulk of the errors:

    Error: Invalid value for attribute transform="translate(Infinity,7.0625)"

    Edit: Additionally I get can an error which relates to terminal.js when clicking the clear screen button

    Uncaught TypeError: Cannot read property '0' of undefined terminal.js:230
    updateTerminal terminal.js:230
    clearTerminal terminal.js:160 terminal.js:44
    jQuery.event.dispatch jquery-1.11.0.js:4624
    elemData.handle jquery-1.11.0.js:4292

    1 Attachment

  • Hi Ollie,

    Thanks for checking that. The transform errors are from Blockly (the graphical code editor) and you can basically ignore those.

    The other error is something I believe I fixed pretty recently... It's not in the Web Store app, but it's in GitHub. Could you try git pull on the Web IDE repo and see if the file terminal.js changes?

  • Just pulled, 1 change, but nothing to terminal.js

    blockly/blockly.html | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

  • Ok, that's odd. The reason I thought you might have the old version is that the error:

    Uncaught TypeError: Cannot read property '0' of undefined terminal.js:230

    Actually occurs here:

        if (elements[termCursorY]!==undefined);
          elements[termCursorY][0].scrollIntoView(­); // <-------- occurs here

    so it seems like it's impossible... It's explicitly checking that it's not undefined before accessing.

    I've just noticed that on the git version, clear screen is broken in another way though - I have just fixed that.

    I'll check on the older mac now and see if I have any problems. Maybe to narrow it down, could you try:­l/diginow-serial-terminal/kfmecbejcnepbf­dcdbbhfcjmdmmcmoah?hl=en

    That's another terminal app for Chrome - so we could see if the problem is the Espruino Web App, or something in Chrome itself. If @allObjects got his to work eventually, it might not be an app thing after all.

  • Just tried on a 10.6.8 mac (including using a different Chrome-based terminal app) and it doesn't work for me either. I tried Chrome Canary (the beta version) and that doesn't work on tty and now won't connect on cu.

    It definitely did work at some point in the past though, and on Chrome and a Mac with 10.9.3 it seems to work fine.

    I'm not sure what to suggest at the moment :( I'd be interested to hear whether this is common amongst all Macs. I guess it might be that I end up making a version of the Web IDE that'll work as an app (without needing Chrome).

  • Yes, I thought that about the undefined check when I read it. I've pulled the latest (which did update the terminal.js file), and got the other terminal app you linked to. I should probably test with the Espruino connected - I don't have it at the moment - so I'll revert later this afternoon.

  • Well if you can replicate at least I'm not going mad. I think we shelve it for now. We got the IDE going on a Linux Netnook, so we're not missing out. At least it's on you Radar. Would you like me to add something to the issue tracker on Git?

    Really appreciate the time you spent on this with me.



  • No problem - sorry it doesn't work for you! It'd be great if you could stick something in the issue tracker - and maybe link to this thread. I'll try and submit it to the Chrome dev team.

    The Web App seemed like a good idea at the start, but over the last year I've hit a few issues where Chrome has just auto-updated and changed/broken something that I've had to work around. I guess that's the problem with depending on relatively new technology.

  • I use the web IDE on a Mac 10.9.4 and it works perfectly.
    And about the web app, please don't kill it, it's one of the key selling points IMO: the Espruino is a zero-friction board: get it, plug it, and start coding on it. No downloads or anything.

    Right now I don't have a lot of free time to put into it, but I'll do my best to contribute to the web IDE project to keep it going if needed! :)


  • @gnz, thanks! I definitely won't be killing the Web IDE!

    However because the IDE is basically all HTML and JavaScript, it should be possible to port it to other platforms or to make it so it isn't dependent on Chrome... For instance I'd love to see an Android port of it :)

  • Was a cure for this found?

    On my mac pro running 10.6.8 I can connect to Pico using putty without issue but the webIDE and another serial terminal running as chrome app can not.

  • Do you have another computer that you could try updating the Pico's firmware to 1v80 on? There were a few changes in that which could have made it behave a bit better on Macs.

    If you don't have another computer handy then you could follow the instructions for DFU update under the Advanced Reflashing heading on this page. It's just a bit more involved.

  • I have done both with no improvement. Running XP in a VM allows me to access it for now. I may try creating a wireless system for it using a couple of wixels.

  • Having the same issues accessing the terminal in Web IDE.
    The interface responds to everything except the terminal and 'Projects' button/icon.

    Keys typed into the terminal do not show (tried hitting 'Enter' key to see if interface would respond). No luck. Console produces no errors. Only one warning.

    var  on = false;
    setInterval(function() {
      on = !on;
    }, 500);
    The last 100 lines of log messages made by the Web IDE. This is only useful when trying to debug potential problems with the IDE or Espruino board itself.
    We have chrome.serial - not using 'serialport' module
    serial_audio: Audio Sample rate : 44100
    serial_audio: Audio Serial Baud 9600 Bit time 4.59375
    GET = {"AUTO_SAVE_CODE":true,"BAUD_RATE":"1152­00","BLOCKLY_EXTENSIONS":"|bluetooth|rob­ot|","BLOCKLY_LANGUAGE":"en","BLOCKLY_TO­_JS":false,"BOARD_JSON_URL":"http://www.­","CODE":"var  on = false;\nsetInterval(function() {\n  on = !on;\n  LED1.write(on);\n}, 500);","COMPILATION":true,"COMPILATION_U­RL":"","ENA­BLE_Testing":false,"ENV_ON_CONNECT":true­,"FONT_SIZE":12,"MINIFICATION_DeadCode":­true,"MINIFICATION_LEVEL":"","MINIFICATI­ON_Literal":true,"MINIFICATION_Mangle":t­rue,"MINIFICATION_Unreachable":true,"MIN­IFICATION_Unused":true,"MODULE_AS_FUNCTI­ON":false,"MODULE_EXTENSIONS":".min.js|.­js","MODULE_MINIFICATION_LEVEL":"ESPRIMA­","MODULE_PROXY_ENABLED":false,"MODULE_P­ROXY_PORT":"","MODULE_PROXY_URL":"","MOD­ULE_URL":"­es","NPM_MODULES":true,"OFFLINE_DATA":""­,"OFFLINE_DATA_DOWNLOAD":"","OFFLINE_DAT­A_UPLOAD":"","OFFLINE_ENABLED":false,"RE­SET_BEFORE_SEND":true,"SAVE_ON_SEND":0,"­SERIAL_AUDIO":"0","SERIAL_TCPIP":"","SER­IAL_THROTTLE_SEND":false,"SET_TIME_ON_WR­ITE":false,"SHOW_CODE_LINK_ICON":false,"­SHOW_WEBCAM_ICON":0,"STORE_LINE_NUMBERS"­:true,"Sound_Error":"","Sound_Info":"","­Sound_Success":"","Sound_Warning":"","Sp­eak_Error":false,"Speak_Info":false,"Spe­ak_Success":false,"Speak_Warning":false,­"UI_MODE":"Normal","WEB_BLUETOOTH":true,­"projectEntry":"B8854CEDD3294E435402EC6A­1CADA34D:espruino"}
    Initialising SettingsConsole
    Initialising Utils
    Initialising Config
    Initialising Notifications
    Initialising Status
    Initialising App
    Initialising File
    Initialising Code
    Initialising Serial
      - Initialising Serial Chrome Serial
      - Initialising Serial Chrome Socket
      - Initialising Serial Audio
      - Initialising Serial Web Bluetooth
    Initialising Terminal
    Initialising CodeWriter
    Initialising Modules
    Initialising Env
    Initialising Flasher
    Initialising EditorBlockly
    Initialising EditorJavaScript
    Initialising Send
    Initialising MenuPortSelector
    Initialising MenuSettings
    Initialising MenuFlasher
    Initialising SettingsAbout
    Initialising SettingsFlasher
    Initialising BoardJSON
    Initialising VersionChecker
    Initialising Compiler
    Initialising Assembler
    Initialising GetGitHub
    Initialising NPMModules
    Initialising SetTime
    Initialising Unicode
    Initialising Minify
    Initialising SaveOnSend
    Initialising Tutorial
    Initialising Webcam
    Initialising FontSize
    Initialising UiMode
    Initialising URLHandler
    Initialising CodeLink
    Initialising Project
    Initialising Testing
    Initialising Notification_Sound
    Initialising Tern
    Initialising Debugger
    Initialising Tour
    Initialising SettingsProfile
    Initialising HelpLinks
    Initialising Offline
    Loaded code from storage.
    GET = 0 bytes
    >>> Connecting...
    Set Slow Write = true
    Unable to open device (connectionInfo=undefined)
    ERROR: Unable to open device (connectionInfo=undefined)
    ERROR: [notify_error] Connection Failed.
    >>> Connection Failed.
    >>> Connecting...
    Set Slow Write = true
    Unable to open device (connectionInfo=undefined)
    ERROR: Unable to open device (connectionInfo=undefined)
    ERROR: [notify_error] Connection Failed.
    >>> Connection Failed.
    >>> Connecting...
    Set Slow Write = true
    [object Object]
    Connected [object Object]
    Found a prompt... great!
    >>> Sending...
    ---> "\u0010console.log(\"<\",\"<<\",JSON.str­ingify(process.env),\">>\",\">\")\n"
    >>> Sent
    WARNING: No result found - just got ""
    Device found (connectionId=5)
    [success] Connected to port /dev/tty.SLAB_USBtoUART
    >>> Connected to port /dev/tty.SLAB_USBtoUART
    Found a prompt... great!
    >>> Sending...
    ---> "\u0010reset();\n\u0010var  on = false;\n\u0010setInterval(function() {\u001b\n  on = !on;\u001b\n  LED1.write(on);\u001b\n}, 500);\n\n"
    Splitting at "reset();\n", delay 250
    >>> Sent
  • @user81977,

    I do not know what happened here. Can understand the frustration...

  • @user81977,

    Yes, things can be entered in the console (left side). Espruino will interpret as soon as a complete JavaScript expression is entered.

    The piece of code as some how hinted in the log - blink - is meant to be entered in the editor (right pane) and uploaded from there.

    If you did so, I wonder if the USB connection was steady while things were going on... I assume you are on an Espruino board.

    It's really weird what shows in the log... like Espruino is spilling its gut... Could you trie to start over?

    I using all kinds of Macs, even 8+ year old models and they do all just fine... So, do please not give up yet...

  • what board are you trying to connect to? looks like it's not an official Espruino board? (or if it is, you might be connecting to the wrong port).

    If it's an ESP8266/32 which seems likely, have you changed the baud rate to match? Either way - please ask on the section of the forum specifically for other boards - most likely they'll be able to help out much better.

  • Thanks Gordon. I've been dipping my toe into the deep end as far as micro controllers go. Bought a NodeMCU ESP8266 on a whim. Tried my hand at Lua got things to work, but frankly I just don't like the syntax. So, I've been on a quest to get JS on it. Thank you for allowing us even smidgen of hope to use Espruino on third-party boards. <3

    From the looks of the log I had assumed it wasn't a problem with the connected board but rather a problem with the dialog between the WebIDE and OSX. I've been searching all over and this is the only thread I could find that talking about the problem with any detail. I'll jump to the other forum to ask there.

    You may be correct that it's simply an issue with the connection to the board itself. I've since tried another route (re-flashing espruino esp8266 "4mb" with Flasher.js and thingssdk).

    With that in mind, thingssdk and using the tutorial found on screen /dev/cu.SLAB_USBtoUART 115200 both produce this error:

    espruino:  Connecting to '/dev/tty.SLAB_USBtoUART'
    espruino:  No result found - just got ""
    espruino:  Connected

    As well as the WebIDE error I posted earlier: WARNING: No result found - just got ""

    Thanks for the help!

  • "I've been searching all over"

    lol, I must've had tunnel visioned search terms last night.
    Today... the search terms have rendered the internet's bounty. Again, Thanks for the help!

  • No problem! Do you have the link to the forum post that fixed your problem? It might help someone else if they find this thread the same way you did :)

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

Mac Web IDE problems.

Posted by Avatar for Ollie @Ollie