question

brian@things.inc avatar image
brian@things.inc asked

Playfab Login fails on webgl unity builds,Unity webgl json error on LoginWithCustomId

LoginWithCustomId fails in webgl builds (safari, firefox). iOS and Unity editor are fine.
Unity 2021.2.6


This is the error:
RuntimeError: call_indirect to a null table entry (evaluating 'asm[name].apply(null, arguments)'),<?>.wasm-function[PocoJsonSerializerStrategy_DeserializeObject_m9DAD07AB9333468D5544C71DBAE25EBD48455B49]@[wasm code] <?>.wasm-function[PlayFabSimpleJsonCuztomization_DeserializeObject

,

Everything is fine in editor, iOS builds.

WebGL builds using playfab fail on Login - with this message:
Unity 2021.2.6f1, latest playfab. Again, works fine in builds.


Any ideas?

RuntimeError: call_indirect to a null table entry (evaluating 'asm[name].apply(null, arguments)'),<?>.wasm-function[PocoJsonSerializerStrategy_DeserializeObject_m9DAD07AB9333468D5544C71DBAE25EBD48455B49]@[wasm code] <?>.wasm-function[PlayFabSimpleJsonCuztomization_DeserializeObject

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.

brian@things.inc avatar image brian@things.inc commented ·

After a bunch of printf debug fun, I've tracked this down:

In simpleJson.cs obj = ConstructorCache[type](); is null, with type, PlayFab.SharedModels.HttpResponseObject

There is no null check, so this explodes.

I don't know why the constructor cache for this object is not initialized in webgl builds, however.

0 Likes 0 ·
brian@things.inc avatar image brian@things.inc commented ·

Resolved by disabling build stripping.

0 Likes 0 ·

1 Answer

·
Seth Du avatar image
Seth Du answered

PlayFab SDK uses plenty of reflection. When the stripping level is aggressive, it is possible to be unable to locate required classes. I will mark this thread as solved. If you have any other questions, feel free to send a new thread. Thanks for your understanding.

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.