Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By Th3On3Fr33man
#48793 Ok so I was able to get it to work, but I have a couple dilemmas now.

I can't figure out how to get the hostname to work. If you look in the original FSBrowser code, they were able to tie the site to a host at "esp8266fs.local" so that the site was always accessible without having to know the actual IP (which, at least in the original FSBrowser code, changed on me every once in a while).

This needs to be tied down, either to a single IP, or the ability to use a hostname like the original FSBrowser so that it's easily reachable.

The second problem I'm having is simply getting anything to print out on the serial monitor. None of those "os_printf" statements show up on the serial monitor I'm using for the ESP8266, and whatever is printing out on the serial monitor I can't seem to trace (it's not coming from this example code, is it part of one of the libraries?)

Thanks!
User avatar
By Th3On3Fr33man
#48801 Alright so now...I'm not so sure anymore about this.

Once I had other people start connecting, I ran into a swarm of issues.
Image

And the strangest thing happened, where it appears some of the code was missing?
Image
If you look at the red highlighted line in that photo, you can see that in the middle of the removeClass() statement, it stops spelling out the class (which is "deactiveSect") and starts a completely different if statement further down in the code.

And yet here's the same portion of code on the server currently:
Image

You can see it seemingly merged lines 66 and 70.

So while the version of the FSBrowser code that I was using couldn't handle the level of code I was working with, I'm failing to see how I can afford to use this library if this myriad of issues keeps happening.

Help? :cry:
User avatar
By anotherjoe
#48846 I use a flavour of the FSBrowser code sample embedded within my project code and I have to say that what you've described sounds familiar. For the most part it does work fine for me but on occasion I do see an issue where a html file is uploaded, is stored in SPIFFS and it somehow gets corrupted in the process. The problem manifests itself in the way you describe where when that file is later served by the webserver and it looks like it contains garbled / missing / corrupted content resulting in broken render and broken JS in the browser.

When it happens, I immediately attempt to upload the file again via the FSBrowser and more often than not it sorts itself out on the second attempt. For some reason sometimes it takes 3 or 4 goes to get the file stored successfully. On just a couple of occasions over a 6 month period, SPIFFS flash has appeared to get completely corrupted and I've had to perform a SPIFFS format and re-upload the files over serial to straighten things out.

I've not got to the bottom of why this happens and my project code and device is generally well behaved and rock solid stable at runtime with plenty of free heap memory available. So this problem is more an annoyance than a showstopper here.
User avatar
By Me-no-dev
#48851 I used to get those problems as well, but have not really had them in a while. Even uploading has not been braking the files recently (Using Async). As for the name to access the ESP, that is controlled by MDNS
Code: Select allMDNS.begin("myesp");//respond to myesp.local
MDNS.addService("http","tcp",80);//add the web server as advertised service