invalid socket, is a client error , you run classic interlude files of mobius but which classic protocol are they, maybe isnt the 746 that is normal interlude and is different?
its pretty obvious that you already say whats wrong and it is indeed the wrong but , you do not see it.. when the error is super clear!
as the friend above said, you are not parsing the html so it gives you "empty" or "faulty" html as main cause it doesnt even exist!
the refering npc is string lenght, so either u edited something badly in html or the size is too big to handle from the client, and propably yan made some customizations to accept bigger size? if also the path is wrong that should be a problem aswell