Hello,
I created a snapcraft.yaml file for my project. And I builted snap from the snapcraft.yaml file. But when I run the snap it throws me some read-only logs multiple times and then it executing the steps according to the yaml file.
Here is the error I encountered
Startup.txt : Read-only file system
java.io.FileNotFoundException: Startup.txt : Read-only file system
at java.io.FileDescriptor.(FileDescriptor.java:177)
at java.io.FileWriter.(FileWriter.java:78)
at com.pg.orion.bw.persistence.FileTools.reportStartup(FileTools.java:791)
at com.pg.orion.bw.BlueWonder.init(BlueWonder.java:322)
at com.pg.orion.bw.BlueWonder.main(BlueWonder.java:1124)
——————————
Here is my snapcraft.yaml file-
name: start-human
summary: About human snap
description: |
This is the snap where it contains human folder which is created to run start_human.sh file in scripts folder.
version: ‘2.10’
grade: stable
confinement: strict
type: base
build-base: core20
apps:
start-human:
command: scripts/start_human.sh
plugs:
- network
parts:
start-human:
plugin: dump
source: human.tar
source-type: tar
layout:
/usr/human:
bind: $SNAP
What kind of lines I need to add inorder to overcome the above error.
I tried to add environment variables and plugins, but it not helped me much.
Could some one assist me to resolve that issue.
Kindly format message properly using markdown tags, The snapcraft.yaml is not legible. Also, it’d be just better if you give us the link to your repo. Thanks
सौम्यदीप घोष
Hello,
Here is my snapcraft.yaml code with corrected format.
Please have a look
Where is the source-code of your app? I need to see that too. If it’s private, you can mail it to me then.
Hello,
The above is the snapcraft file which i used to create a snap.
I installed the snap and ran it byusing command.
I am getting an expected output. But the problem is with some logs which are repeatedly appearing in the output as mentioned below:
Startup.txt : Read-only file system java.io.FileNotFoundException: Startup.txt : Read-only file system at java.io.FileDescriptor.(FileDescriptor.java:177) at java.io.FileWriter.(FileWriter.java:78) at com.pg.orion.bw.persistence.FileTools.reportStartup(FileTools.java:791) at com.pg.orion.bw.BlueWonder.init(BlueWonder.java:322) at com.pg.orion.bw.BlueWonder.main(BlueWonder.java:1124)
In general should i include any component or part in the snapcraft.yaml file in order to resolve read-only file systems errors?
If so, Can you let me know what to include.
I want to check the code of the app. Only then I’ll understand which folders it’s trying to access?
Thank for the reply.
I cannot share the source code of the app.
can you help me to resolve that.
As far i know, the error is evolved due to read-only permissions in the root directory.
So, I am thinking to add layout section with the directory the app source code is calling with the snap variable as $SNAP_DATA.
But i am not sure the idea will helps me much.
Also, Please shar your email id.