java.io.FileNotFoundException: /storage/emulated/0/com.androidwritefailure/test.txt: open failed: ENOENT (No such file or directory)

Appcelerator JIRA | Jacob Budin | 1 year ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    *Steps to reproduce:* 1. Add the code below to controllers/index.js: {code:javascript} function doClick(e) { var file = Ti.Filesystem.getFile(Ti.Filesystem.externalStorageDirectory, "test.txt"); file.write("i love writing to files"); } $.index.open(); {code} 2. Launch the app. 3. Click on the "Hello, World" text. *Results:* {code:java} 12-21 12:15:24.350: E/TiBlob(12960): (KrollRuntimeThread) [19,12681] /storage/emulated/0/com.androidwritefailure/test.txt: open failed: ENOENT (No such file or directory) 12-21 12:15:24.350: E/TiBlob(12960): java.io.FileNotFoundException: /storage/emulated/0/com.androidwritefailure/test.txt: open failed: ENOENT (No such file or directory) 12-21 12:15:24.350: E/TiBlob(12960): at libcore.io.IoBridge.open(IoBridge.java:452) 12-21 12:15:24.350: E/TiBlob(12960): at java.io.FileInputStream.<init>(FileInputStream.java:76) 12-21 12:15:24.350: E/TiBlob(12960): at org.appcelerator.titanium.io.TiFile.getInputStream(TiFile.java:264) 12-21 12:15:24.350: E/TiBlob(12960): at org.appcelerator.titanium.TiBlob.getInputStream(TiBlob.java:389) 12-21 12:15:24.350: E/TiBlob(12960): at org.appcelerator.titanium.TiBlob.guessContentTypeFromStream(TiBlob.java:209) 12-21 12:15:24.350: E/TiBlob(12960): at org.appcelerator.titanium.TiBlob.loadBitmapInfo(TiBlob.java:270) 12-21 12:15:24.350: E/TiBlob(12960): at org.appcelerator.titanium.TiBlob.blobFromFile(TiBlob.java:140) 12-21 12:15:24.350: E/TiBlob(12960): at org.appcelerator.titanium.TiBlob.blobFromFile(TiBlob.java:113) 12-21 12:15:24.350: E/TiBlob(12960): at org.appcelerator.titanium.io.TiFile.read(TiFile.java:351) 12-21 12:15:24.350: E/TiBlob(12960): at org.appcelerator.titanium.TiFileProxy.read(TiFileProxy.java:239) {code} *Notes:* The code is working in Android 5.1 and Android 5.0.

    Appcelerator JIRA | 1 year ago | Jacob Budin
    java.io.FileNotFoundException: /storage/emulated/0/com.androidwritefailure/test.txt: open failed: ENOENT (No such file or directory)
  2. 0

    *Steps to reproduce:* 1. Add the code below to controllers/index.js: {code:javascript} function doClick(e) { var file = Ti.Filesystem.getFile(Ti.Filesystem.externalStorageDirectory, "test.txt"); file.write("i love writing to files"); } $.index.open(); {code} 2. Launch the app. 3. Click on the "Hello, World" text. *Results:* {code:java} 12-21 12:15:24.350: E/TiBlob(12960): (KrollRuntimeThread) [19,12681] /storage/emulated/0/com.androidwritefailure/test.txt: open failed: ENOENT (No such file or directory) 12-21 12:15:24.350: E/TiBlob(12960): java.io.FileNotFoundException: /storage/emulated/0/com.androidwritefailure/test.txt: open failed: ENOENT (No such file or directory) 12-21 12:15:24.350: E/TiBlob(12960): at libcore.io.IoBridge.open(IoBridge.java:452) 12-21 12:15:24.350: E/TiBlob(12960): at java.io.FileInputStream.<init>(FileInputStream.java:76) 12-21 12:15:24.350: E/TiBlob(12960): at org.appcelerator.titanium.io.TiFile.getInputStream(TiFile.java:264) 12-21 12:15:24.350: E/TiBlob(12960): at org.appcelerator.titanium.TiBlob.getInputStream(TiBlob.java:389) 12-21 12:15:24.350: E/TiBlob(12960): at org.appcelerator.titanium.TiBlob.guessContentTypeFromStream(TiBlob.java:209) 12-21 12:15:24.350: E/TiBlob(12960): at org.appcelerator.titanium.TiBlob.loadBitmapInfo(TiBlob.java:270) 12-21 12:15:24.350: E/TiBlob(12960): at org.appcelerator.titanium.TiBlob.blobFromFile(TiBlob.java:140) 12-21 12:15:24.350: E/TiBlob(12960): at org.appcelerator.titanium.TiBlob.blobFromFile(TiBlob.java:113) 12-21 12:15:24.350: E/TiBlob(12960): at org.appcelerator.titanium.io.TiFile.read(TiFile.java:351) 12-21 12:15:24.350: E/TiBlob(12960): at org.appcelerator.titanium.TiFileProxy.read(TiFileProxy.java:239) {code} *Notes:* The code is working in Android 5.1 and Android 5.0.

    Appcelerator JIRA | 1 year ago | Jacob Budin
    java.io.FileNotFoundException: /storage/emulated/0/com.androidwritefailure/test.txt: open failed: ENOENT (No such file or directory)
  3. 0

    h6.Description Can not read tempDirectory file without External storage permissions. h6.Steps to Reproduce: 1. Create a classic project. 2. Paste this code on app.js file. 3. Run it on android 6 device. h6.Test Case {code:title=app.js} var win = Ti.UI.createWindow({ backgroundColor : '#ffffff' }); var button = Ti.UI.createButton({ top : 10, width : 200, height : 50, title : "Read files" }); win.add(button); var f = Ti.Filesystem.getFile(Ti.Filesystem.tempDirectory, 'fileter.txt'); f.write('writing to the file would be enough to create it'); button.addEventListener('click', function(e) { alert(f.read()); }); win.open(); {code} {code:title=error} [ERROR] : SensorManager: uid = 10318 [INFO] : SensorManager: registerListenerImpl: listener = android.view.OrientationEventListener$SensorEventListenerImpl@33dd978, sensor = {Sensor name="Accelerometer Sensor", vendor="HTC Group Ltd.", version=1, type=1, maxRange=19.6133, resolution=0.01, power=0.17, minDelay=10000}, delay = 200000, handler = null [ERROR] : TiFileProxy: (KrollRuntimeThread) [6877,6877] IOException encountered [ERROR] : TiFileProxy: java.io.FileNotFoundException: /storage/emulated/0/Android/data/com.a.permision/cache/_tmp/fileter.txt: open failed: ENOENT (No such file or directory) [ERROR] : TiFileProxy: at libcore.io.IoBridge.open(IoBridge.java:452) [ERROR] : TiFileProxy: at java.io.FileOutputStream.<init>(FileOutputStream.java:87) [ERROR] : TiFileProxy: at org.appcelerator.titanium.io.TiFile.getOutputStream(TiFile.java:273) [ERROR] : TiFileProxy: at org.appcelerator.titanium.io.TiFile.open(TiFile.java:336) [ERROR] : TiFileProxy: at org.appcelerator.titanium.io.TiFile.write(TiFile.java:460) [ERROR] : TiFileProxy: at org.appcelerator.titanium.TiFileProxy.write(TiFileProxy.java:287) [ERROR] : TiFileProxy: at org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method) [ERROR] : TiFileProxy: at org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:62) [ERROR] : TiFileProxy: at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:918) [ERROR] : TiFileProxy: at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1141) [ERROR] : TiFileProxy: at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:356) [ERROR] : TiFileProxy: at android.os.Handler.dispatchMessage(Handler.java:98) [ERROR] : TiFileProxy: at android.os.Looper.loop(Looper.java:168) [ERROR] : TiFileProxy: at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:118) [ERROR] : TiFileProxy: Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory) [ERROR] : TiFileProxy: at libcore.io.Posix.open(Native Method) [ERROR] : TiFileProxy: at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186) [ERROR] : TiFileProxy: at libcore.io.IoBridge.open(IoBridge.java:438) [ERROR] : TiFileProxy: ... 13 more [ERROR] : TiBlob: (KrollRuntimeThread) [49,6926] /storage/emulated/0/Android/data/com.a.permision/cache/_tmp/fileter.txt: open failed: ENOENT (No such file or directory) [ERROR] : TiBlob: java.io.FileNotFoundException: /storage/emulated/0/Android/data/com.a.permision/cache/_tmp/fileter.txt: open failed: ENOENT (No such file or directory) [ERROR] : TiBlob: at libcore.io.IoBridge.open(IoBridge.java:452) [ERROR] : TiBlob: at java.io.FileInputStream.<init>(FileInputStream.java:76) [ERROR] : TiBlob: at org.appcelerator.titanium.io.TiFile.getInputStream(TiFile.java:264) [ERROR] : TiBlob: at org.appcelerator.titanium.TiBlob.getInputStream(TiBlob.java:389) [ERROR] : TiBlob: at org.appcelerator.titanium.TiBlob.guessContentTypeFromStream(TiBlob.java:209) [ERROR] : TiBlob: at org.appcelerator.titanium.TiBlob.loadBitmapInfo(TiBlob.java:270) [ERROR] : TiBlob: at org.appcelerator.titanium.TiBlob.blobFromFile(TiBlob.java:140) [ERROR] : TiBlob: at org.appcelerator.titanium.TiBlob.blobFromFile(TiBlob.java:113) [ERROR] : TiBlob: at org.appcelerator.titanium.io.TiFile.read(TiFile.java:351) [ERROR] : TiBlob: at org.appcelerator.titanium.TiFileProxy.read(TiFileProxy.java:239) [ERROR] : TiBlob: at org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method) [ERROR] : TiBlob: at org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:62) [ERROR] : TiBlob: at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:918) [ERROR] : TiBlob: at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1141) [ERROR] : TiBlob: at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:356) [ERROR] : TiBlob: at android.os.Handler.dispatchMessage(Handler.java:98) [ERROR] : TiBlob: at android.os.Looper.loop(Looper.java:168) [ERROR] : TiBlob: at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:118) [ERROR] : TiBlob: Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory) [ERROR] : TiBlob: at libcore.io.Posix.open(Native Method) [ERROR] : TiBlob: at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186) [ERROR] : TiBlob: at libcore.io.IoBridge.open(IoBridge.java:438) [ERROR] : TiBlob: ... 17 more [ERROR] : TiBlob: (KrollRuntimeThread) [7,6933] /storage/emulated/0/Android/data/com.a.permision/cache/_tmp/fileter.txt: open failed: ENOENT (No such file or directory) [ERROR] : TiBlob: java.io.FileNotFoundException: /storage/emulated/0/Android/data/com.a.permision/cache/_tmp/fileter.txt: open failed: ENOENT (No such file or directory) [ERROR] : TiBlob: at libcore.io.IoBridge.open(IoBridge.java:452) [ERROR] : TiBlob: at java.io.FileInputStream.<init>(FileInputStream.java:76) [ERROR] : TiBlob: at org.appcelerator.titanium.io.TiFile.getInputStream(TiFile.java:264) [ERROR] : TiBlob: at org.appcelerator.titanium.TiBlob.getInputStream(TiBlob.java:389) [ERROR] : TiBlob: at org.appcelerator.titanium.TiBlob.getBytes(TiBlob.java:324) [ERROR] : TiBlob: at org.appcelerator.titanium.TiBlob.getText(TiBlob.java:452) [ERROR] : TiBlob: at org.appcelerator.titanium.TiBlob.toString(TiBlob.java:511) [ERROR] : TiBlob: at ti.modules.titanium.TitaniumModule.alert(TitaniumModule.java:232) [ERROR] : TiBlob: at org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method) [ERROR] : TiBlob: at org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:62) [ERROR] : TiBlob: at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:918) [ERROR] : TiBlob: at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1141) [ERROR] : TiBlob: at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:356) [ERROR] : TiBlob: at android.os.Handler.dispatchMessage(Handler.java:98) [ERROR] : TiBlob: at android.os.Looper.loop(Looper.java:168) [ERROR] : TiBlob: at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:118) [ERROR] : TiBlob: Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory) [ERROR] : TiBlob: at libcore.io.Posix.open(Native Method) [ERROR] : TiBlob: at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186) [ERROR] : TiBlob: at libcore.io.IoBridge.open(IoBridge.java:438) [ERROR] : TiBlob: ... 15 more {code} *Connected Android Devices* htc_melsuhl State = device SDK Version = 6.0.1 (android-23) ABIs = armeabi-v7a, armeabi, Thanks

    Appcelerator JIRA | 10 months ago | Motiur Rahman
    java.io.FileNotFoundException: /storage/emulated/0/Android/data/com.a.permision/cache/_tmp/fileter.txt: open failed: ENOENT (No such file or directory)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Problems with Android 6.0

    GitHub | 1 year ago | naoliv
    java.io.FileNotFoundException: /storage/emulated/0/osmand/tiles/OsmAnd (online tiles)/.metainfo: open failed: EACCES (Permission denied)
  6. 0

    The sample file manager doesn't work with Android M

    GitHub | 1 year ago | greddyatpt
    java.io.FileNotFoundException: /data/user/0/com.facebook.katana/app_light_prefs/com.facebook.katana/analytics_flexible_sampling_policy: open failed: ENOENT (No such file or directory)

  1. Indri Yunita 29 times, last 7 days ago
  2. justCodeit 2 times, last 2 months ago
  3. filpgame 2 times, last 2 months ago
  4. Donsy 14 times, last 3 months ago
  5. gamebusterz 1 times, last 3 months ago
