[GH-ISSUE #863] Problem to Save on FS #728

Open
opened 2026-02-28 01:26:47 +03:00 by kerem · 25 comments
Owner

Originally created by @leofuscaldi on GitHub (Apr 2, 2019).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/863

Basic Infos

Hardware

WiFimanager Branch/Release:

  • Master
  • Development

Esp8266/Esp32:

  • [x ] ESP8266
  • ESP32

Hardware: ESP-12F,

  • ESP01
  • [x ] ESP12 E/F/S (nodemcu, wemos, feather)
  • Other

ESP Core Version: 2.4.0, staging

  • 2.3.0
  • 2.4.0
  • staging (master/dev)

Description

Cannot save anything on ESP12F. It seems that it fails to mount FS.

mounting FS...
failed to mount FS

Settings in IDE

Module: NodeMcu

Additional libraries:

Sketch is the AutoConnectWithFSParametersAndCustomIP where I`ve changed the IP and gateway.

#include <FS.h>                   //this needs to be first, or it all crashes and burns...

#include <ESP8266WiFi.h>          //https://github.com/esp8266/Arduino

//needed for library
#include <DNSServer.h>
#include <ESP8266WebServer.h>
#include <WiFiManager.h>          //https://github.com/tzapu/WiFiManager

#include <ArduinoJson.h>          //https://github.com/bblanchon/ArduinoJson

//define your default values here, if there are different values in config.json, they are overwritten.
char mqtt_server[40];
char mqtt_port[6] = "1883";
char blynk_token[34] = "YOUR_BLYNK_TOKEN";

//flag for saving data
bool shouldSaveConfig = false;

//callback notifying us of the need to save config
void saveConfigCallback () {
  Serial.println("Should save config");
  shouldSaveConfig = true;
}


void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  Serial.println();

  //clean FS, for testing
  //SPIFFS.format();

  //read configuration from FS json
  Serial.println("mounting FS...");

  if (SPIFFS.begin()) {
    Serial.println("mounted file system");
    if (SPIFFS.exists("/config.json")) {
      //file exists, reading and loading
      Serial.println("reading config file");
      File configFile = SPIFFS.open("/config.json", "r");
      if (configFile) {
        Serial.println("opened config file");
        size_t size = configFile.size();
        // Allocate a buffer to store contents of the file.
        std::unique_ptr<char[]> buf(new char[size]);

        configFile.readBytes(buf.get(), size);
        DynamicJsonBuffer jsonBuffer;
        JsonObject& json = jsonBuffer.parseObject(buf.get());
        json.printTo(Serial);
        if (json.success()) {
          Serial.println("\nparsed json");

          strcpy(mqtt_server, json["mqtt_server"]);
          strcpy(mqtt_port, json["mqtt_port"]);
          strcpy(blynk_token, json["blynk_token"]);

        } else {
          Serial.println("failed to load json config");
        }
        configFile.close();
      }
    }
  } else {
    Serial.println("failed to mount FS");
  }
  //end read



  // The extra parameters to be configured (can be either global or just in the setup)
  // After connecting, parameter.getValue() will get you the configured value
  // id/name placeholder/prompt default length
  WiFiManagerParameter custom_mqtt_server("server", "mqtt server", mqtt_server, 40);
  WiFiManagerParameter custom_mqtt_port("port", "mqtt port", mqtt_port, 6);
  WiFiManagerParameter custom_blynk_token("blynk", "blynk token", blynk_token, 32);

  //WiFiManager
  //Local intialization. Once its business is done, there is no need to keep it around
  WiFiManager wifiManager;

  //set config save notify callback
  wifiManager.setSaveConfigCallback(saveConfigCallback);

  //set static ip
  wifiManager.setSTAStaticIPConfig(IPAddress(192,168,8,88), IPAddress(192,168,8,1), IPAddress(255,255,255,0));
  
  //add all your parameters here
  wifiManager.addParameter(&custom_mqtt_server);
  wifiManager.addParameter(&custom_mqtt_port);
  wifiManager.addParameter(&custom_blynk_token);

  //reset settings - for testing
  //wifiManager.resetSettings();

  //set minimu quality of signal so it ignores AP's under that quality
  //defaults to 8%
  //wifiManager.setMinimumSignalQuality();
  
  //sets timeout until configuration portal gets turned off
  //useful to make it all retry or go to sleep
  //in seconds
  //wifiManager.setTimeout(120);

  //fetches ssid and pass and tries to connect
  //if it does not connect it starts an access point with the specified name
  //here  "AutoConnectAP"
  //and goes into a blocking loop awaiting configuration
  if (!wifiManager.autoConnect("AutoConnectAP", "password")) {
    Serial.println("failed to connect and hit timeout");
    delay(3000);
    //reset and try again, or maybe put it to deep sleep
    ESP.reset();
    delay(5000);
  }

  //if you get here you have connected to the WiFi
  Serial.println("connected...yeey :)");

  //read updated parameters
  strcpy(mqtt_server, custom_mqtt_server.getValue());
  strcpy(mqtt_port, custom_mqtt_port.getValue());
  strcpy(blynk_token, custom_blynk_token.getValue());

  //save the custom parameters to FS
  if (shouldSaveConfig) {
    Serial.println("saving config");
    DynamicJsonBuffer jsonBuffer;
    JsonObject& json = jsonBuffer.createObject();
    json["mqtt_server"] = mqtt_server;
    json["mqtt_port"] = mqtt_port;
    json["blynk_token"] = blynk_token;

    File configFile = SPIFFS.open("/config.json", "w");
    if (!configFile) {
      Serial.println("failed to open config file for writing");
    }

    json.printTo(Serial);
    json.printTo(configFile);
    configFile.close();
    //end save
  }

  Serial.println("local ip");
  Serial.println(WiFi.localIP());

}

void loop() {
  // put your main code here, to run repeatedly:


}

Debug Messages

mounting FS...
failed to mount FS
*WM: [3] allocating params bytes: 20
*WM: [2] Added Parameter: server
*WM: [2] Added Parameter: port
*WM: [2] Added Parameter: blynk
*WM: [1] AutoConnect
*WM: [2] Connecting as wifi client...
*WM: [1] STA static IP: 192.168.8.88
*WM: [2] Custom static IP/GW/Subnet/DNS
*WM: [2] Custom STA IP/GW/Subnet
*WM: [1] STA IP set: 192.168.8.88
*WM: [3] WIFI station disconnect
*WM: [1] No saved credentials, skipping wifi
*WM: [2] Connection result: WL_NO_SSID_AVAIL
*WM: [3] lastconxresult: WL_NO_SSID_AVAIL
*WM: [1] AutoConnect: FAILED
*WM: [2] AccessPoint set password is VALID
*WM: [1] password
*WM: [3] WIFI station disconnect
*WM: [3] WiFi station enable
*WM: [2] Disabling STA
*WM: [2] Enabling AP
*WM: [1] StartAP with SSID: AutoConnectAP
*WM: [1] AP IP address: 192.168.4.1
*WM: [3] setupConfigPortal
*WM: [1] Starting Web Portal
*WM: [3] dns server started with ip: 192.168.4.1
*WM: [2] HTTP server started
*WM: [2] WiFi Scan ASYNC started
*WM: [2] Config Portal Running, blocking, waiting for clients...
*WM: [2] NUM CLIENTS: 0
*WM: [2] WiFi Scan ASYNC completed in 2203 ms
*WM: [2] WiFi Scan ASYNC found: 2
*WM: [2] <- HTTP Root
*WM: [3] -> 192.168.4.1
*WM: [3] lastconxresult: WL_CONNECTED
*WM: [2] Scan is cached 17023 ms ago
*WM: [3] -> connectivitycheck.gstatic.com
*WM: [2] <- Request redirected to captive portal
*WM: [3] -> clients3.google.com
*WM: [2] <- Request redirected to captive portal
*WM: [3] -> portal.fb.com
*WM: [2] <- Request redirected to captive portal
*WM: [2] <- HTTP Root
*WM: [3] -> 192.168.4.1
*WM: [3] lastconxresult: WL_CONNECTED
*WM: [2] Scan is cached 19344 ms ago
*WM: [3] -> connect.rom.miui.com
*WM: [2] <- Request redirected to captive portal
*WM: [2] <- HTTP Root
*WM: [3] -> 192.168.4.1
*WM: [3] lastconxresult: WL_CONNECTED
*WM: [2] WiFi Scan ASYNC started
*WM: [3] -> 192.168.4.1
*WM: [2] WiFi Scan ASYNC completed in 2205 ms
*WM: [2] WiFi Scan ASYNC found: 4
*WM: [2] <- HTTP Wifi
*WM: [2] Scan is cached 1036 ms ago
*WM: [1] 4 networks found
*WM: [2] DUP AP: OTWLAN
*WM: [2] AP: -66 OTWLAN
*WM: [2] AP: -66 OTpublic
*WM: [2] AP: -95 NET_2G034B04
*WM: [3] _staShowStaticFields
*WM: [3] lastconxresult: WL_CONNECTED
*WM: [3] Sent config page
*WM: [3] -> connect.rom.miui.com
*WM: [2] <- Request redirected to captive portal
*WM: [3] -> connect.rom.miui.com
*WM: [2] <- Request redirected to captive portal
*WM: [3] -> connect.rom.miui.com
*WM: [2] <- Request redirected to captive portal
*WM: [2] NUM CLIENTS: 1
*WM: [3] -> connect.rom.miui.com
*WM: [2] <- Request redirected to captive portal
*WM: [2] <- HTTP WiFi save
*WM: [3] Method: POST
*WM: [2] Parameters
*WM: [2] --------------------
*WM: [2] server: Teste.xxx.com
*WM: [2] port: 1883
*WM: [2] blynk: YOUR_BLYNK_TOKEN
*WM: [2] --------------------
*WM: [3] static ip: 192.168.8.88
*WM: [3] static gateway: 192.168.8.1
*WM: [3] static netmask: 255.255.255.0
*WM: [3] Sent wifi save page
*WM: [2] process connect
*WM: [2] Connecting as wifi client...
*WM: [1] STA static IP: 192.168.8.88
*WM: [2] Custom static IP/GW/Subnet/DNS
*WM: [2] Custom STA IP/GW/Subnet
*WM: [1] STA IP set: 192.168.8.88
*WM: [3] WIFI station disconnect
*WM: [1] Connecting to new AP: $ecreta
*WM: [3] Using Password: $3nh4$3gur4
*WM: [3] WiFi station enable
*WM: [3] enableSTA PERSISTENT ON
*WM: [1] connectTimeout not set, ESP waitForConnectResult...
*WM: [2] Connection result: WL_CONNECTED
*WM: [3] lastconxresult: WL_CONNECTED
*WM: [1] Connect to new AP [SUCCESS]
*WM: [1] Got IP Address:
*WM: [1] 192.168.8.88
Should save config
*WM: [2] disconnect configportal
*WM: [2] restoring usermode STA
*WM: [2] wifi status: WL_CONNECTED
*WM: [2] wifi mode: STA
*WM: [1] config portal exiting
connected...yeey :)
saving config
failed to open config file for writing
{"mqtt_server":"Teste.xxx.com","mqtt_port":"1883","blynk_token":"YOUR_BLYNK_TOKEN"}local ip
192.168.8.88
*WM: [3] freeing allocated params!
*WM: [3] unloading

Originally created by @leofuscaldi on GitHub (Apr 2, 2019). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/863 ### Basic Infos #### Hardware **WiFimanager Branch/Release:** - [ ] Master - [x] Development **Esp8266/Esp32:** - [x ] ESP8266 - [ ] ESP32 **Hardware: ESP-12F,** - [ ] ESP01 - [x ] ESP12 E/F/S (**nodemcu**, wemos, feather) - [ ] Other **ESP Core Version: 2.4.0, staging** - [ ] 2.3.0 - [ ] 2.4.0 - [ ] staging (master/dev) ### Description Cannot save anything on ESP12F. It seems that it fails to mount FS. ``` mounting FS... failed to mount FS ``` ### Settings in IDE Module: NodeMcu Additional libraries: ### Sketch is the AutoConnectWithFSParametersAndCustomIP where I`ve changed the IP and gateway. ``` #include <FS.h> //this needs to be first, or it all crashes and burns... #include <ESP8266WiFi.h> //https://github.com/esp8266/Arduino //needed for library #include <DNSServer.h> #include <ESP8266WebServer.h> #include <WiFiManager.h> //https://github.com/tzapu/WiFiManager #include <ArduinoJson.h> //https://github.com/bblanchon/ArduinoJson //define your default values here, if there are different values in config.json, they are overwritten. char mqtt_server[40]; char mqtt_port[6] = "1883"; char blynk_token[34] = "YOUR_BLYNK_TOKEN"; //flag for saving data bool shouldSaveConfig = false; //callback notifying us of the need to save config void saveConfigCallback () { Serial.println("Should save config"); shouldSaveConfig = true; } void setup() { // put your setup code here, to run once: Serial.begin(115200); Serial.println(); //clean FS, for testing //SPIFFS.format(); //read configuration from FS json Serial.println("mounting FS..."); if (SPIFFS.begin()) { Serial.println("mounted file system"); if (SPIFFS.exists("/config.json")) { //file exists, reading and loading Serial.println("reading config file"); File configFile = SPIFFS.open("/config.json", "r"); if (configFile) { Serial.println("opened config file"); size_t size = configFile.size(); // Allocate a buffer to store contents of the file. std::unique_ptr<char[]> buf(new char[size]); configFile.readBytes(buf.get(), size); DynamicJsonBuffer jsonBuffer; JsonObject& json = jsonBuffer.parseObject(buf.get()); json.printTo(Serial); if (json.success()) { Serial.println("\nparsed json"); strcpy(mqtt_server, json["mqtt_server"]); strcpy(mqtt_port, json["mqtt_port"]); strcpy(blynk_token, json["blynk_token"]); } else { Serial.println("failed to load json config"); } configFile.close(); } } } else { Serial.println("failed to mount FS"); } //end read // The extra parameters to be configured (can be either global or just in the setup) // After connecting, parameter.getValue() will get you the configured value // id/name placeholder/prompt default length WiFiManagerParameter custom_mqtt_server("server", "mqtt server", mqtt_server, 40); WiFiManagerParameter custom_mqtt_port("port", "mqtt port", mqtt_port, 6); WiFiManagerParameter custom_blynk_token("blynk", "blynk token", blynk_token, 32); //WiFiManager //Local intialization. Once its business is done, there is no need to keep it around WiFiManager wifiManager; //set config save notify callback wifiManager.setSaveConfigCallback(saveConfigCallback); //set static ip wifiManager.setSTAStaticIPConfig(IPAddress(192,168,8,88), IPAddress(192,168,8,1), IPAddress(255,255,255,0)); //add all your parameters here wifiManager.addParameter(&custom_mqtt_server); wifiManager.addParameter(&custom_mqtt_port); wifiManager.addParameter(&custom_blynk_token); //reset settings - for testing //wifiManager.resetSettings(); //set minimu quality of signal so it ignores AP's under that quality //defaults to 8% //wifiManager.setMinimumSignalQuality(); //sets timeout until configuration portal gets turned off //useful to make it all retry or go to sleep //in seconds //wifiManager.setTimeout(120); //fetches ssid and pass and tries to connect //if it does not connect it starts an access point with the specified name //here "AutoConnectAP" //and goes into a blocking loop awaiting configuration if (!wifiManager.autoConnect("AutoConnectAP", "password")) { Serial.println("failed to connect and hit timeout"); delay(3000); //reset and try again, or maybe put it to deep sleep ESP.reset(); delay(5000); } //if you get here you have connected to the WiFi Serial.println("connected...yeey :)"); //read updated parameters strcpy(mqtt_server, custom_mqtt_server.getValue()); strcpy(mqtt_port, custom_mqtt_port.getValue()); strcpy(blynk_token, custom_blynk_token.getValue()); //save the custom parameters to FS if (shouldSaveConfig) { Serial.println("saving config"); DynamicJsonBuffer jsonBuffer; JsonObject& json = jsonBuffer.createObject(); json["mqtt_server"] = mqtt_server; json["mqtt_port"] = mqtt_port; json["blynk_token"] = blynk_token; File configFile = SPIFFS.open("/config.json", "w"); if (!configFile) { Serial.println("failed to open config file for writing"); } json.printTo(Serial); json.printTo(configFile); configFile.close(); //end save } Serial.println("local ip"); Serial.println(WiFi.localIP()); } void loop() { // put your main code here, to run repeatedly: } ``` ### Debug Messages mounting FS... failed to mount FS *WM: [3] allocating params bytes: 20 *WM: [2] Added Parameter: server *WM: [2] Added Parameter: port *WM: [2] Added Parameter: blynk *WM: [1] AutoConnect *WM: [2] Connecting as wifi client... *WM: [1] STA static IP: 192.168.8.88 *WM: [2] Custom static IP/GW/Subnet/DNS *WM: [2] Custom STA IP/GW/Subnet *WM: [1] STA IP set: 192.168.8.88 *WM: [3] WIFI station disconnect *WM: [1] No saved credentials, skipping wifi *WM: [2] Connection result: WL_NO_SSID_AVAIL *WM: [3] lastconxresult: WL_NO_SSID_AVAIL *WM: [1] AutoConnect: FAILED *WM: [2] AccessPoint set password is VALID *WM: [1] password *WM: [3] WIFI station disconnect *WM: [3] WiFi station enable *WM: [2] Disabling STA *WM: [2] Enabling AP *WM: [1] StartAP with SSID: AutoConnectAP *WM: [1] AP IP address: 192.168.4.1 *WM: [3] setupConfigPortal *WM: [1] Starting Web Portal *WM: [3] dns server started with ip: 192.168.4.1 *WM: [2] HTTP server started *WM: [2] WiFi Scan ASYNC started *WM: [2] Config Portal Running, blocking, waiting for clients... *WM: [2] NUM CLIENTS: 0 *WM: [2] WiFi Scan ASYNC completed in 2203 ms *WM: [2] WiFi Scan ASYNC found: 2 *WM: [2] <- HTTP Root *WM: [3] -> 192.168.4.1 *WM: [3] lastconxresult: WL_CONNECTED *WM: [2] Scan is cached 17023 ms ago *WM: [3] -> connectivitycheck.gstatic.com *WM: [2] <- Request redirected to captive portal *WM: [3] -> clients3.google.com *WM: [2] <- Request redirected to captive portal *WM: [3] -> portal.fb.com *WM: [2] <- Request redirected to captive portal *WM: [2] <- HTTP Root *WM: [3] -> 192.168.4.1 *WM: [3] lastconxresult: WL_CONNECTED *WM: [2] Scan is cached 19344 ms ago *WM: [3] -> connect.rom.miui.com *WM: [2] <- Request redirected to captive portal *WM: [2] <- HTTP Root *WM: [3] -> 192.168.4.1 *WM: [3] lastconxresult: WL_CONNECTED *WM: [2] WiFi Scan ASYNC started *WM: [3] -> 192.168.4.1 *WM: [2] WiFi Scan ASYNC completed in 2205 ms *WM: [2] WiFi Scan ASYNC found: 4 *WM: [2] <- HTTP Wifi *WM: [2] Scan is cached 1036 ms ago *WM: [1] 4 networks found *WM: [2] DUP AP: OTWLAN *WM: [2] AP: -66 OTWLAN *WM: [2] AP: -66 OTpublic *WM: [2] AP: -95 NET_2G034B04 *WM: [3] _staShowStaticFields *WM: [3] lastconxresult: WL_CONNECTED *WM: [3] Sent config page *WM: [3] -> connect.rom.miui.com *WM: [2] <- Request redirected to captive portal *WM: [3] -> connect.rom.miui.com *WM: [2] <- Request redirected to captive portal *WM: [3] -> connect.rom.miui.com *WM: [2] <- Request redirected to captive portal *WM: [2] NUM CLIENTS: 1 *WM: [3] -> connect.rom.miui.com *WM: [2] <- Request redirected to captive portal *WM: [2] <- HTTP WiFi save *WM: [3] Method: POST *WM: [2] Parameters *WM: [2] -------------------- *WM: [2] server: Teste.xxx.com *WM: [2] port: 1883 *WM: [2] blynk: YOUR_BLYNK_TOKEN *WM: [2] -------------------- *WM: [3] static ip: 192.168.8.88 *WM: [3] static gateway: 192.168.8.1 *WM: [3] static netmask: 255.255.255.0 *WM: [3] Sent wifi save page *WM: [2] process connect *WM: [2] Connecting as wifi client... *WM: [1] STA static IP: 192.168.8.88 *WM: [2] Custom static IP/GW/Subnet/DNS *WM: [2] Custom STA IP/GW/Subnet *WM: [1] STA IP set: 192.168.8.88 *WM: [3] WIFI station disconnect *WM: [1] Connecting to new AP: $ecreta *WM: [3] Using Password: $3nh4$3gur4 *WM: [3] WiFi station enable *WM: [3] enableSTA PERSISTENT ON *WM: [1] connectTimeout not set, ESP waitForConnectResult... *WM: [2] Connection result: WL_CONNECTED *WM: [3] lastconxresult: WL_CONNECTED *WM: [1] Connect to new AP [SUCCESS] *WM: [1] Got IP Address: *WM: [1] 192.168.8.88 Should save config *WM: [2] disconnect configportal *WM: [2] restoring usermode STA *WM: [2] wifi status: WL_CONNECTED *WM: [2] wifi mode: STA *WM: [1] config portal exiting connected...yeey :) saving config failed to open config file for writing {"mqtt_server":"Teste.xxx.com","mqtt_port":"1883","blynk_token":"YOUR_BLYNK_TOKEN"}local ip 192.168.8.88 *WM: [3] freeing allocated params! *WM: [3] unloading
Author
Owner

@tablatronix commented on GitHub (Apr 2, 2019):

did you do a full flash erase?

<!-- gh-comment-id:479134320 --> @tablatronix commented on GitHub (Apr 2, 2019): did you do a full flash erase?
Author
Owner

@leofuscaldi commented on GitHub (Apr 2, 2019):

I just found the problem... looking for my core version, I found that it was on 2.5.

I've downgraded it to 2.4 and it worked!

<!-- gh-comment-id:479134845 --> @leofuscaldi commented on GitHub (Apr 2, 2019): I just found the problem... looking for my core version, I found that it was on 2.5. I've downgraded it to 2.4 and it worked!
Author
Owner

@tablatronix commented on GitHub (Apr 2, 2019):

The memory might have changed you may need a full erase when switching versions

<!-- gh-comment-id:479136730 --> @tablatronix commented on GitHub (Apr 2, 2019): The memory might have changed you may need a full erase when switching versions
Author
Owner

@leofuscaldi commented on GitHub (Apr 2, 2019):

I've tried to full erase it, but made no diference. Only when I swiched back to 2.4 it worked.

<!-- gh-comment-id:479137100 --> @leofuscaldi commented on GitHub (Apr 2, 2019): I've tried to full erase it, but made no diference. Only when I swiched back to 2.4 it worked.
Author
Owner

@Albin76 commented on GitHub (Apr 10, 2019):

Hi. Same problem for me and also solved by downgrading esp8266 core from 2.5.0 to 2.4.0 thanks to @leofuscaldi comment! Thanks a lot @leofuscaldi, made my day! Have been troubleshooting for some time now. :)

