Forum Multiplayer Error: Blocked loading mixed active content

Discussion and help relating to the PlayerIO Multiplayer API.

Error: Blocked loading mixed active content

Postby ddabrahim » February 11th, 2018, 6:35 pm

Hi.

I'm only getting started with PlayerIO and I made a simple chat app using the Javascript SDK. It works on my PC running in Firefox with both the development server and the online server but when I upload it to itch.io and try to run it I get the following error message:

Code: Select all
Error: GeneralError - Error talking to webservice: {"isTrusted":true}
Blocked loading mixed active content "http://api.playerio.com/json/"


I did a search for the error and it seems like the problem is that itch.io is using https connection while PlayerIO is trying to access the above link through http. Unfortunately it can not be changed on itch.io to my knowledge.
I have also tried gamejolt, which is allow me to switch to http and it works there, but I would prefer itch.io

Anyone could help me please how to solve this problem on itch.io? Would it be possible to change that link in the SDK to use https instead of http?

I would appreciate any help.

Thank you.
ddabrahim
 
Posts: 3
Joined: February 10th, 2018, 1:49 pm

Re: Error: Blocked loading mixed active content

Postby Henrik » February 13th, 2018, 7:59 pm

Hey ddabrahim,

Yes, you can tell PlayerIO to use secure websockets as well as secure api requests if your game is hosted on an https page.

https://playerio.com/documentation/refe ... onnections

https://playerio.com/documentation/refe ... piRequests

Simply set these two properties to true, and your game will be 100% https.
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Error: Blocked loading mixed active content

Postby ddabrahim » February 14th, 2018, 10:31 am

Thank you, I tried the commands but then I get the following error message:

Code: Select all
Unable to connect to endpoint: gs48.playerio.com:80. reason: "SecurityError: The operation is insecure."
Unable to connect to endpoint: gs48.playerio.com:443. reason: "SecurityError: The operation is insecure."
Unable to connect to endpoint: gs48.playerio.com:53. reason: "SecurityError: The operation is insecure."
Unable to connect to endpoint: gs48.playerio.com:911. reason: "SecurityError: The operation is insecure."
Unable to connect to endpoint: gs48.playerio.com:1200. reason: "SecurityError: The operation is insecure."
Unable to connect to endpoint: gs48.playerio.com:4505. reason: "SecurityError: The operation is insecure."
Unable to connect to endpoint: gs48.playerio.com:8184. reason: "SecurityError: The operation is insecure."
Unable to connect to endpoint: gs48.playerio.com:27000. reason: "SecurityError: The operation is insecure.". No more endpoints to try.
Error: GeneralError - Could not establish a socket connection to any of the given endpoints for the room


I tried to search the forum to see if anyone had similar problem but didn't find any solution. I'm not sure if the problem is on my side or something between itch.io and PlayerIO?
Is there anything I can do about it?

Thank you.
ddabrahim
 
Posts: 3
Joined: February 10th, 2018, 1:49 pm

Re: Error: Blocked loading mixed active content

Postby Henrik » February 14th, 2018, 11:05 am

If you check the network tab in your browser inspector, what's the request URL for the websocket connections?
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Error: Blocked loading mixed active content

Postby ddabrahim » February 14th, 2018, 1:02 pm

Sorry, it was my mistake. I was using wrong syntax for setting useSecureConnection to true it didn't throw me an error but the websocket connection was not secure after all.
Fixed it and It works now.

Thanks a lot :)
ddabrahim
 
Posts: 3
Joined: February 10th, 2018, 1:49 pm


Return to Multiplayer



cron