Skip to content

[HTML5] Preloader reports "Error loading asset" with { error: null, responseData: null } for assets that exist and return 200 OK #2052

Description

@hopewise

Description

The Lime preloader intermittently fails to load image assets during preloading on the HTML5 target, even though the assets are confirmed to be available
and served correctly from the CDN (HTTP 200, valid PNG data, proper CORS headers with Access-Control-Allow-Origin: *).

Error Output

[lime.utils.Preloader] ERROR: Error loading asset "assets/html/led.png": {
error : null,
responseData : null
}

Multiple assets fail simultaneously:

assets/html/led.png
assets/html/lamp_outer2.png
assets/html/lamp_shine10.png
assets/lamp_glow.png

Environment

Lime: 8.3.0
OpenFL: 9.5.0
Target: HTML5
Browser: Chrome 147.0.0
OS: Windows >=10
Embed config: Assets loaded cross-origin from CDN with rootPath pointing to a remote URL

Reproduction

Build an OpenFL app with multiple image assets configured as preload="true" in project.xml
Serve the built app from a CDN (cross-origin) with proper CORS headers
The preloader loads assets via HTML5HTTPRequest.__loadImage() which uses JavaScript Image objects with crossOrigin = "Anonymous"
Intermittently, some image assets fail to load with null error details
Verified Not a Server/CDN Issue

All failing assets return HTTP 200 with valid PNG image data
CORS headers are present: Access-Control-Allow-Origin: *
Content-Type header is application/octet-stream (not image/png) — this could be a factor

Downloads complete successfully when tested with curl

Is this a known issue? Any advice on how to handle or work around this intermittent failure?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions