Home / Phaser / P09

Phaser error: 'Invalid atlas json, frame already exists: ' + key — cause and fix

Two frame keys with the same name appear in the frames of a Hash-format atlas JSON, or the

ID
P09
Engine
Phaser
Verification
源码原文(src/textures/parsers/JSONHash.js:56)
Frequency
未公开

Original message (verbatim)

'Invalid atlas json, frame already exists: ' + key

Placeholders such as %s / %d are kept verbatim from the engine source and are not replaced with concrete values.

Trigger

Two frame keys with the same name appear in the frames of a Hash-format atlas JSON, or the same atlas is loaded twice causing frame key conflicts.

Typical cause

texture.add(key, ...) returns null for an existing frame name; the parser skips that frame and warns, so the duplicate frame never enters the Texture.

Step-by-step fix

  1. Rename duplicate frames in the atlas packing tool.
  2. Remove the old texture before loading.
  3. Check whether two atlas JSONs were registered to the same texture key.

Source links

Per-entry sources and capture date are listed at /sources#P09.

Related errors

Related Phaser errors

Need an offline quick-reference checklist?

Atlas error library Pro pack: 123 error references (110 single + 13 merged) plus a quick-fix guide, $19 one-time purchase, delivered as electronic files.

View Pro pack / order

Back to the all-errors index Checkout and buy the Pro pack — $19.00