GL.End requires material.SetPass before! - Error Message

Hey so I started getting this error from a custom shader I was working on so I scrapped it thinking I did something wrong and I bought an asset off the store and it had the same error message so then I created a new standard unity terrain from the editor with no custom stuff on it and the same error occurs only to go away when I deactivate the GameObject causing the error.

The console is literally no help, it just says
“GL.End requires material.SetPass before!”
and if you click on it instead of taking you to the error code it does nothing and leaves you in the editor.

I’ve also searched google for this problem, but I’m guessing either Google’s search algorithm doesn’t work (Which I don’t believe) or no one else has this problem on their Unity

Is it okay to leave this error in the game or is it a major Unity bug?

EDIT:
After some testing I found out that if I remove
GrabPass {}
from the shader code the error goes away but now I don’t have a GrabPass, it seems to be bugged?
Is there a work around for GrabPass {} in the shader code?

I switched platform to android and it solved.

Mine was using SteamVR with Unity 5.6, I solved it by rolling my project back to 5.5. I am fortunate in that I was not using any specific 5.6 only features.

Cheers

Turn off HDR checkbox on camera and it will help

Having this same issue as well and I have no idea what is causing it. I too am in the 5.6 beta, but not using any terrain or VR stuff. However it does appear that the problem is only appearing in a test scene I have where I was playing with multiple cameras, so that might be related?

As stated though the console is absolutely useless in helping you find the issue.

I am experiencing same problem.

I have the same problem.