# loadRemoteImage()

**URL:** <https://forums.solar2d.com/t/loadremoteimage/329958>\
**Category:** CoronaCards for iOS / Android\
**Created:** [November 10, 2014, 5:55pm UTC](https://forums.solar2d.com/t/loadremoteimage/329958 "2014-11-10T17:55:29Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![dsanjit9](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/d/ea666f/32.png) [@dsanjit9](https://forums.solar2d.com/u/dsanjit9)\
**Post date:** [November 10, 2014, 5:55pm UTC](https://forums.solar2d.com/t/loadremoteimage/329958/1 "2014-11-10T17:55:29Z")

</div>

Hi,

I am getting no image when I use&nbsp;loadRemoteImage() on an Android device. Works fine on the simulator though… I didnt have the params parameter initially but put in in later, same results. Any suggestions ?

Thx

Sanjit

local params = {}

&nbsp; &nbsp; params.headers = {}

&nbsp; &nbsp; params.headers[“Content-Type”] = “image/png”

&nbsp; &nbsp; params.headers[“User-Agent”] = “Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0”

&nbsp; &nbsp; params.headers[“Accept-Language”]= “en-US,en;q=0.5”

&nbsp; &nbsp; params.headers[“Accept-Encoding”] = “gzip, deflate”

&nbsp; &nbsp; display.loadRemoteImage(“[https://graph.facebook.com/620112803/picture](https://graph.facebook.com/620112803/picture)”, “GET”, &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; function(event)

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; local root = root

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if ( event.isError ) then

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(“Remote image error”)

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(“Remote image ok”)

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(“RIMGG::”, event.target.contentWidth, event.target.contentHeight)

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; local pic = event.target

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --pic.alpha = 0

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --transition.to( pic, { alpha = 1 } )

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fitImage(pic, ww, hh)

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pic.x = xx

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pic.y = yy

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sceneGroup:insert(pic)

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pic:toFront()

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end

&nbsp; &nbsp; &nbsp; &nbsp; end,&nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; params,

&nbsp; &nbsp; &nbsp; &nbsp; filename,

&nbsp; &nbsp; &nbsp; &nbsp; system.TemporaryDirectory,

&nbsp; &nbsp; &nbsp; &nbsp; xx,yy

&nbsp; &nbsp; )

11-10 23:20:57.734: E/Corona(6738): ERROR: recvfrom failed: ECONNRESET (Connection reset by peer)

11-10 23:20:57.734: W/System.err(6738): java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer)

11-10 23:20:57.734: E/Corona(6738): ERROR: recvfrom failed: ECONNRESET (Connection reset by peer)

11-10 23:20:57.734: W/System.err(6738): at libcore.io.IoBridge.maybeThrowAfterRecvfrom(IoBridge.java:545)

11-10 23:20:57.734: W/System.err(6738): at libcore.io.IoBridge.recvfrom(IoBridge.java:509)

11-10 23:20:57.734: W/System.err(6738): at java.net.PlainSocketImpl.read(PlainSocketImpl.java:488)

11-10 23:20:57.734: W/System.err(6738): at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:46)

11-10 23:20:57.734: W/System.err(6738): at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:240)

11-10 23:20:57.734: W/System.err(6738): at java.io.InputStream.read(InputStream.java:162)

11-10 23:20:57.734: W/System.err(6738): at java.io.BufferedInputStream.fillbuf(BufferedInputStream.java:142)

11-10 23:20:57.734: W/System.err(6738): at java.io.BufferedInputStream.read(BufferedInputStream.java:227)

11-10 23:20:57.734: W/System.err(6738): at com.android.okhttp.internal.Util.readAsciiLine(Util.java:316)

11-10 23:20:57.734: W/System.err(6738): at com.android.okhttp.internal.http.RawHeaders.fromBytes(RawHeaders.java:308)

11-10 23:20:57.734: W/System.err(6738): at com.android.okhttp.internal.http.HttpTransport.readResponseHeaders(HttpTransport.java:135)

11-10 23:20:57.734: W/System.err(6738): at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:644)

11-10 23:20:57.734: W/System.err(6738): at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:347)

11-10 23:20:57.734: W/System.err(6738): at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:296)

11-10 23:20:57.734: W/System.err(6738): at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:503)

11-10 23:20:57.734: W/System.err(6738): at network.NetworkRequest$AsyncNetworkRequestRunnable.run(NetworkRequest.java:1394)

11-10 23:20:57.734: W/System.err(6738): at java.lang.Thread.run(Thread.java:841)

11-10 23:20:57.734: W/System.err(6738): Caused by: libcore.io.ErrnoException: recvfrom failed: ECONNRESET (Connection reset by peer)

11-10 23:20:57.734: W/System.err(6738): at libcore.io.Posix.recvfromBytes(Native Method)

11-10 23:20:57.734: W/System.err(6738): at libcore.io.Posix.recvfrom(Posix.java:141)

11-10 23:20:57.734: W/System.err(6738): at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:164)

11-10 23:20:57.734: W/System.err(6738): at libcore.io.IoBridge.recvfrom(IoBridge.java:506)

11-10 23:20:57.734: W/System.err(6738): … 15 more

11-10 23:20:57.734: W/System.err(6738): java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer)

