When the app uses loadRemoteImage and an image is not found (which is OK, the image does not have to be there…) all the time I receive the following message in console on a yellow background:
WARNING: D:\a\corona\corona\platform\resources\init.lua:484: Failed to find image ‘user_8.png’
The listener handles errors quite well and even quits when it catches “err 404 message” generated by the server.
local function remote_image_listener_sub(event) for value_str, key_str in pairs(event.responseHeaders) do if value_str == "HTTP-STATUS-LINE" then if key_str == "HTTP/1.1 404 Not Found" then -- works well! return end end end if (event.isError) then print("545: Network error - download failed: ", event.response) -- hardly happens, but works well, too! return elseif (event.phase == "began") then print("Progress Phase: began") elseif (event.phase == "ended") then print("Progress Phase: downloaded!") -- if there is no work around HTTP-STATUS-LINE, -- then this part of code is executed. -- The absence of file name indicates that the file -- is not on the nework (err 404)! if event.response.filename == nil then display.remove(event.target) -- yep, it works well! return end -- here goes the rest of the code which -- works with the freshly downloaded image... end end
It seems like all the possible cases are handled well, but the listener still gives that message. I looked at the init.lua code, is it a bug there?