91 more registered users
4 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.io.FileNotFoundException

    /storage/emulated/0/com.androidwritefailure/test.txt: open failed: ENOENT (No such file or directory)

    at libcore.io.IoBridge.open()
  2. Android
    IoBridge.open
    1. libcore.io.IoBridge.open(IoBridge.java:452)
    1 frame
  3. Java RT
    FileInputStream.<init>
    1. java.io.FileInputStream.<init>(FileInputStream.java:76)
    1 frame
  4. org.appcelerator.titanium
    TiFileProxy.read
    1. org.appcelerator.titanium.io.TiFile.getInputStream(TiFile.java:264)
    2. org.appcelerator.titanium.TiBlob.getInputStream(TiBlob.java:389)
    3. org.appcelerator.titanium.TiBlob.guessContentTypeFromStream(TiBlob.java:209)
    4. org.appcelerator.titanium.TiBlob.loadBitmapInfo(TiBlob.java:270)
    5. org.appcelerator.titanium.TiBlob.blobFromFile(TiBlob.java:140)
    6. org.appcelerator.titanium.TiBlob.blobFromFile(TiBlob.java:113)
    7. org.appcelerator.titanium.io.TiFile.read(TiFile.java:351)
    8. org.appcelerator.titanium.TiFileProxy.read(TiFileProxy.java:239)
    8 frames