question

Aphix avatar image
Aphix asked

Unreal Engine Client Log In Crash,Unreal Engine Crash on Client Login

Every other time my user logs in, unreal engine crashes with this error

```

Assertion failed: DeveloperSecretKey.Len() == 0 || ClientSessionTicket.Len() == 0 [File:D:\.....Playfab\PlayfabPlayground1\Plugins\PlayFabPlugin\PlayFab\Source\PlayFabCommon/Public/PlayFabAuthenticationContext.h] [Line: 128] For title security, you cannot set the DeveloperSecretKey on a process which uses a Client Login

```

I don't see how the dev secret key is being exposed to clients and I'm unsure what to do at this point. It happens every time, no more no less, which is really strange. I am running both registering and logging in via server rpc's. When ue4 doesn't crash, the Login is successful, meaning that my core logic works fine.

,

Every other time my user logs in, unreal engine crashes, giving me this error:
```

Assertion failed: DeveloperSecretKey.Len() == 0 || ClientSessionTicket.Len() == 0 [File:D:\.....Playfab\PlayfabPlayground1\Plugins\PlayFabPlugin\PlayFab\Source\PlayFabCommon/Public/PlayFabAuthenticationContext.h] [Line: 128] For title security, you cannot set the DeveloperSecretKey on a process which uses a Client Login

```

I'm not sure how to prevent this from happening, as I see no reason why the dev secret key would be exposed to the client. I am running the login on the server.

unreal
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Aphix avatar image
Aphix answered

I fixed this issue by making the secret dev key blank by default and setting it after a player logs in via a server rpc call.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Keith K avatar image Keith K commented ·

@Aphix Can you explain what technique you used to do that please?

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang Keith K commented ·

For clarification, this crash is by design. Please note, in our design, the Developer Secret Key and Client Session Ticket shouldn't be used at the same time, calling Server APIs and Admin APIs on the clients, or call the Client APIs on the server-side could both cause errors.

Since Client API is designed for players, calling Client API on the server side may cause the limit to be exceeded. Adding Developer Secret Key on the client side means giving players the access to call all management API, if so, it will be quite easy for players to cheat.

So, we add a checkf method to the Marketplace plugin to prevent the potential issues caused by the improper API calls.

We suggest you remove all Developer Secret Key from your client to fix this issue. If you are developing a server, please try to use the Server APIs to replace the corresponding Client APIs instead of calling the Client APIs directly on the server.

0 Likes 0 ·
Luke Thomas Youngs avatar image
Luke Thomas Youngs answered

If you're trying to do something like below and getting this crash which prevents testing login and join functionality in unreal.

Editor Settings -> Multiplayer -> Run Under One Process (Disable)

What's happening is unreal, by default launches the server and client from a single engine instance,
this will trigger a crash if you set the Secret Key and then start making Client Api Calls.

Just make sure you actualy remember to remove the Secret Key from client builds.


,

If your trying to do something like below and getting this crash which is preventing you from testing login and join functionality in unreal you need to disable "Run Under One Process" from the editor settings.

What's happening is Unreal PIE is running the server and client from one instance of the engine which triggers this Playfab failsafe crash when you set the Secret Key and then start making client Api calls from that single instance.

Editor Settings -> Multiplayer -> Run Under One Process (Disable)


10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.