Missing cached shadermap for WorldGridMaterial In Metal

[UE] Fatal error: [File:./Runtime/Engine/Private/Materials/MaterialShared.cpp] [Line: 2802]

Failed to find shader map for default material WorldGridMaterial(/Engine/EngineMaterials/WorldGridMaterial.WorldGridMaterial)! Please make sure cooking was successful (No inline shaders, null GTSM)

image

When I connect an IOS device in XCode and run it as DebugGame, I cannot proceed because of the Assert statement in that line.
I’m using the 5.3.2 engine.

How Can I Fix it?

We had the same issue except that we got the error when running Development builds. For us this only happens when we have chunk generation turned on when packaging (still trying to figure out why). Turning it off in DefaultGame.ini solved the issue for us:

[/Script/UnrealEd.ProjectPackagingSettings]
bGenerateChunks=False
[/Script/Engine.AssetManagerSettings]
bShareMaterialShaderCode=False

I solved it in the following way.

Also, even if I changed the ini file on Mac, it was not applied, so I had to go through the packaging process again for it to be applied.

Interesting! There does seem to be a lot of different cases that would trigger this error.