Serveral MDM commands are failing


Most of the commands sent to the device from MDM is returning Server session invalidated.

Some of these commands are Settings, Installed Application List, Security Info, Install Application etc…

The device gives the following error for setting command:>

> <key>Settings</key>
> <array>
>     <dict>
>         <key>Item</key>
>         <string>Wallpaper</string>
>         <key>Status</key>
>         <string>Acknowledged</string>
>     </dict>
>     <dict>
>         <key>ErrorChain</key>
>         <array>
>             <dict>
>                 <key>ErrorCode</key>
>                 <integer>502</integer>
>                 <key>ErrorDomain</key>
>                 <string>Catalyst.error</string>
>                 <key>LocalizedDescription</key>
>                 <string>Server session invalidated.</string>
>             </dict>
>         </array>
>         <key>Item</key>
>         <string>Wallpaper</string>
>         <key>Status</key>
>         <string>Error</string>
>     </dict>
> </array>
> <key>Status</key>
> <string>Acknowledged</string>

Have anyone encountered the same problem?


I would suggest capturing the device Xcode logs they might provide a bit more insight into what is going on.



Are you trying to install a Wallpaper ? If i remember this is available for supervised device. Is it the case for your device ?


We have checked the device logs too. We have attached the device log for reference.

testlog.xml (12.7 KB)

In the device logs, we noticed the following exceeded mem limit: InactiveHard 10 MB (fatal)

But the size of the wallpaper image in settings command is only 300 kb each.

For other commands also we are getting the Server Session Invalidated Error.


from MDM side, do you also see the error 502 ?


Yes, error attached in the post is from the device to the MDM Command response. These commands are tired out in the supervised devices. Other than settings command some other commands like Installed Application List, Security Info also failing with the Server Session Invalidated Error.


Yes, but these logs are from Device side. That why you should check from your MDM Server if you also see this error. In order to know if this is due to a response from your MDM Server or an other network equipment.

What is your MDM ?


From mdm server, Settings command is sent to the device. Device checks in with the error code 502 to the MDM server. At the time of this error , we checked device logs in MAC. We are getting mem limit reached


One idea is to use an empirical approach to isolate the reason for this issue. Start with smaller jpg files, e.g., 5K, 10K, 50K, 100K. Find what is the threshold file size for this problem to occur. It could be due to a specific jpg file.

Also, if other commands fail, do they fail due to the same memory limit exceeded reason?


Hi @fahath

I took a look at the same issue some time back and came to the conclusion that this type of profile can only be created by an EMM.

After deploying from a couple of EMM’s I noticed the image was being stored on the server and only referenced in the profile. I will try and find some data to back this statement.