<!-- gh-comment-id:481657461 --> @Albin76 commented on GitHub (Apr 10, 2019): Hi. Same problem for me and also solved by downgrading esp8266 core from 2.5.0 to 2.4.0 thanks to @leofuscaldi comment! Thanks a lot @leofuscaldi, made my day! Have been troubleshooting for some time now. :)
Author
Owner

@supriyono01 commented on GitHub (May 5, 2019):

Hi, I experienced the same thing. I have downgraded version 8266 from 2.5 to 2.4 but have not been able to solve the problem. Can help me....
After I tried it many times it turned out that it was saved but provided that when I left the portal, it was directly connected to the ap. If it is not directly connected then the parameters that we enter through the portal cannot be saved

<!-- gh-comment-id:489397453 --> @supriyono01 commented on GitHub (May 5, 2019): Hi, I experienced the same thing. I have downgraded version 8266 from 2.5 to 2.4 but have not been able to solve the problem. Can help me.... After I tried it many times it turned out that it was saved but provided that when I left the portal, it was directly connected to the ap. If it is not directly connected then the parameters that we enter through the portal cannot be saved
Author
Owner

@tablatronix commented on GitHub (May 6, 2019):

have you guys tried a basic spiffs example, NOT wm?

<!-- gh-comment-id:489617965 --> @tablatronix commented on GitHub (May 6, 2019): have you guys tried a basic spiffs example, NOT wm?
Author
Owner

