Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-26182

An exception is raised when a remote image URL is set on an ImageView on some Android devices

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Release 7.5.0
    • Component/s: Android
    • Labels:
    • Environment:

      Model : SUNNY, Android V 6.0 (build number MRA58K release-keys & custom build version SUNNY Marshmallow 6.0[10] R). Titanium SDK 7.1+

    • Story Points:
      3
    • Sprint:
      2018 Sprint 15 SDK, 2018 Sprint 16 SDK, 2016 Sprint 17 SDK, 2018 Sprint 18 SDK, 2018 Sprint 19 SDK

      Description

      On one of our Android device, a native exception is raised when we set a remote URL on an ImageView (no problems with local URLs). Visually, no remote images are displayed on the app. If we turn on the storage permission on the device for our app, the images are displayed. This error happens only on SDKs 7.1 and more.

      Here's the exception :

       [ERROR] TiDrawableReference: (pool-6-thread-1) [46,103593] Problem opening stream with url [the URL]: /storage/emulated/0/Android/data/[the package name]/cache/_tmp/remote-cache/ec4d7d79f9e6687d490bf9eea8f8a779667ad14f.hdr: open failed: EACCES (Permission denied)
       java.io.FileNotFoundException: /storage/emulated/0/Android/data/[the package name]/cache/_tmp/remote-cache/ec4d7d79f9e6687d490bf9eea8f8a779667ad14f.hdr: open failed: EACCES (Permission denied)
       	at libcore.io.IoBridge.open(IoBridge.java:452)
       	at java.io.FileInputStream.<init>(FileInputStream.java:76)
       	at java.io.FileReader.<init>(FileReader.java:42)
       	at org.appcelerator.titanium.util.TiResponseCache.readHeaders(TiResponseCache.java:351)
       	at org.appcelerator.titanium.util.TiResponseCache.get(TiResponseCache.java:338)
       	at com.android.okhttp.internal.huc.CacheAdapter.getJavaCachedResponse(CacheAdapter.java:103)
       	at com.android.okhttp.internal.huc.CacheAdapter.get(CacheAdapter.java:47)
       	at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:229)
       	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:433)
       	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:384)
       	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:231)
       	at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)
       	at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java)
       	at java.net.URL.openStream(URL.java:470)
       	at org.appcelerator.titanium.util.TiFileHelper.handleNetworkURL(TiFileHelper.java:248)
       	at org.appcelerator.titanium.util.TiFileHelper.openInputStream(TiFileHelper.java:186)
       	at org.appcelerator.titanium.view.TiDrawableReference.getInputStream(TiDrawableReference.java:896)
       	at org.appcelerator.titanium.view.TiDrawableReference.getBitmap(TiDrawableReference.java:373)
       	at org.appcelerator.titanium.view.TiDrawableReference.getBitmap(TiDrawableReference.java:330)
       	at org.appcelerator.titanium.util.TiLoadImageManager$LoadImageJob.run(TiLoadImageManager.java:132)
       	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
       	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
       	at java.lang.Thread.run(Thread.java:818)
       Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
       	at libcore.io.Posix.open(Native Method)
       	at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
       	at libcore.io.IoBridge.open(IoBridge.java:438)
       	... 22 more
      

        Attachments

          Activity

            People

            • Assignee:
              gmathews Gary Mathews
              Reporter:
              gdrusch Gautier Drusch
              Reviewer:
              Yordan Banev
              Tester:
              Lokesh Choudhary
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-6441
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code