Crash at app startup due to jacoco trying to write to root directory
farindk opened this issue · 5 comments
farindk commented
I sometimes get a crash at app startup coming from the nextcloud android-library, debug build.
I use the revision 847558b from 04.Mar.2020 (v2.0.1).
Seems to be related to this problem: jacoco/jacoco#968
03-08 01:57:38.690 20787 20852 W System.err: java.io.FileNotFoundException: /jacoco.exec (Read-only file system)
03-08 01:57:38.690 20787 20852 W System.err: at java.io.FileOutputStream.open0(Native Method)
03-08 01:57:38.691 20787 20852 W System.err: at java.io.FileOutputStream.open(FileOutputStream.java:308)
03-08 01:57:38.691 20787 20852 W System.err: at java.io.FileOutputStream.<init>(FileOutputStream.java:238)
03-08 01:57:38.691 20787 20852 W System.err: at org.jacoco.agent.rt.internal_8ff85ea.output.FileOutput.openFile(FileOutput.java:67)
03-08 01:57:38.691 20787 20852 W System.err: at org.jacoco.agent.rt.internal_8ff85ea.output.FileOutput.startup(FileOutput.java:49)
03-08 01:57:38.691 20787 20852 W System.err: at org.jacoco.agent.rt.internal_8ff85ea.Agent.startup(Agent.java:122)
03-08 01:57:38.691 20787 20852 W System.err: at org.jacoco.agent.rt.internal_8ff85ea.Agent.getInstance(Agent.java:50)
03-08 01:57:38.691 20787 20852 W System.err: at org.jacoco.agent.rt.internal_8ff85ea.Offline.<clinit>(Offline.java:31)
03-08 01:57:38.691 20787 20852 W System.err: at org.jacoco.agent.rt.internal_8ff85ea.Offline.getProbes(Offline.java:51)
03-08 01:57:38.691 20787 20852 W System.err: at com.owncloud.android.lib.common.OwnCloudClientManagerFactory.$jacocoInit(Unknown Source:13)
03-08 01:57:38.691 20787 20852 W System.err: at com.owncloud.android.lib.common.OwnCloudClientManagerFactory.<clinit>(Unknown Source:0)
03-08 01:57:38.691 20787 20852 W System.err: at com.owncloud.android.lib.common.OwnCloudClientManagerFactory.setUserAgent(Unknown Source:0)
AndyScherzinger commented
pinging @tobiasKaminsky
tobiasKaminsky commented
Is this really a crash or just an exception?
I see this also from time to time, but the app never crashed…?
Also JaCoCo should only be visible while debugging.
farindk commented
Right. Seems to be an exception only and not inferring a crash. Sorry for the confusion.
However, it would still be nice that this does not show up.
tobiasKaminsky commented
I think you have to add this to your project as it must be in androidTest …
tobiasKaminsky commented
If this is not solved, please re-open.