I had the same error, while the game worked fine in the editor, and in windows build, but I had an “Unknown error” on my HTML5 build.
This thread helped me understood the issue, even if my error was a bit different: https://forum.unity.com/threads/unknown-error.425412/
It seems like it is a security error, the website is not recognized as local/safe. In my case, I had put the address of the website hosting the html5 and my PHP files as https, when it was actually http only (yes, I know I have to solve this ). Changing the website address to http worked fine.