-
Notifications
You must be signed in to change notification settings - Fork 238
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
File: file not found! unhandled exception #201
Comments
The root would need to be "/spiffs/". If you have a recent build I think this is now the default. |
So you mean that I should give "/spiffs/" instead of ./ in root.? Please correct me if I'm wrong |
That's correct. The files manifest includes the root for each target platform in the |
Thanks much Iprader and Wilberforce. Will try that and update here |
We tried adding the "/spiffs/" in the manifest and also declared the root config. Still the error persists :( |
Try running the |
Will check that |
If the
|
I think file example is working. The word think is put here because it doesn't show any error while burning the application and nothing was showing in the xsbug logs too 😁. |
Hmm...you should see messages traced to the
|
Yeah, I always used to run in debug mode. But I couldn't able to figure it out on why its being not shown in log panel. Even I checked by keeping breakpoints, it doesn't even stopped |
Based on your original comment, it sounds like you see messages (or at least errors) traced to the console when running other applications. Is that true? And do you hit breakpoints in other examples? For example, if you run |
Exactly! |
Can you share a screenshot of
You should get a machine tab (like the one circled in red in the image below). When you click that tab, you should see the instrumentation panel (and it should be updating the values of each row every second or so). |
Yeah I will post it here. |
Sorry, now I'm a little confused--you originally said:
That screenshot clearly shows messages traced to the console and an error. So that doesn't seem to be a problem. Is that correct? |
Iprader you are right, Initially I didn't found any of the trace logs as mentioned above. But after you asked for the screenshot I just try by changing the environment variable path of xsbug that made the debugger .There were something weird at that time. I suspect that I didn't get any error message because xsbug is not launched at that time. However my main issue in the board file not found exists. |
Alright, gotcha. Glad that part is solved. As for the "file not found" issue, what kind of ESP32 board are you using? In your very first comment you mentioned you added a |
Exactly |
Would you mind sharing your application so I can see if it works for me? |
When did you get your Moddable sources? - they could be out of date and changes made since you pulled your copy of the repository... |
Might be, I have the code which has been last updated on May 1st. |
Meanwhile, I don't see any commits regarding the file issues @wilberforce |
Ah-ha. I understand now. You are attempting to read from a file that doesn't exist on the device. You have a |
I'm not sure how to include a JSON file in your build (I'll look into that tomorrow), but if you want to store preferences like the ones in |
Okay, So that means If I read and write in a single program it doesn't requires any configuration in manifest and it automatically takes from the root path. Correct me if my understanding wrong |
Thank you Iprader, Will definitely go through that preference class too. |
No files are ever added to the device automatically. You have to specify which files go onto the device in the manifest. Or you can create them at runtime, as the From the File class constructor documentation: If you look at the source for the
|
Got it! |
@lprader You were right. It is working when I tried it by deleting the get data from preference part alone. |
For taking the external JSON file, whether we can try it out just by giving the folder name where the JSON file is put under modules of manifest . |
Closing, as this appears resolved. |
Team,
I have implemented the file concept in my project. Implementation is working fine in windows simulator but It is not working in the esp32 target. Am getting the below error in modFIle. C
\modFile.c (76) # Break: File: file not found!. I have added the file configuration in manifest as below
"esp32/moddable_zero": { "modules": { "*": "$(MODDABLE)/modules/files/file/esp32/*" }, "config": { "file": { "root": "./" } } }
Could you please help on this
The text was updated successfully, but these errors were encountered: