Getting ssl error on IsFriendWith() method

The title says it all.

image

Code

image

2 Likes

Yeah, I got that issue too. It seems to occur if you call isFriendsWith when a player has just joined. Try wrapping your request in a pcall, as it can error.

2 Likes

What method does Roblox use on their chat system?

1 Like

Like this?

I’m pretty sure they use isFriendsWith or some similar RobloxSecurity function. Since this is technically a web call, I recommend using a pcall and doing while not success pcall again wait

2 Likes

The second part should be if success, otherwise it will never run. You might also want to retry the request if it fails.

2 Likes

You could repeatedly attempt to perform the IsFriendWith() until the pcall indicates there isn’t an error anymore. Perhaps instate an arbitrary limit (10? should be more than enough) with some sort of waiting backoff system.

SslConnectFail indicates that the agent can’t connect to an SSL-enabled website, so wouldn’t this just return a fail each time it is called? I don’t believe in repeatedly calling a web API if the endpoint is down or can’t connect.

From the other response in this thread, it seems that the SSL error is associated with a user joining too early before some sort of internal ROBLOX service is fully initialized. By repeatedly calling it with some sort of backing off strategy and delay, you increase the likelihood of having a successful event.

When you start developing for network redundancy, you usually want to build in some sort of retransmission mechanism. This is widely implemented in a lot of networking applications and at multiple levels in the network, as retrying is a pretty simple yet effective solution for network error handling. Just like in life, if you fail then try again!

If you are new to this concept, here is a pretty good blog with some good examples of when to (and when not to) use retrying in a variety of applications, http://allyouneedisbackend.com/blog/2017/09/15/how-backend-software-should-retry-on-failures

2 Likes