Well, You’ll have to locate where in the code the error is coming from and your current error log isn’t providing much details, so the easiest way is to tear down your code.
Just comment some suspicious parts of the code and see at what point the error “disappears”. Then you can “move on”…