@tablatronix commented on GitHub (May 7, 2019):

2.5 release notes say that build flags changed and is a breaking change, are your arduino IDEs up to date, maybe spiffs is now disabled

<!-- gh-comment-id:490076319 --> @tablatronix commented on GitHub (May 7, 2019): 2.5 release notes say that build flags changed and is a breaking change, are your arduino IDEs up to date, maybe spiffs is now disabled
Author
Owner

@supriyono01 commented on GitHub (May 7, 2019):

Ok...thankyou, I will try to update my arduino ide.

Pada tanggal Sel, 7 Mei 2019 20.20, Shawn A notifications@github.com
menulis:

2.5 release notes say that build flags changed and is a breaking change,
are your arduino IDEs up to date, maybe spiffs is now disabled


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/tzapu/WiFiManager/issues/863#issuecomment-490076319,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJPCV5URQRQ337K7F7KKVQDPUF625ANCNFSM4HDCRQTQ
.

<!-- gh-comment-id:490082791 --> @supriyono01 commented on GitHub (May 7, 2019): Ok...thankyou, I will try to update my arduino ide. Pada tanggal Sel, 7 Mei 2019 20.20, Shawn A <notifications@github.com> menulis: > 2.5 release notes say that build flags changed and is a breaking change, > are your arduino IDEs up to date, maybe spiffs is now disabled > > — > You are receiving this because you commented. > Reply to this email directly, view it on GitHub > <https://github.com/tzapu/WiFiManager/issues/863#issuecomment-490076319>, > or mute the thread > <https://github.com/notifications/unsubscribe-auth/AJPCV5URQRQ337K7F7KKVQDPUF625ANCNFSM4HDCRQTQ> > . >
Author
Owner

