There could be an other reason that your line feature is added as a Simple Edge and is connected on both ends, in this case if your point feature lies on the edge, it will not snap and logical GN will give error of Invalid Geometry
Make your line features as Complex Edge then you wont get this error.