I have an Ubuntu laptop and an Android tablet, syncing a folder read/write both ways. The folder contains text files.
If I create a text file on Ubuntu, and it is synced to the Android tablet, I can open it, but cannot save it (overwriting the original) from any text editor. On attempting to save, I get the error "java.io.IOException: write failed: EBADF (Bad file descriptor). I have tried this from two separate text editors (QuickEdit and Turbo Editor).
However, I can:
- Create new text files on the Android device and save into the synced folder.
- Open a file that was created in Ubuntu, and save as a different file, with any Android text editor.
- Update a “todo.txt” file with SimpleTask on the Android device - this works with no problems. But the same file cannot be updated using a text editor.
- Create a file on Android, edit it on Ubuntu, then re-edit it on Android. As long as a file was created on Android it seems to work fine forever.
The issue appears to be that files added from Ubuntu are “acquired at attached stack trace but never released”, so cannot be accessed properly using java. See error log below.
Is there a simple way for me to get this working, or is it a bug?
Laptop: Syncthing v0.14.52, Ubuntu 16.04.5 LTS
Tablet: Syncthing v0.14.51, Syncthing-Android Version 0.10.15 (installed today from the Play Store), Android 7.0, Kernel 4.4.22, Lenovo Tablet TB-7304F
Settings: Ubuntu device is set to version track, Android device does not use version tracking. Android has “ignore permissions” set to “Yes”.
Thankyou, Samuel
11-27 14:54:39.155 E/StrictMode( 4335): A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
11-27 14:54:39.155 E/StrictMode( 4335): java.lang.Throwable: Explicit termination method 'close' not called
11-27 14:54:39.155 E/StrictMode( 4335): at dalvik.system.CloseGuard.open(CloseGuard.java:180)
11-27 14:54:39.155 E/StrictMode( 4335): at java.net.AbstractPlainSocketImpl.create(AbstractPlainSocketImpl.java:103)
11-27 14:54:39.155 E/StrictMode( 4335): at java.net.Socket.createImpl(Socket.java:464)
11-27 14:54:39.155 E/StrictMode( 4335): at java.net.Socket.getImpl(Socket.java:530)
11-27 14:54:39.155 E/StrictMode( 4335): at java.net.Socket.setSoSndTimeout(Socket.java:1194)
11-27 14:54:39.155 E/StrictMode( 4335): at com.android.okhttp.Connection.setTimeouts(Connection.java:508)
11-27 14:54:39.155 E/StrictMode( 4335): at com.android.okhttp.Connection.connectAndSetOwner(Connection.java:400)
11-27 14:54:39.155 E/StrictMode( 4335): at com.android.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:130)
11-27 14:54:39.155 E/StrictMode( 4335): at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:356)
11-27 14:54:39.155 E/StrictMode( 4335): at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:273)
11-27 14:54:39.155 E/StrictMode( 4335): at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:478)
11-27 14:54:39.155 E/StrictMode( 4335): at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:426)
11-27 14:54:39.155 E/StrictMode( 4335): at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:542)
11-27 14:54:39.155 E/StrictMode( 4335): at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105)
11-27 14:54:39.155 E/StrictMode( 4335): at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java)
11-27 14:54:39.155 E/StrictMode( 4335): at com.android.volley.toolbox.HurlStack.executeRequest(HurlStack.java:99)
11-27 14:54:39.155 E/StrictMode( 4335): at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:131)
11-27 14:54:39.155 E/StrictMode( 4335): at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:120)
11-27 14:54:39.155 E/StrictMode( 4335): at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:87)