@DanwithArduino commented on GitHub (Jul 30, 2019):

Having issues with this as well. Downgrading to 2.4.x (all versions) breaks my MQTT/pubsub client as well. So, I can either have functioning FS or functioning MQTT... But I can't figure out what the changes are.
ESP12F, core versions 2.4.x and 2.5.2. WifiManager development branch.

<!-- gh-comment-id:516619709 --> @DanwithArduino commented on GitHub (Jul 30, 2019): Having issues with this as well. Downgrading to 2.4.x (all versions) breaks my MQTT/pubsub client as well. So, I can either have functioning FS or functioning MQTT... But I can't figure out what the changes are. ESP12F, core versions 2.4.x and 2.5.2. WifiManager development branch.
Author
Owner

@tablatronix commented on GitHub (Jul 30, 2019):

Hmm which default arduino examples have you tried ? i will test them

<!-- gh-comment-id:516626577 --> @tablatronix commented on GitHub (Jul 30, 2019): Hmm which default arduino examples have you tried ? i will test them
Author
Owner

@DanwithArduino commented on GitHub (Jul 30, 2019):

Might not be WiFiManager's problem. I just tried https://github.com/bblanchon/ArduinoJson/blob/6.x/examples/JsonConfigFile/JsonConfigFile.ino and am still unable to mount the file system.

