Mod conflicts

OptiFabric Crash: "resourceName" is null During Shader Reload

What the log looks like

java\.lang\.NullPointerException: Cannot invoke "String\.indexOf\(int\)" because "resourceName" is null
FabricShaderProgram\.rewriteAsId[\s\S]{0,250}optifabric\$modifyProgramID

How to fix it

  1. Update both OptiFabric and Fabric API to the latest builds for your Minecraft version, as newer OptiFabric releases fix several Fabric Rendering API shader hooks.
  2. Remove OptiFabric and OptiFine and use native Fabric alternatives like Sodium and Iris Shaders instead, which fully support Fabric API custom shaders.
  3. If you want to keep OptiFabric, open logs/latest.log, find the "resourceName" is null stack trace, and look just below FabricShaderProgram.<init> to identify and remove the mod registering custom shaders (commonly mods bundling LibGui such as Chest Tracker or Horse Stats Vanilla, or HUD mods like DarkKore).
LoadersFabric
SeverityStops the game
CategoryMod conflicts

Check your own log

Related errors