Directional light is not casting shadows

I have a directional light in my scene and it was casting shadows at first but now I am getting this error:

Material doesn’t have a texture property ‘_ShadowMapTexture’ UnityEditor.DockArea:OnGUI()

I made a new project and that was working fine as well and after a while the same thing happen . Think it might be a bug or something. I have googled for this error but no results come up.

maybe youre using unlit shader? check quality settings too.

The material is missing the texture. You probably did not import it correctly.

Are you using a custom shader? if so, this is probably the wrong section to post, but either way… check your shader has everything set up right. also check it compiled properly.