<!-- gh-comment-id:516629715 --> @DanwithArduino commented on GitHub (Jul 30, 2019): Might not be WiFiManager's problem. I just tried https://github.com/bblanchon/ArduinoJson/blob/6.x/examples/JsonConfigFile/JsonConfigFile.ino and am still unable to mount the file system.
Author
Owner

@tablatronix commented on GitHub (Jul 30, 2019):

That is for SD cards is it not?

<!-- gh-comment-id:516639796 --> @tablatronix commented on GitHub (Jul 30, 2019): That is for SD cards is it not?
Author
Owner

@DanwithArduino commented on GitHub (Jul 30, 2019):

Found the solution: In the Arduino IDE (or presumably the board manager in VScode but have not verified - should be same functionality) go to tools\Flash Size\choose one.... So far, I am getting positive results for 4M (1M SPIFFS).

<!-- gh-comment-id:516640085 --> @DanwithArduino commented on GitHub (Jul 30, 2019): Found the solution: In the Arduino IDE (or presumably the board manager in VScode but have not verified - should be same functionality) go to tools\Flash Size\choose one.... So far, I am getting positive results for 4M (1M SPIFFS).
Author
Owner

@tablatronix commented on GitHub (Jul 31, 2019):

Yeah that is typically the setting you use for spiffs, unless we are having a memory issue here? Development is surely larger that release, but I made sure it was not that much

