19
Views
4
Comments
[MSAL Plugin] Failed to deserialize JSON to MSALAccountList: Could not convert 'OK' to List
msal-plugin
Mobile icon
Forge asset by Walter Robins
Application Type
Mobile

Hi Community,

I'm encountering a recurring error in my production logs: "Failed to deserialize JSON to MSALAccountList: Could not convert 'OK' to List." This issue is arising in a mobile application where I'm utilizing the MSAL plugin, specifically the MSAL Plugin component from Forge version 3.0.0.

Given the frequency of this error, I'm urgently seeking a solution. If anyone has encountered and resolved a similar issue, I would greatly appreciate your insights and suggestions on how to address it effectively.
Also, have gone through with some post similar to this issue but unable to get any solution.


regards,

2023-12-19 16-46-19
Castro Vieira

The plugin now uses the Android MSAL 4.9.x library in compilationThe plugin no longer supports client and tenant IDs provided in the extensibility configuration. Instead of providing them at compile time, provide them at run time when calling MsalInit.When removing the CLIENT_ID and TENANT_ID variables from your extensibility configuration (only your KEY_HASH variable should be there now if targeting Android, otherwise remove your custom LifeTime extensibility configuration entirely to make it easier to update in the future), also update the plugin URL to "https://github.com/wrobins/cordova-plugin-msal.git#v4.0.1".

2022-12-23 05-00-54
Sandip Saha

Thanks for your quick response,

could you please confirm if I need to change the Extensibility Config from custom to default in the lifetime? And please give an ideal configuration as an example if possible.

Also, are there any consequences of updating the plugin url.

2015-09-02 13-43-32
Walter Robins

Hello!

These days, it's best to simply switch to "https://github.com/wrobins/cordova-plugin-msal.git", or "https://github.com/wrobins/cordova-plugin-msal.git#v4.1.1" in your config as they include some additional bugfixes. I will update the forge component soon with this documentation.

You should keep your custom configuration in LifeTime as your HEY_HASH variable will still need to be there; you're only removing the TENANT_ID and CLIENT_ID variables, so your configuration will now look something like:

{

     "plugin": {

          "url": "https://github.com/wrobins/cordova-plugin-msal.git",

          "variables": [

               {

                    "name": "KEY_HASH",

                    "value": "S0m3K3yh4shH3re="

               }

          ]

     }

}


Just remember to replace the KEY_HASH value with your own. There are no other consequences for updating the plugin URL - no other breaking changes are present.

UserImage.jpg
Nico P

This issue still happens inconsistently. We're already using the latest version of the plugin, v4.1.1. Would gladly appreciate any help.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.