Uploaded image for project: 'Appcelerator - INBOX'
  1. Appcelerator - INBOX
  2. AC-2960

Android: remote images not loading as cache folder does not appear to exist

    Details

      Description

      I've seen this crop up now and again: basically I have a table with images being loaded in the rows. Initially this was working. But when I've updated the app and tweaked some unrelated scripts, then go to totally remove the app from the device then re-install it, the remote images fail to load.

      It appears the remote image cache folder is non-existent (any more):

      /TiDownloadManager( 4451): (pool-2-thread-1) [65,7571] Exception downloading http://i.ytimg.com/vi/tCdUiL4FpLI/2.jpg
      E/TiDownloadManager( 4451): java.io.FileNotFoundException: /mnt/sdcard/Android/data/com.amazingmedia.radio1/cache/_tmp/remote-cache/771b3e39cf992ed3f545043f43fff914ce8071ef.hdr (No such file or directory)
      E/TiDownloadManager( 4451): 	at org.apache.harmony.luni.platform.OSFileSystem.open(Native Method)
      E/TiDownloadManager( 4451): 	at dalvik.system.BlockGuard$WrappedFileSystem.open(BlockGuard.java:232)
      E/TiDownloadManager( 4451): 	at java.io.FileOutputStream.<init>(FileOutputStream.java:94)
      E/TiDownloadManager( 4451): 	at java.io.FileOutputStream.<init>(FileOutputStream.java:66)
      E/TiDownloadManager( 4451): 	at java.io.FileWriter.<init>(FileWriter.java:42)
      E/TiDownloadManager( 4451): 	at org.appcelerator.titanium.util.TiResponseCache.put(TiResponseCache.java:374)
      E/TiDownloadManager( 4451): 	at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.maybeCache(HttpURLConnectionImpl.java:331)
      E/TiDownloadManager( 4451): 	at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.retrieveResponse(HttpURLConnectionImpl.java:1043)
      E/TiDownloadManager( 4451): 	at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:512)
      E/TiDownloadManager( 4451): 	at java.net.URL.openStream(URL.java:645)
      E/TiDownloadManager( 4451): 	at org.appcelerator.titanium.util.TiDownloadManager$DownloadJob.run(TiDownloadManager.java:157)
      E/TiDownloadManager( 4451): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
      E/TiDownloadManager( 4451): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
      E/TiDownloadManager( 4451): 	at java.lang.Thread.run(Thread.java:1019)
      E/TiDownloadManager( 4451): (pool-2-thread-2) [48,7720] Exception downloading http://i.ytimg.com/vi/jk_Kmlj-U7A/2.jpg
      E/TiDownloadManager( 4451): java.io.FileNotFoundException: /mnt/sdcard/Android/data/com.amazingmedia.radio1/cache/_tmp/remote-cache/aa30b9ef9b18afe0bb37ec514c85b8ec04a8f8c2.hdr (No such file or directory)
      E/TiDownloadManager( 4451): 	at org.apache.harmony.luni.platform.OSFileSystem.open(Native Method)
      E/TiDownloadManager( 4451): 	at dalvik.system.BlockGuard$WrappedFileSystem.open(BlockGuard.java:232)
      

      ..etc...

      The only way I seem to get this to work is to change the app id and rebuild and install (effectively a new app) - this is not possible, since my app is already in the Android Market, so the app id will need to be the same (com.amazingmedia.radio1) when I do the update. (Only the version code/number changes)

      So, for some reason, it appears that the remote image cache folder is not being created.

      If I (try to) navigate in the file manager on the device to /mnt/sdcard/Android/data/com.amazingmedia.radio1 it does not exist.

        Attachments

          Activity

            People

            • Assignee:
              shossain Shak Hossain (Inactive)
              Reporter:
              kosso kosso
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Git Integration