<!-- gh-comment-id:516640242 --> @tablatronix commented on GitHub (Jul 31, 2019): Yeah that is typically the setting you use for spiffs, unless we are having a memory issue here? Development is surely larger that release, but I made sure it was not that much
Author
Owner

@DanwithArduino commented on GitHub (Jul 31, 2019):

I had 4M (No Spiffs) before. Still learnding. Thanks for the replies. I think I'm all good now after a few days of head banging.

<!-- gh-comment-id:516642286 --> @DanwithArduino commented on GitHub (Jul 31, 2019): I had `4M (No Spiffs)` before. Still learnding. Thanks for the replies. I think I'm all good now after a few days of head banging.
Author
Owner

@carlesgutierrez commented on GitHub (Sep 10, 2019):

Hello,
I'm not able to write or read using SPIFFS.
I've succesfully checked before that SPIFFS works on a regular example without the wifiManager.
How I can check if It FAILS to mount FS?

My configuration:

  • nodemcu v2 / v3
  • ESP Core Version: 2.4 or 2.5
<!-- gh-comment-id:529936007 --> @carlesgutierrez commented on GitHub (Sep 10, 2019): Hello, I'm not able to write or read using SPIFFS. I've succesfully checked before that SPIFFS works on a regular example without the wifiManager. How I can check if It FAILS to mount FS? My configuration: - nodemcu v2 / v3 - ESP Core Version: 2.4 or 2.5
Author
Owner

