In minecraft I play for a long time, but this error happens for the first time. After half an hour of the game on version 1.12.2 without mods, I met a shadow without a mob. After a few seconds, this “being” simply disappeared.
After that, new mobs ceased to spawn in the world. /gamerule doMobSpawn is true. Difficulty is Easy.