An archive of community.esquilo.io as of Saturday January 26, 2019.

Odd file saving?

steveb48

Ok this is a weird one.
I have a nest registered board and I'm connected to the IDE via the local URL. I have an SD card installed and I have a HTML, a CSS, and nut in the directory sd/lib/demos/pool/.

If I edit the CSS file, save it, close it and then reopen it, my changes are gone. Same with the HTML file. If I edit the nut, changes are saved as expected.

Wait it get's stranger.
If I go back to nest and open the IDE via the cloud link, my changes are there. Going back to local they are gone again.

Any clues?

thanks,
Steve

Scott_Shumate

It sounds like your web browser is caching the CSS and HTML files. Esquilo should be returning a MIME header of Cache-control:no-cache to tell the browser not to cache the files. What browser and OS are you using?

steveb48

Hi Scott,

Safari on OS X.

Steve

patrick

Thanks for reporting this Steve. I generally do most of my testing on Chrome. I'll switch over to Safari and see if I can reproduce it.

steveb48

Thanks Patrick. Just to be clear, in all cases, I'm opening the CSS and HTML files in the IDE, not displaying the HTML in the browser. I'm not seeing the changes in the file.

Steve

steveb48

Same problem using Chrome.
This seemed to happen after I registered it with nest. Is there a way to unregister?

Steve

patrick

Hi Steve. I can unregister you manually, but I'd be surprised if that was the problem. May we try a few other things first, please?

What type of router are you connected with?

Are your computer and the Esquilo connected to the exact same WiFi access point?

HTTP GETs are used to load files into the editor and POSTs are used to save them. I think something is getting borked in that path. Are you comfortable bringing up the Chrome debugger and looking at the network traffic? If so, please bring them up and do a file load, edit, save and reload and see if you get any errors there. The debugger can be brought up from the three vertical bars menu in the upper right, item 'More tools...' -> 'Developer Tools', Network tab.

Here's what a save looks like:

steveb48

Sure we can try some things.
My router and access point is an Apple Time Capsule.
Yes the Esquire and Mac are both connected to the same access point (Time Capsule)

I'll have a look at the debugger when I get home.

thanks,
Steve

steveb48

Hi Patrick,

I started logging, opened pool.css, made a change, saved the file and then stopped logging. It looks like the file came from cache. Let me know if I can provide more info.

The cool news is my board is now talking to my pool controller!

thanks,
Steve

patrick

OOOOOh. That makes more sense. When it goes through the cloud proxy, you get a cached version. I will fix that.

Please re-test with a local connection to the Esquilo. I believe that will work (although I think that's the path you initially had problems on).

And by the way, congrats on the pool control. Please share the project here if / when you are ready and willing.

steveb48

Hi Patrick,

Although the sample I sent was a cloud connection, I believe the same happened with a local (via manager link). I'll verify that tonight and send another screenshot.

Thanks for your help,
Steve

steveb48

With a local link from Nest, I opened pool.css, made a change, saved the file, closed the file and then opened it again. My change was gone. The screenshot contains the second open which is from cache.

Please let me know if you need more info.
Steve

patrick

Thanks Steve. I think you found a bug. I can see in your Response Headers (bottom pane) that the Cache-Control isn't set to 'no-cache'. I did some experimenting and it seems we aren't setting this (or it's getting changed on us) for CSS, HTML, and JS files.

As a work-around, you can leave the dev tools pane up and enable "Disable cache" with checkbox at the top. Note the pane must be up for your browser to honor this, so you'll need to leave it up while using the IDE (at least while editing CSS, HTML, and JS).

Sorry about that. Most of my work is done with that pane up and cache disabled. I need to test more in the standard path. We'll work on a fix.

steveb48

Hey Patrick,

Just got back to this and disabling the cache got me past this issue.
I do have another one that seems to be Safari specific but I'll start a new thread for that.

Steve

patrick

Thanks again for reporting the bug. We have a fix in that will go out in the next EOS release in a couple of weeks.