@tablatronix commented on GitHub (Sep 10, 2019):

do you have spiffs enabled, I think it is now optional not default.

<!-- gh-comment-id:529969426 --> @tablatronix commented on GitHub (Sep 10, 2019): do you have spiffs enabled, I think it is now optional not default.
Author
Owner

@carlesgutierrez commented on GitHub (Sep 10, 2019):

Hey,
If do you mean by enable: mode to Flash Size to "4M (1M SPIFFS)", yes I did

<!-- gh-comment-id:529979481 --> @carlesgutierrez commented on GitHub (Sep 10, 2019): Hey, If do you mean by enable: **mode to Flash Size** to "4M (1M SPIFFS)", yes I did
Author
Owner

@tablatronix commented on GitHub (Sep 10, 2019):

if (SPIFFS.begin())
should do that.

hmm
Have you tried full erase?

<!-- gh-comment-id:530011780 --> @tablatronix commented on GitHub (Sep 10, 2019): ` if (SPIFFS.begin()) ` should do that. hmm Have you tried full erase?
Author
Owner

@carlesgutierrez commented on GitHub (Sep 10, 2019):

You are absolutelly right. I had forgotten to setup SPIFFS with SPIFFS.begin()
Thanks!!

<!-- gh-comment-id:530015459 --> @carlesgutierrez commented on GitHub (Sep 10, 2019): You are absolutelly right. I had forgotten to setup SPIFFS with **SPIFFS.begin()** Thanks!!
Author
Owner

