Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: E (1099) SPIFFS: mount failed, -10025 #175

Closed
coolduke666 opened this issue Oct 18, 2021 · 20 comments
Closed

ERROR: E (1099) SPIFFS: mount failed, -10025 #175

coolduke666 opened this issue Oct 18, 2021 · 20 comments
Labels
duplicate This issue or pull request already exists

Comments

@coolduke666
Copy link

using the latest beta 4.x - setting up all according to the documentation - flashed with arduino without any issue... (double checked the partition theme and PSRAM setting... the but doesnt startup:

11:37:04.987 -> ====
11:37:04.987 -> esp32-cam-webserver: ESP32 camera server
11:37:04.987 -> Code Built: Oct 18 2021 @ 11:31:30
11:37:04.987 -> Base Release: 4.0.beta2
11:37:05.174 -> Camera init succeeded
11:37:05.174 -> OV2640 camera module detected
11:37:05.221 -> E (1099) SPIFFS: mount failed, -10025
11:37:06.163 -> ets Jun 8 2016 00:22:57
11:37:06.163 ->
11:37:06.163 -> rst:0x8 (TG1WDT_SYS_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
11:37:06.210 -> configsip: 0, SPIWP:0xee
11:37:06.210 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
11:37:06.210 -> mode:DIO, clock div:1
11:37:06.210 -> load:0x3fff0030,len:1240
11:37:06.210 -> load:0x40078000,len:13012
11:37:06.210 -> load:0x40080400,len:3648
11:37:06.210 -> entry 0x400805f8

any help appreciated :)
thx

@coolduke666
Copy link
Author

using esptool with erase_flash did the trick - but on the next boot up it got:

Camera unavailable due to initialisation errors.

and after the next reset I was stuck with the same error:

ERROR: E (1099) SPIFFS: mount failed, -10025

faulty module?

@coolduke666
Copy link
Author

coolduke666 commented Oct 18, 2021

tried with another ai-thinker module - exactly same problem. default webserver from ESP32 library works without any issues.

@Dr-InSide
Copy link

Dr-InSide commented Oct 27, 2021

E (1099) SPIFFS: mount failed, -10025

I have this problem with an alternative camera module from China. Apparently the init of the camera takes a little longer and then there are problems mounting the file system. I solved the problem by adding a "delay(1000);" before starting the file system. You can also try shorter delays. For me it always worked with 1000ms.

delay(1000);  // Prevents mount problems with some camera modules.

if (filesystem) {
    filesystemStart();
    loadPrefs(SPIFFS);
} else {
    Serial.println("No Internal Filesystem, cannot save preferences");
}

@founfabug
Copy link

Another solution of sorts. I can confirm that timing is the issue with respect to 4.0.beta2 the execution of the format function in filesystemStart() in storage.cpp is not effective with my board. A Serial.println and delay of 250 just prior to :
Serial.println("If it happens repeatedly check if a SPIFFS partition is present for your board?");
was sufficient to allow the format to complete with success. After this, the delay was not needed.

Saving and Loading of preferences works, and the webcam software is a joy compared to the espressif demo, thank you.

Thinking about why this should happen, as there is already a delay of 1000 in this function, I suspect the flashLED(100) instruction may be involved?

@coolduke666
Copy link
Author

Nice. Will there be a bugfix in the next beta? Release date? Thx

@easytarget
Copy link
Owner

Interesting.. I'll look at the timings and see what can be done. Thanks for the reports guys!

@skorokithakis
Copy link

I keep having this issue, regardless of the workarounds in the thread. I have what appears to be an AI-thinker module, but who really knows? Currently the code is unusable for me, though :(

@Aquillum
Copy link

Aquillum commented Jan 11, 2022

I also have this issue, no matter if I put delay(1000); as @Dr-InSide mentioned or delay(2000);
Default Webcam-Example Sketch runs fine

esp32-cam-webserver: HARRY ESP32 CAM 060122
Code Built: Jan 11 2022 @ 10:33:23
Base Release: 4.0.beta3
Camera init succeeded
OV2640 camera module detected
E (3103) SPIFFS: mount failed, -10025
ets Jun  8 2016 00:22:57

rst:0x8 (TG1WDT_SYS_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1324
ho 0 tail 12 room 4
load:0x40078000,len:13508
load:0x40080400,len:3604
entry 0x400805f0

====
esp32-cam-webserver: HARRY ESP32 CAM 060122
Code Built: Jan 11 2022 @ 10:33:23
Base Release: 4.0.beta3
Camera init succeeded
OV2640 camera module detected
E (3103) SPIFFS: mount failed, -10025

@founfabug Is this correct ?

void filesystemStart(){
  while ( !SPIFFS.begin(FORMAT_SPIFFS_IF_FAILED) ) {
    // if we sit in this loop something is wrong; 
    // if no existing spiffs partition exists one should be automagically created.
    Serial.println("SPIFFS Mount failed, this can happen on first-run initialisation.");
    Serial.println("workaround");
    delay(250);
    Serial.println("If it happens repeatedly check if a SPIFFS partition is present for your board?");
    for (int i=0; i<10; i++) {
      flashLED(100); // Show SPIFFS failure
      delay(100);
    }
    delay(1000);
    Serial.println("Retrying..");
  }
  Serial.println("Internal filesystem contents");
  listDir(SPIFFS, "/", 0);
}

@Aquillum
Copy link

Aquillum commented Jan 11, 2022

Update:
I flashed the SPIFFS_Test.ino from Eample-Library. Test result OK, takes a while !
Then flashed esp32-cam-webserver with same settings as before --> now it starts !

esp32-cam-webserver: HARRY ESP32 CAM 060122
Code Built: Jan 11 2022 @ 22:14:25
Base Release: 4.0.beta3
Camera init succeeded
OV2640 camera module detected
Internal filesystem contents
Listing SPIFFS directory: /
Preference file /esp32cam-preferences.json not found; using system defaults.
Lamp: 0%, pwm = 0
Starting WiFi

Please test this procedure if you have problems with SPIFFS mount error.

Update:
The module works but as soon as i hit Save i get a Boot Loop:

====
esp32-cam-webserver: HARRY ESP32 CAM 060122
Code Built: Jan 11 2022 @ 23:06:41
Base Release: 4.0.beta3
Camera init succeeded
OV2640 camera module detected
ets Jun  8 2016 00:22:57

rst:0x8 (TG1WDT_SYS_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1324
ho 0 tail 12 room 4
load:0x40078000,len:13508
load:0x40080400,len:3604
entry 0x400805f0

====

This can only be resolved with the SPIFFS_Test.ino procedure. A new flash withou that brings again the SPIFFS mount error....

@remy33
Copy link

remy33 commented Jan 14, 2022

The working "solution" I ended up with is to downgrade back to esp32 V1.06.
Keep in mind it won't work with alpha3, sadly.
Edit: I have checked it up on the working board I updated it to alpha3 and it stopped working. And another 2 new boards and one integrated USB board.

I'm not sure what has added and been used between V1.06 and V2.0.2 ( except auth ) but it seems to cause the breakage.

@pbenaim
Copy link

pbenaim commented Jan 16, 2022

Update: I flashed the SPIFFS_Test.ino from Eample-Library. Test result OK, takes a while ! Then flashed esp32-cam-webserver with same settings as before --> now it starts !

esp32-cam-webserver: HARRY ESP32 CAM 060122
Code Built: Jan 11 2022 @ 22:14:25
Base Release: 4.0.beta3
Camera init succeeded
OV2640 camera module detected
Internal filesystem contents
Listing SPIFFS directory: /
Preference file /esp32cam-preferences.json not found; using system defaults.
Lamp: 0%, pwm = 0
Starting WiFi

Please test this procedure if you have problems with SPIFFS mount error.

Update: The module works but as soon as i hit Save i get a Boot Loop:

====
esp32-cam-webserver: HARRY ESP32 CAM 060122
Code Built: Jan 11 2022 @ 23:06:41
Base Release: 4.0.beta3
Camera init succeeded
OV2640 camera module detected
ets Jun  8 2016 00:22:57

rst:0x8 (TG1WDT_SYS_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1324
ho 0 tail 12 room 4
load:0x40078000,len:13508
load:0x40080400,len:3604
entry 0x400805f0

====

This can only be resolved with the SPIFFS_Test.ino procedure. A new flash withou that brings again the SPIFFS mount error....

Work after format the SPIFFS ;-)

bool formatted = SPIFFS.format();

if(formatted){
Serial.println("\n\nSuccess formatting");
}else{
Serial.println("\n\nError formatting");
}

@Aquillum
Copy link

Work after format the SPIFFS ;-)

bool formatted = SPIFFS.format();

if(formatted){
Serial.println("\n\nSuccess formatting");
}else{
Serial.println("\n\nError formatting");
}

Thank you, I will try this.

At what exact line in which file should this block be inserted ?

@pbenaim
Copy link

pbenaim commented Jan 17, 2022

Work after format the SPIFFS ;-)
bool formatted = SPIFFS.format();
if(formatted){
Serial.println("\n\nSuccess formatting");
}else{
Serial.println("\n\nError formatting");
}

Thank you, I will try this.

At what exact line in which file should this block be inserted ?

In setup of SPIFFS_Test.ino after Serial.begin(115200);
if(!SPIFFS.begin(FORMAT_SPIFFS_IF_FAILED)){
Serial.println("SPIFFS Mount Failed");
return;
}

and delete other things

But, the better way, it's make just one ino project to only format SPIFFS..

@fryzjeruch26
Copy link

fryzjeruch26 commented Jan 18, 2022

I flashed the SPIFFS_Test.ino from Eample-Library. Test result OK, takes a while !

I follow this steps but when I try to save the settings camera crashes.
The working solution for me was as follows:
in setup() of esp32-cam-webserver.ino I moved Delay(200); between filesystemStart(); and loadPrefs(SPIFFS);
like this:

if (filesystem) {
filesystemStart();
delay(200); // a short delay to let spi bus settle after camera init
loadPrefs(SPIFFS);
} else {
Serial.println("No Internal Filesystem, cannot load or save preferences");
}
}

I can save the config, erase then change and save again.
Everything works perfect !

I have one more camera from the same amazon seller, so I'm gonna test this without flashing SPIFFS_Test.ino and just moving the delay(); and see, then I'll update the results here :)

