Chrome (and other browsers) Session timeout IDE BUG, PLEASE FIX ASAP!

So what happens to me and I’ve been able to reproduce this across multiple browsers and multiple computers (all windows based) is that you will be working in the IDE and thinking it is saving and then the simulator will “fail” and you need to reload the page to jumpstart the simulator. Reloading the page, bam, what you thought was saving is lost.

No warnings, nothing. The session was lost at some point and no one bothered to check on save if the session was valid or renew the session.

Seriously annoying bug that needs to be fixed for any serious development to occur within the IDE.

The easiest way to force the issue is to use something like SmartTiles on another account or via their “SmartInstall” feature that crosses the session up.

If you log into a smartTiles session for a smartapp and try to use the IDE at the same time, the IDE will log out everytime.

However, this isn’t the only culprit. I suspect that the IDE code uses a 20 minute cookie / session timeout that isn’t getting renewed on save or anything checking in the background.

A simple fix would be a javascript setInterval to check if the session is about to expire and ask the user if they want to continue or let it time out. Letting the session timeout in the background is horrible when the user is actually using the system!

Please, for the love of the community, fix this bug ASAP. @ben, @april, @bflorian (tagging you all since it was mentioned on the last call with Bob to try to get this to be fixed as a priority)

I’ve opened tickets with support over this and the response is, we are too busy with hub v2 to fix this. I think this needs to be a priority to keep the community going and help develop smartapps and devicetypes.

This bug has existed for over a year as first reported here:

4 Likes

I reported this to support as well. There is a not very good way to protect yourself: Whenever you save, publish right away, even if you aren’t ready to. If the publish fails (you can tell by the lack of complete notice of publication in green at the top of the screen), then you still have your modified source code there, and you can copy it, login to the IDE, and then paste the code back in.

1 Like

It often seems to be tied to using an oauth enabled app (such as smarttiles) and the IDE at the same time on the same computer

I’ve noticed that too. If I try to save/publish and there is no text in the green, I can pretty much guarantee I’ll be logged out and it didn’t save

When I was building/testing my own endpoint, my solution was to open that in a private/incognito window and then I didn’t seem to get kicked out of the IDE

1 Like

I’ve just keep the IDE open on 2 different tabs. One tab for the code i’m actively working on and the other tab on live logging. When i notice that my code has failed to publish i switch to my live logging page, refresh, sign back in. Then i switch back to my coding page and save and publish. It has worked for me every time. I know its not a fix, but its how i work around it.

1 Like

Cloud9 is your friend, my friends.

Free online IDE with infinite rollback and GitHub integration. Copy / paste (to SmartThings) is a bother though for lots of small edits.

Or your favorite native IDE of your choice.

I do the same thing.

This is the #2 complaint I deal with most often.

When developing, I have IDE open in Chrome and web apps in Firefox so that different sessions won’t terminate each other.

1 Like

The timeout is ludicrously short, considering that the mobile App (much more vulnerable, since you can lose your phone or have it stolen) never times out!

Please extend the working session in the IDE – configurable is always best, for those of us who can choose to be paranoid.

My mistake. A fix should be coming with our next release. Sorry about that.

2 Likes

Super appreciate… thanks!

The timeout actually seems to be “random” in length for me, but perhaps I’m just not keeping track of time as I’m coding. Of course, thankfully you’ve made this less critical with the local save buffer…!