@tablatronix commented on GitHub (Sep 10, 2019):

might also want to close spiffs after using it

<!-- gh-comment-id:530078422 --> @tablatronix commented on GitHub (Sep 10, 2019): might also want to close spiffs after using it
Author
Owner

@carlesgutierrez commented on GitHub (Sep 10, 2019):

Thanks for the advise @tablatronix , I will.

<!-- gh-comment-id:530110137 --> @carlesgutierrez commented on GitHub (Sep 10, 2019): Thanks for the advise @tablatronix , I will.
Author
Owner

@cunhaeduardo commented on GitHub (Dec 19, 2019):

Hi guys! Today I have the same problem as you and I solved it changing configuration in tool -> flash size -> 4M(1M SPIFFS). Someone posted it but I'm doing it again to be easier to find!

<!-- gh-comment-id:567728179 --> @cunhaeduardo commented on GitHub (Dec 19, 2019): Hi guys! Today I have the same problem as you and I solved it changing configuration in tool -> flash size -> 4M(1M SPIFFS). Someone posted it but I'm doing it again to be easier to find!
Author
Owner

@Zadkiel2 commented on GitHub (Feb 7, 2020):

Hi guys! Please help me with the project I am building now. The project needs codes like this but I had problems dealing with ArduinoJson 6 and I am really new to these kind of things so I really have no idea about it. Hope you guys help me out. Salamat.

<!-- gh-comment-id:583268540 --> @Zadkiel2 commented on GitHub (Feb 7, 2020): Hi guys! Please help me with the project I am building now. The project needs codes like this but I had problems dealing with ArduinoJson 6 and I am really new to these kind of things so I really have no idea about it. Hope you guys help me out. Salamat.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#728
No description provided.