@Aquillum
Copy link

Aquillum commented Jan 20, 2022

I flashed the SPIFFS_Test.ino from Eample-Library. Test result OK, takes a while !

I follow this steps but when I try to save the settings camera crashes. The working solution for me was as follows: in setup() of esp32-cam-webserver.ino I moved Delay(200); between filesystemStart(); and loadPrefs(SPIFFS); like this:

if (filesystem) {
filesystemStart();
delay(200); // a short delay to let spi bus settle after camera init
loadPrefs(SPIFFS);
} else {
Serial.println("No Internal Filesystem, cannot load or save preferences");
}
}

I can save the config, erase then change and save again. Everything works perfect !

I have one more camera from the same amazon seller, so I'm gonna test this without flashing SPIFFS_Test.ino and just moving the delay(); and see, then I'll update the results here :)

I tried to compile and flash esp32-cam-webserver with the delay(200) on a brand new ESP32-CAM but I got SPIFFS Error at boot.
I then flashed the Format_SPIFFS.ino -->" Success formatting." (thx @pbenaim)
Then again esp32-cam-webserver and I also can Save the config.
It seems formattingt SPIFFS is mandatory.

@pauljurczak
Copy link

I have the same problem. Where can I find Format_SPIFFS.ino? I cloned https://github.com/espressif/arduino-esp32 and it's not there.

