Problem with websocketmultiplayerpeer returning error 1 in HTML

Godot Version

4.2.1

Question

hello, im new and i have a problem with websocketmultiplayerpeer in godot 4 and is because the create_server return error 1 and i dont have idea how to fix this, if anyone wanna help me, i very gradeful

here the script :

func _on_create_pressed():
	var error = Network.multiplayer_peer_server.create_server(Network.port, "*", CertificatedGenerator.server_tls_options)
	if error == OK:
		get_tree().get_multiplayer().multiplayer_peer = Network.multiplayer_peer_server
		Network.is_networking = true
		UPNP_setup()
		if get_tree().get_multiplayer().is_server():
			LoadScene.load_scene(self, Globals.map)
	else:
		push_error("Error creating server: " + str(error))

This may be because of the port that you selected (Network.port) is in-use or because the port is not in the range of 1024 to 49151. I’d also recommend checking the certificate for any issues.