11-10 23:20:57.734: W/System.err(6738): at libcore.io.IoBridge.maybeThrowAfterRecvfrom(IoBridge.java:545)

11-10 23:20:57.734: W/System.err(6738): at libcore.io.IoBridge.recvfrom(IoBridge.java:509)

11-10 23:20:57.734: W/System.err(6738): at java.net.PlainSocketImpl.read(PlainSocketImpl.java:488)

11-10 23:20:57.734: W/System.err(6738): at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:46)

11-10 23:20:57.734: W/System.err(6738): at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:240)

11-10 23:20:57.734: W/System.err(6738): at java.io.InputStream.read(InputStream.java:162)

11-10 23:20:57.734: W/System.err(6738): at java.io.BufferedInputStream.fillbuf(BufferedInputStream.java:142)

11-10 23:20:57.734: W/System.err(6738): at java.io.BufferedInputStream.read(BufferedInputStream.java:227)

11-10 23:20:57.734: W/System.err(6738): at com.android.okhttp.internal.Util.readAsciiLine(Util.java:316)

11-10 23:20:57.734: W/System.err(6738): at com.android.okhttp.internal.http.RawHeaders.fromBytes(RawHeaders.java:308)

11-10 23:20:57.734: W/System.err(6738): at com.android.okhttp.internal.http.HttpTransport.readResponseHeaders(HttpTransport.java:135)

11-10 23:20:57.734: W/System.err(6738): at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:644)

11-10 23:20:57.734: W/System.err(6738): at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:347)

11-10 23:20:57.734: W/System.err(6738): at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:296)

11-10 23:20:57.734: W/System.err(6738): at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:503)

11-10 23:20:57.734: W/System.err(6738): at network.NetworkRequest$AsyncNetworkRequestRunnable.run(NetworkRequest.java:1394)

11-10 23:20:57.734: W/System.err(6738): at java.lang.Thread.run(Thread.java:841)

11-10 23:20:57.734: W/System.err(6738): Caused by: libcore.io.ErrnoException: recvfrom failed: ECONNRESET (Connection reset by peer)

11-10 23:20:57.734: W/System.err(6738): at libcore.io.Posix.recvfromBytes(Native Method)

11-10 23:20:57.734: W/System.err(6738): at libcore.io.Posix.recvfrom(Posix.java:141)

11-10 23:20:57.734: W/System.err(6738): at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:164)

11-10 23:20:57.734: W/System.err(6738): at libcore.io.IoBridge.recvfrom(IoBridge.java:506)

11-10 23:20:57.734: W/System.err(6738): … 15 more

11-10 23:20:57.774: E/Corona(6738): ERROR: recvfrom failed: ECONNRESET (Connection reset by peer)

11-10 23:20:57.774: W/System.err(6738): java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer)

11-10 23:20:57.774: W/System.err(6738): at libcore.io.IoBridge.maybeThrowAfterRecvfrom(IoBridge.java:545)

11-10 23:20:57.774: W/System.err(6738): at libcore.io.IoBridge.recvfrom(IoBridge.java:509)

11-10 23:20:57.774: W/System.err(6738): at java.net.PlainSocketImpl.read(PlainSocketImpl.java:488)

11-10 23:20:57.774: W/System.err(6738): at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:46)

11-10 23:20:57.774: W/System.err(6738): at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:240)

11-10 23:20:57.774: W/System.err(6738): at java.io.InputStream.read(InputStream.java:162)

11-10 23:20:57.774: W/System.err(6738): at java.io.BufferedInputStream.fillbuf(BufferedInputStream.java:142)

11-10 23:20:57.774: W/System.err(6738): at java.io.BufferedInputStream.read(BufferedInputStream.java:227)

11-10 23:20:57.774: W/System.err(6738): at com.android.okhttp.internal.Util.readAsciiLine(Util.java:316)

11-10 23:20:57.774: W/System.err(6738): at com.android.okhttp.internal.http.RawHeaders.fromBytes(RawHeaders.java:308)

11-10 23:20:57.774: W/System.err(6738): at com.android.okhttp.internal.http.HttpTransport.readResponseHeaders(HttpTransport.java:135)

11-10 23:20:57.774: W/System.err(6738): at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:644)

11-10 23:20:57.774: W/System.err(6738): at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:347)

11-10 23:20:57.774: W/System.err(6738): at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:296)

11-10 23:20:57.774: W/System.err(6738): at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:503)

11-10 23:20:57.774: W/System.err(6738): at network.NetworkRequest$AsyncNetworkRequestRunnable.run(NetworkRequest.java:1394)

11-10 23:20:57.784: W/System.err(6738): at java.lang.Thread.run(Thread.java:841)

11-10 23:20:57.784: W/System.err(6738): Caused by: libcore.io.ErrnoException: recvfrom failed: ECONNRESET (Connection reset by peer)

11-10 23:20:57.784: W/System.err(6738): at libcore.io.Posix.recvfromBytes(Native Method)

11-10 23:20:57.784: W/System.err(6738): at libcore.io.Posix.recvfrom(Posix.java:141)

11-10 23:20:57.784: W/System.err(6738): at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:164)

11-10 23:20:57.784: W/System.err(6738): at libcore.io.IoBridge.recvfrom(IoBridge.java:506)

11-10 23:20:57.784: W/System.err(6738): … 15 more

---