@pauljurczak
Copy link

pauljurczak commented Feb 3, 2022

Never mind. I found this: https://techtutorialsx.com/2019/02/24/esp32-arduino-formatting-the-spiffs-file-system/. esp32-cam-webserver works fine now. Thank you.

@JBaczuk
Copy link

JBaczuk commented Feb 16, 2022

I have the same problem. Where can I find Format_SPIFFS.ino? I cloned https://github.com/espressif/arduino-esp32 and it's not there.

I know you found it, but for anyone else, it's in the Arduino IDE, once you install the ESP32 boards, you can go to File > Examples > SPIFFS > SPIFFS_Test. Flashing and letting the program write the test file (watch progress on Serial Monitor) allowed me to then flash the esp32-cam-webserver and everything is working now.

@easytarget easytarget mentioned this issue Mar 8, 2022
@easytarget
Copy link
Owner

Rolling this and all related into a single issue: #214

@easytarget easytarget added the duplicate This issue or pull request already exists label Mar 8, 2022
@Muplex
Copy link

Muplex commented Nov 19, 2022

Hello, even if i successfully format the SPIFFS following the upper instruction, i keep have the boot loop error with following message

esp32-cam-webserver: ESP32 camera server
Code Built: Nov 19 2022 @ 18:05:51
Base Release: 4.0

Starting internal SPIFFS filesystem
Listing SPIFFS directory: /
Camera init succeeded
OV2640 camera module detected
Preference file /esp32cam-preferences.json not found; using system defaults.
Starting WiFi
Known external SSIDs:  'XYZZZ'
MAC address: 24:62:AB:CA:66:5D
Scanning local Wifi Networks
ets Jun  8 2016 00:22:57


rst:0x8 (TG1WDT_SYS_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13864
load:0x40080400,len:3608
entry 0x400805f0

Have some one fixed in other ways ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests