Closed Legolor closed 11 months ago
It is normal as the file list and all temporary data in FilebaseData
object will be cleared when it was re-used for another request.
You should keep the file paths in String array to use it later.
This is not a corrupt memory but the const char (char pointer) now points to somewhere in memory that does not exist as it has been deallocated already.
Variables are getting corrupted from the Firebase.Storage.download or Firebase.Storage.deleteFile functions or both.
The code should find all files in the directory. Then it should loop through and one at a time download them to the sd card and then delete the file from firebase.
In the code the download function successfully downloads the first file. However, it corrupts the firebase filename variable "firebaseObject" preventing the file from being deleted (the delete function normally works for me). The file list is also cleared and (files->items.size()) returns "0". This prevents the for loop from continuing. The interesting part of the code is "downloadFilesFromFirebase()"
Example Serial Monitor:
Note messed up "Current file 2:", different "Current file 3:", and "Number of Files Found:" at 0.
IDE and its version:
ESP32 Arduino Core SDK version
Additional context I have tried increasing and decreasing the buffer sizes in startup. I have added delays. I have uploaded in both arduinoIDE and PlatformIO. I have tried different partition schemes. I have used the sdHelper addon.
I'm not really sure what the issue could be so I think it might be a bug? Any help would be great! I'm happy to test any suggestions.