<div class="post-metadata">

**Author:** ![dsanjit9](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/d/ea666f/32.png) [@dsanjit9](https://forums.solar2d.com/u/dsanjit9)\
**Post date:** [November 10, 2014, 6:21pm UTC](https://forums.solar2d.com/t/loadremoteimage/329958/2 "2014-11-10T18:21:19Z")

</div>

Just noticed that it all works fine for “display.loadRemoteImage(“[http://upload.wikimedia.org/wikipedia/commons/6/6a/Tricoloring.png](http://upload.wikimedia.org/wikipedia/commons/6/6a/Tricoloring.png)”, “GET” …” .

And fails for&nbsp;&nbsp;display.loadRemoteImage(“[https://graph.facebook.com/620112803/picture](https://graph.facebook.com/620112803/picture "External link")”, “GET”,… &nbsp;.

So is it a https vs http problem ???

And when it fails there are no network errors (event.isError is false) and the image has zero dimensions…

Sanjit

---

<div class="post-metadata">

**Author:** ![rob](https://forums.solar2d.com/user_avatar/forums.solar2d.com/rob/32/4_2.png) [@rob](https://forums.solar2d.com/u/rob)\
**Post date:** [November 11, 2014, 1:43am UTC](https://forums.solar2d.com/t/loadremoteimage/329958/3 "2014-11-11T01:43:17Z")

</div>

If that’s all the log then it looks like your event handler isn’t getting called at all.&nbsp; Can you confirm all your variables like “filename”?&nbsp; What is the “root” variable?

Now one thing I noticed is that the first URL (the one you want to use) has a redirect going on.&nbsp; The URL I ended up isn’t the same as the one you entered.

---

<div class="post-metadata">

**Author:** ![dsanjit9](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/d/ea666f/32.png) [@dsanjit9](https://forums.solar2d.com/u/dsanjit9)\
**Post date:** [November 11, 2014, 2:07am UTC](https://forums.solar2d.com/t/loadremoteimage/329958/4 "2014-11-11T02:07:09Z")

</div>

My event handler is being called but the image is of zero size. Maybe indirection is causing it to fail. But it works in the simulator and all variables are correct !  
The root is the group I wanted to add it to but for testing am adding it to sceneGroup or self.view.

---

<div class="post-metadata">

**Author:** ![dsanjit9](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/d/ea666f/32.png) [@dsanjit9](https://forums.solar2d.com/u/dsanjit9)\
**Post date:** [November 11, 2014, 2:08am UTC](https://forums.solar2d.com/t/loadremoteimage/329958/5 "2014-11-11T02:08:25Z")

</div>

Also this is an extract of the complete log.

---

<div class="post-metadata">

**Author:** ![rob](https://forums.solar2d.com/user_avatar/forums.solar2d.com/rob/32/4_2.png) [@rob](https://forums.solar2d.com/u/rob)\
**Post date:** [November 11, 2014, 2:54am UTC](https://forums.solar2d.com/t/loadremoteimage/329958/6 "2014-11-11T02:54:34Z")

</div>

The log didn’t make it.

---

<div class="post-metadata">

**Author:** ![dsanjit9](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/d/ea666f/32.png) [@dsanjit9](https://forums.solar2d.com/u/dsanjit9)\
**Post date:** [November 11, 2014, 7:28am UTC](https://forums.solar2d.com/t/loadremoteimage/329958/7 "2014-11-11T07:28:43Z")

</div>

Hi Rob

The network errors in the previous log were not from Corona… so please ignore… no idea where they came from.

Here is what I did now: I used the FB SDK to retrieve the actual URL of the user’s picture. This is an absolute url and not a redirect. I then fed it to my code. Again all works well in the Simulator but on the device the call seems to succeed but the image is of size zero.

\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

local ww = h\*0.85

&nbsp; local hh = w

&nbsp; &nbsp; local xx = margin\*2 + button\_size + ww/2 +padding/2

&nbsp; &nbsp; local yy = y;&nbsp;

&nbsp; &nbsp; local filename = “download” … tostring(math.random()) … “.jpg”

url = “[[https://m.ak.fbcdn.net/profile.ak/hprofile-ak-xpf1/v/t1.0-1/c0.13.50.50/p50x50/1898067\_10152047616577804\_876002957\_n.jpg?oh=577b4f540607eb16aaf9e37e6227b0f3&oe=54EFD211&\_\_gda\_\_=1424394365\_30c2dab39230109502f30c76c53cfb6d](https://m.ak.fbcdn.net/profile.ak/hprofile-ak-xpf1/v/t1.0-1/c0.13.50.50/p50x50/1898067_10152047616577804_876002957_n.jpg?oh=577b4f540607eb16aaf9e37e6227b0f3&oe=54EFD211& __gda__ =1424394365_30c2dab39230109502f30c76c53cfb6d)”]([https://m.ak.fbcdn.net/profile.ak/hprofile-ak-xpf1/v/t1.0-1/c0.13.50.50/p50x50/1898067\_10152047616577804\_876002957\_n.jpg?oh=577b4f540607eb16aaf9e37e6227b0f3&oe=54EFD211&](https://m.ak.fbcdn.net/profile.ak/hprofile-ak-xpf1/v/t1.0-1/c0.13.50.50/p50x50/1898067_10152047616577804_876002957_n.jpg?oh=577b4f540607eb16aaf9e37e6227b0f3&oe=54EFD211&) **gda** =1424394365\_30c2dab39230109502f30c76c53cfb6d)

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; display.loadRemoteImage(url, “GET”, &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function(event)

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if ( event.isError ) then

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(“Remote image error”)

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(“Remote image ok”)

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(“RIMGG::”, event.target.contentWidth, event.target.contentHeight)

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; local pic = event.target

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --pic.alpha = 0

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --transition.to( pic, { alpha = 1 } )

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fitImage(pic, ww, hh)

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pic.x = xx

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pic.y = yy

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sceneGroup:insert(pic)

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pic:toFront()

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end,&nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; params,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; filename,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; system.TemporaryDirectory,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xx,yy

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )

\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

Now there are NO log entries indicating some network error. Just my two entries that say

“Remote image ok” &nbsp;

and

RIMGG:: 0 0&nbsp;

On the simulator it is&nbsp;

RIMGG:: 50 50

The only thing I can suspect is the “https” url. All “http” based urls work on simulator and device.

Or is it an Android specific thing where the temp file is not writable to the TemporaryDirectory ?

Am I missing something ??

Thx

Sanjit

---

<div class="post-metadata">

**Author:** ![dsanjit9](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/d/ea666f/32.png) [@dsanjit9](https://forums.solar2d.com/u/dsanjit9)\
**Post date:** [November 11, 2014, 10:30am UTC](https://forums.solar2d.com/t/loadremoteimage/329958/8 "2014-11-11T10:30:24Z")

</div>

Here is another test I did. Basically I wrote a simplified file downloader and displayed the image. I also use the lfs to look at the System.DocumentsDirectory to see if the file is indeed downloaded and is of the right size and the log output says it is. But the display.newImage just doesnt work !

Here is the simplified function:

\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

function test\_net(root)

&nbsp; &nbsp; local function networkListener( event )

&nbsp; &nbsp; &nbsp; &nbsp; print("NET RESPONSE = ", json.encode(event, {indent=true}))

&nbsp; &nbsp; &nbsp; &nbsp; if ( event.isError ) then

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print( “NETWORK:: Network error - download failed” )

&nbsp; &nbsp; &nbsp; &nbsp; elseif ( event.phase == “began” ) then

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print( “NETWORK:: Progress Phase: began” )

&nbsp; &nbsp; &nbsp; &nbsp; elseif ( event.phase == “ended” ) then

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --local filename = system.pathForFile(event.response.filename, system.DocumentsDirectory,0,0 )

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; local filename = event.response.filename

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print( “NETWORK:: Displaying response image file = " , filename, " basedir=”, event.response.baseDirectory)

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --myImage = display.newImage( filename, event.response.baseDirectory, 60, 40 )

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --myImage = display.newImage(filename, system.DocumentsDirectory, 50,50 )

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myImage = display.newImage(“helloCopy2.txt” , system.DocumentsDirectory)

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(myImage.contentWidth)

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --myImage.alpha = 0

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --transition.to( myImage, { alpha=1.0 } )

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; root:insert(myImage)

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myImage:toFront()

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; local doc\_path = system.pathForFile( “”, system.DocumentsDirectory )

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; local k=1;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for file in lfs.dir(doc\_path) do

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--file is the current file or directory name

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;local attr = lfs.attributes(system.pathForFile(file, system.DocumentsDirectory ))

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;print(k, "Found file: " … file, " ", json.encode(attr) )

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;k = k + 1

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end

&nbsp; &nbsp; &nbsp; &nbsp; end

&nbsp; &nbsp; end

&nbsp; &nbsp; local params = {}

&nbsp; &nbsp; headers = {

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [“User-Agent”] = “Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0”,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [“Content-Type”] = “image/jpg”,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [“accept”] = “\*/\*”,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [“accept-charset”] = “\*”,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [“Accept-Language”]= “en-US,en;q=0.5”,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [“Accept-Encoding”] = “gzip, deflate”,

&nbsp; &nbsp; &nbsp; &nbsp; }

&nbsp; &nbsp; params.progress = true

&nbsp; &nbsp;&nbsp;

&nbsp; &nbsp; params.headers = headers

&nbsp; &nbsp;&nbsp;

&nbsp; &nbsp; network.download(

&nbsp; &nbsp; &nbsp; &nbsp; – THE FIRST URL WORKS ALWAYS BUT THE SECOND DOES NOT WORK ON THE DEVICE !!

&nbsp; &nbsp; &nbsp; &nbsp; --"[http://docs.coronalabs.com/images/simulator/image-mask-base2.png",&nbsp;](http://docs.coronalabs.com/images/simulator/image-mask-base2.png)

&nbsp; &nbsp; &nbsp; &nbsp; “[[https://m.ak.fbcdn.net/profile.ak/hprofile-ak-xpf1/v/t1.0-1/c0.13.50.50/p50x50/1898067\_10152047616577804\_876002957\_n.jpg?oh=577b4f540607eb16aaf9e37e6227b0f3&oe=54EFD211&\_\_gda\_\_=1424394365\_30c2dab39230109502f30c76c53cfb6d](https://m.ak.fbcdn.net/profile.ak/hprofile-ak-xpf1/v/t1.0-1/c0.13.50.50/p50x50/1898067_10152047616577804_876002957_n.jpg?oh=577b4f540607eb16aaf9e37e6227b0f3&oe=54EFD211& __gda__ =1424394365_30c2dab39230109502f30c76c53cfb6d)”,]([https://m.ak.fbcdn.net/profile.ak/hprofile-ak-xpf1/v/t1.0-1/c0.13.50.50/p50x50/1898067\_10152047616577804\_876002957\_n.jpg?oh=577b4f540607eb16aaf9e37e6227b0f3&oe=54EFD211&](https://m.ak.fbcdn.net/profile.ak/hprofile-ak-xpf1/v/t1.0-1/c0.13.50.50/p50x50/1898067_10152047616577804_876002957_n.jpg?oh=577b4f540607eb16aaf9e37e6227b0f3&oe=54EFD211&) **gda** =1424394365\_30c2dab39230109502f30c76c53cfb6d)

&nbsp; &nbsp; &nbsp; &nbsp; “GET”,

&nbsp; &nbsp; &nbsp; &nbsp; networkListener,

&nbsp; &nbsp; &nbsp; &nbsp; params,

&nbsp; &nbsp; &nbsp; &nbsp; “helloCopy2.txt”,

&nbsp; &nbsp; &nbsp; &nbsp; system.DocumentsDirectory

&nbsp; &nbsp; )

end&nbsp;

\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

And here is the dump

11-11 15:40:58.114: I/Corona(13803): NET RESPONSE = {

11-11 15:40:58.114: I/Corona(13803): &nbsp; “responseHeaders”:{

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “Access-Control-Allow-Origin”:"\*",

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “Content-Length”:“1384”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “X-Android-Response-Source”:“NETWORK 200”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “Date”:“Tue, 11 Nov 2014 10:10:59 GMT”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “X-Android-Sent-Millis”:“1415700657608”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “Timing-Allow-Origin”:"\*",

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “Expires”:“Tue, 25 Nov 2014 10:10:59 GMT”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “X-Android-Selected-Transport”:“http/1.1”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “Cache-Control”:“no-transform, max-age=1209600”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “Last-Modified”:“Tue, 25 Feb 2014 19:34:28 GMT”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “X-Android-Received-Millis”:“1415700658111”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “Content-Type”:“image/jpeg”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “HTTP-STATUS-LINE”:“HTTP/1.1 200 OK”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “Connection”:“keep-alive”

11-11 15:40:58.114: I/Corona(13803): &nbsp; },

11-11 15:40:58.114: I/Corona(13803): &nbsp; “phase”:“began”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; “bytesEstimated”:1384,

11-11 15:40:58.114: I/Corona(13803): &nbsp; “name”:“networkRequest”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; “bytesTransferred”:0,

11-11 15:40:58.114: I/Corona(13803): &nbsp; “status”:200,

11-11 15:40:58.114: I/Corona(13803): &nbsp; “url”:"[[https://m.ak.fbcdn.net/profile.ak/hprofile-ak-xpf1/v/t1.0-1/c0.13.50.50/p50x50/1898067\_10152047616577804\_876002957\_n.jpg?oh=577b4f540607eb16aaf9e37e6227b0f3&oe=54EFD211&\_\_gda\_\_=1424394365\_30c2dab39230109502f30c76c53cfb6d](https://m.ak.fbcdn.net/profile.ak/hprofile-ak-xpf1/v/t1.0-1/c0.13.50.50/p50x50/1898067_10152047616577804_876002957_n.jpg?oh=577b4f540607eb16aaf9e37e6227b0f3&oe=54EFD211& __gda__ =1424394365_30c2dab39230109502f30c76c53cfb6d)",]([https://m.ak.fbcdn.net/profile.ak/hprofile-ak-xpf1/v/t1.0-1/c0.13.50.50/p50x50/1898067\_10152047616577804\_876002957\_n.jpg?oh=577b4f540607eb16aaf9e37e6227b0f3&oe=54EFD211&](https://m.ak.fbcdn.net/profile.ak/hprofile-ak-xpf1/v/t1.0-1/c0.13.50.50/p50x50/1898067_10152047616577804_876002957_n.jpg?oh=577b4f540607eb16aaf9e37e6227b0f3&oe=54EFD211&) **gda** =1424394365\_30c2dab39230109502f30c76c53cfb6d)

11-11 15:40:58.114: I/Corona(13803): &nbsp; “isError”:false,

11-11 15:40:58.114: I/Corona(13803): &nbsp; “requestId”:"\<type ‘userdata’ is not supported by JSON.\>"

11-11 15:40:58.114: I/Corona(13803): }

11-11 15:40:58.114: I/Corona(13803): NETWORK:: Progress Phase: began

11-11 15:40:58.114: I/Corona(13803): NET RESPONSE = {

11-11 15:40:58.114: I/Corona(13803): &nbsp; “responseHeaders”:{

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “Access-Control-Allow-Origin”:"\*",

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “Content-Length”:“1384”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “X-Android-Response-Source”:“NETWORK 200”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “Date”:“Tue, 11 Nov 2014 10:10:59 GMT”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “X-Android-Sent-Millis”:“1415700657608”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “Timing-Allow-Origin”:"\*",

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “Expires”:“Tue, 25 Nov 2014 10:10:59 GMT”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “X-Android-Selected-Transport”:“http/1.1”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “Cache-Control”:“no-transform, max-age=1209600”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “Last-Modified”:“Tue, 25 Feb 2014 19:34:28 GMT”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “X-Android-Received-Millis”:“1415700658111”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “Content-Type”:“image/jpeg”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “HTTP-STATUS-LINE”:“HTTP/1.1 200 OK”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “Connection”:“keep-alive”

11-11 15:40:58.114: I/Corona(13803): &nbsp; },

11-11 15:40:58.114: I/Corona(13803): &nbsp; “phase”:“progress”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; “bytesEstimated”:1384,

11-11 15:40:58.114: I/Corona(13803): &nbsp; “name”:“networkRequest”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; “bytesTransferred”:1024,

11-11 15:40:58.114: I/Corona(13803): &nbsp; “status”:200,

11-11 15:40:58.114: I/Corona(13803): &nbsp; “url”:"[[https://m.ak.fbcdn.net/profile.ak/hprofile-ak-xpf1/v/t1.0-1/c0.13.50.50/p50x50/1898067\_10152047616577804\_876002957\_n.jpg?oh=577b4f540607eb16aaf9e37e6227b0f3&oe=54EFD211&\_\_gda\_\_=1424394365\_30c2dab39230109502f30c76c53cfb6d](https://m.ak.fbcdn.net/profile.ak/hprofile-ak-xpf1/v/t1.0-1/c0.13.50.50/p50x50/1898067_10152047616577804_876002957_n.jpg?oh=577b4f540607eb16aaf9e37e6227b0f3&oe=54EFD211& __gda__ =1424394365_30c2dab39230109502f30c76c53cfb6d)",]([https://m.ak.fbcdn.net/profile.ak/hprofile-ak-xpf1/v/t1.0-1/c0.13.50.50/p50x50/1898067\_10152047616577804\_876002957\_n.jpg?oh=577b4f540607eb16aaf9e37e6227b0f3&oe=54EFD211&](https://m.ak.fbcdn.net/profile.ak/hprofile-ak-xpf1/v/t1.0-1/c0.13.50.50/p50x50/1898067_10152047616577804_876002957_n.jpg?oh=577b4f540607eb16aaf9e37e6227b0f3&oe=54EFD211&) **gda** =1424394365\_30c2dab39230109502f30c76c53cfb6d)

11-11 15:40:58.114: I/Corona(13803): &nbsp; “isError”:false,

11-11 15:40:58.114: I/Corona(13803): &nbsp; “requestId”:"\<type ‘userdata’ is not supported by JSON.\>"

11-11 15:40:58.114: I/Corona(13803): }

11-11 15:40:58.114: I/Corona(13803): NET RESPONSE = {

11-11 15:40:58.114: I/Corona(13803): &nbsp; “responseHeaders”:{

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “Access-Control-Allow-Origin”:"\*",

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “Content-Length”:“1384”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “X-Android-Response-Source”:“NETWORK 200”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “Date”:“Tue, 11 Nov 2014 10:10:59 GMT”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “X-Android-Sent-Millis”:“1415700657608”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “Timing-Allow-Origin”:"\*",

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “Expires”:“Tue, 25 Nov 2014 10:10:59 GMT”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “X-Android-Selected-Transport”:“http/1.1”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “Cache-Control”:“no-transform, max-age=1209600”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “Last-Modified”:“Tue, 25 Feb 2014 19:34:28 GMT”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “X-Android-Received-Millis”:“1415700658111”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “Content-Type”:“image/jpeg”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “HTTP-STATUS-LINE”:“HTTP/1.1 200 OK”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “Connection”:“keep-alive”

11-11 15:40:58.114: I/Corona(13803): &nbsp; },

11-11 15:40:58.114: I/Corona(13803): &nbsp; “responseType”:“binary”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; “phase”:“ended”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; “bytesEstimated”:1384,

11-11 15:40:58.114: I/Corona(13803): &nbsp; “response”:{

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “fullPath”:"/data/data/com.sanjit.signtist/app\_data/helloCopy2.txt",

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “filename”:“helloCopy2.txt”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; &nbsp; “baseDirectory”:"\<type ‘userdata’ is not supported by JSON.\>"

11-11 15:40:58.114: I/Corona(13803): &nbsp; },

11-11 15:40:58.114: I/Corona(13803): &nbsp; “name”:“networkRequest”,

11-11 15:40:58.114: I/Corona(13803): &nbsp; “bytesTransferred”:1384,

11-11 15:40:58.114: I/Corona(13803): &nbsp; “status”:200,

11-11 15:40:58.114: I/Corona(13803): &nbsp; “url”:"[[https://m.ak.fbcdn.net/profile.ak/hprofile-ak-xpf1/v/t1.0-1/c0.13.50.50/p50x50/1898067\_10152047616577804\_876002957\_n.jpg?oh=577b4f540607eb16aaf9e37e6227b0f3&oe=54EFD211&\_\_gda\_\_=1424394365\_30c2dab39230109502f30c76c53cfb6d](https://m.ak.fbcdn.net/profile.ak/hprofile-ak-xpf1/v/t1.0-1/c0.13.50.50/p50x50/1898067_10152047616577804_876002957_n.jpg?oh=577b4f540607eb16aaf9e37e6227b0f3&oe=54EFD211& __gda__ =1424394365_30c2dab39230109502f30c76c53cfb6d)",]([https://m.ak.fbcdn.net/profile.ak/hprofile-ak-xpf1/v/t1.0-1/c0.13.50.50/p50x50/1898067\_10152047616577804\_876002957\_n.jpg?oh=577b4f540607eb16aaf9e37e6227b0f3&oe=54EFD211&](https://m.ak.fbcdn.net/profile.ak/hprofile-ak-xpf1/v/t1.0-1/c0.13.50.50/p50x50/1898067_10152047616577804_876002957_n.jpg?oh=577b4f540607eb16aaf9e37e6227b0f3&oe=54EFD211&) **gda** =1424394365\_30c2dab39230109502f30c76c53cfb6d)

11-11 15:40:58.114: I/Corona(13803): &nbsp; “isError”:false,

11-11 15:40:58.114: I/Corona(13803): &nbsp; “requestId”:"\<type ‘userdata’ is not supported by JSON.\>"

11-11 15:40:58.114: I/Corona(13803): }

11-11 15:40:58.114: I/Corona(13803): NETWORK:: Displaying response image file = helloCopy2.txt basedir= userdata: 0x79729b71

11-11 15:40:58.124: I/Corona(13803): 0

11-11 15:40:58.124: I/Corona(13803): 1 Found file: . {“dev”:45852,“change”:1415700658,“access”:1415443286,“rdev”:0,“nlink”:2,“blksize”:4096,“permissions”:“rwxrwx–x”,“uid”:10213,“blocks”:8,“gid”:10213,“ino”:203833,“mode”:“directory”,“modification”:1415700658,“size”:4096}

11-11 15:40:58.124: I/Corona(13803): 2 Found file: … {“dev”:45852,“change”:1415700590,“access”:1415443275,“rdev”:0,“nlink”:7,“blksize”:4096,“permissions”:“rwxr-x–x”,“uid”:10213,“blocks”:8,“gid”:10213,“ino”:203790,“mode”:“directory”,“modification”:1415700590,“size”:4096}

11-11 15:40:58.124: I/Corona(13803): 3 Found file: helloCopy2.txt {“dev”:45852,“change”:1415700658,“access”:1415700658,“rdev”:0,“nlink”:1,“blksize”:4096,“permissions”:“rw-------”,“uid”:10213,“blocks”:8,“gid”:10213,“ino”:203604,“mode”:“file”,“modification”:1415700658,“size”:1384}

\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

As you can see the&nbsp;print(myImage.contentWidth) printed 0. But the file is CLEARLY there in the directory (1384 bytes which is the correct size) !!

Please help !

Sanjit

---

<div class="post-metadata">

**Author:** ![dsanjit9](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/d/ea666f/32.png) [@dsanjit9](https://forums.solar2d.com/u/dsanjit9)\
**Post date:** [November 13, 2014, 12:59am UTC](https://forums.solar2d.com/t/loadremoteimage/329958/9 "2014-11-13T00:59:38Z")

</div>

Is this also because it’s a trial version ?

---

<div class="post-metadata">

**Author:** ![rob](https://forums.solar2d.com/user_avatar/forums.solar2d.com/rob/32/4_2.png) [@rob](https://forums.solar2d.com/u/rob)\
**Post date:** [November 14, 2014, 3:16am UTC](https://forums.solar2d.com/t/loadremoteimage/329958/10 "2014-11-14T03:16:14Z")

</div>

Is there a reason you’re naming it .txt instead of .jpg?

This shouldn’t be a “trial” issue.&nbsp; If it’s not working, it’s not working.

---

<div class="post-metadata">

**Author:** ![dsanjit9](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/d/ea666f/32.png) [@dsanjit9](https://forums.solar2d.com/u/dsanjit9)\
**Post date:** [November 14, 2014, 8:43am UTC](https://forums.solar2d.com/t/loadremoteimage/329958/11 "2014-11-14T08:43:18Z")

</div>

Yes I renamed to txt trying desparately to find out what’s wrong. Its just not working.

---

<div class="post-metadata">

**Author:** ![rob](https://forums.solar2d.com/user_avatar/forums.solar2d.com/rob/32/4_2.png) [@rob](https://forums.solar2d.com/u/rob)\
**Post date:** [November 14, 2014, 10:30pm UTC](https://forums.solar2d.com/t/loadremoteimage/329958/12 "2014-11-14T22:30:53Z")

</div>

Does it work if you build the app using Corona SDK?

What version of Corona Cards for Android are you using/

---

<div class="post-metadata">

**Author:** ![dsanjit9](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/d/ea666f/32.png) [@dsanjit9](https://forums.solar2d.com/u/dsanjit9)\
**Post date:** [November 14, 2014, 10:44pm UTC](https://forums.solar2d.com/t/loadremoteimage/329958/13 "2014-11-14T22:44:11Z")

</div>

Well, it works in the simulator from the SDK. I am using the latest trial version. How do I check the corona cards version ?

---

<div class="post-metadata">

**Author:** ![rob](https://forums.solar2d.com/user_avatar/forums.solar2d.com/rob/32/4_2.png) [@rob](https://forums.solar2d.com/u/rob)\
**Post date:** [November 14, 2014, 10:45pm UTC](https://forums.solar2d.com/t/loadremoteimage/329958/14 "2014-11-14T22:45:46Z")

</div>

You could always use the system.getInfo() API call.&nbsp; I think there is a way to get the build # from it.

Rob

---

<div class="post-metadata">

**Author:** ![dsanjit9](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/d/ea666f/32.png) [@dsanjit9](https://forums.solar2d.com/u/dsanjit9)\
**Post date:** [November 14, 2014, 10:59pm UTC](https://forums.solar2d.com/t/loadremoteimage/329958/15 "2014-11-14T22:59:27Z")

</div>

Here is the system info on my Nexus 5

11-15 04:26:18.941: I/Corona(22291): ############################################################

11-15 04:26:18.941: I/Corona(22291): SYS INFO - build = 2014.2407

11-15 04:26:18.941: I/Corona(22291): SYS INFO - architectureInfo = ARM Neon

11-15 04:26:18.941: I/Corona(22291): SYS INFO - environment = device

11-15 04:26:18.941: I/Corona(22291): SYS INFO - model = Nexus 5

11-15 04:26:18.941: I/Corona(22291): SYS INFO - platformName = Android

11-15 04:26:18.941: I/Corona(22291): SYS INFO - platformVersion = 4.4.4

11-15 04:26:18.941: I/Corona(22291): SYS INFO - version = 3.0.0

11-15 04:26:18.941: I/Corona(22291): SYS INFO - maxTextureSize = 4096

11-15 04:26:18.941: I/Corona(22291): ############################################################

And this is when I run it in the Simulator

############################################################

SYS INFO - build = &nbsp; &nbsp; &nbsp;2014.2393

SYS INFO - architectureInfo = &nbsp; x64

SYS INFO - environment = &nbsp; &nbsp; &nbsp; &nbsp;simulator

SYS INFO - model = &nbsp; &nbsp; &nbsp;iPhone

SYS INFO - platformName = &nbsp; &nbsp; &nbsp; Win

SYS INFO - platformVersion = &nbsp; &nbsp;6.2

SYS INFO - version = &nbsp; &nbsp;3.0.0

SYS INFO - maxTextureSize = &nbsp; &nbsp; 16384

############################################################

---

<div class="post-metadata">

**Author:** ![rob](https://forums.solar2d.com/user_avatar/forums.solar2d.com/rob/32/4_2.png) [@rob](https://forums.solar2d.com/u/rob)\
**Post date:** [November 14, 2014, 11:21pm UTC](https://forums.solar2d.com/t/loadremoteimage/329958/16 "2014-11-14T23:21:48Z")

</div>

Can I get you to put together a minimal project that will generate this issue and put it in a .zip file along with the build.settings and config.lua that goes along with it and any necessary assets and use the “Report a bug” link at the top of the page.&nbsp; Make sure to refer to this forum thread in the text of the message.

Thanks

Rob

---

<div class="post-metadata">

**Author:** ![rob](https://forums.solar2d.com/user_avatar/forums.solar2d.com/rob/32/4_2.png) [@rob](https://forums.solar2d.com/u/rob)\
**Post date:** [November 14, 2014, 11:35pm UTC](https://forums.solar2d.com/t/loadremoteimage/329958/17 "2014-11-14T23:35:10Z")

</div>

Also have you added:  
&nbsp;

&nbsp;\<uses-permission android:name=“android.permission.INTERNET”/\>

To the AndroidManifest.xml file within the \<manifest\> block?

Also keep in mind. CoronaCards is native development.&nbsp; It does not use build.settings at all.&nbsp; Anything you need from build.settings needs to happen in the project file (including supported plugin libraries, anything in the android = {} table, orientation items, etc.

If you do iOS stuff, the things in iphone = { plist = {} } } needs added to the Info.plist manually.

Rob

---

<div class="post-metadata">

**Author:** ![dsanjit9](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/d/ea666f/32.png) [@dsanjit9](https://forums.solar2d.com/u/dsanjit9)\
**Post date:** [November 15, 2014, 1:02am UTC](https://forums.solar2d.com/t/loadremoteimage/329958/18 "2014-11-15T01:02:45Z")

</div>

Yes I have the android settings done correctly as I do Facebook logins etc in native code.

---

<div class="post-metadata">

**Author:** ![dsanjit9](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/d/ea666f/32.png) [@dsanjit9](https://forums.solar2d.com/u/dsanjit9)\
**Post date:** [November 18, 2014, 7:14pm UTC](https://forums.solar2d.com/t/loadremoteimage/329958/19 "2014-11-18T19:14:54Z")

</div>

So does this mean I need to wait for the next release where this issue might be resolved ? Is there a quick fix or some other solution ?

Sanjit

---

<div class="post-metadata">

**Author:** ![rob](https://forums.solar2d.com/user_avatar/forums.solar2d.com/rob/32/4_2.png) [@rob](https://forums.solar2d.com/u/rob)\
**Post date:** [November 19, 2014, 12:56am UTC](https://forums.solar2d.com/t/loadremoteimage/329958/20 "2014-11-19T00:56:39Z")

</div>

Did you file a bug report?&nbsp; They will need your whole project.

Rob

[Next page](https://forums.solar2d.com/t/loadremoteimage/329958.md?page=2)
