Original message (verbatim)
'Texture key already in use: ' + key
Placeholders such as %s / %d are kept verbatim from the engine source and are not replaced with concrete values.
Trigger
The same key is reused to call this.load.image/atlas/spritesheet in the preload of two scenes that run simultaneously or are re-entered, or after a page refresh the asset cache is not cleared and the same key is loaded again.
Typical cause
TextureManager.checkKey finds the key already exists in the texture list, refuses to silently overwrite the existing texture, returns false and logs the error.
Step-by-step fix
- Load assets shared across scenes only once in the global preload.
- Before loading, check this.textures.exists(key); if a reload is truly needed, call this.textures.remove(key) first.
- Avoid registering the same asset key repeatedly across multiple scenes with active:true.
Source links
- https://raw.githubusercontent.com/photonstorm/phaser/master/src/textures/TextureManager.js
- https://stackoverflow.com/questions/58238288
- https://stackoverflow.com/questions/62299346
Per-entry sources and capture date are listed at /sources#P02.
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.
Back to the all-errors index Checkout and buy the Pro pack — $19.00