# ViewStateSync process does not run properly

**URL:** <https://forums.plex.tv/t/viewstatesync-process-does-not-run-properly/892566>\
**Category:** Plex Media Server\
**Tags:** server-docker, server-linux-arm\
**Created:** [October 17, 2024, 2:02pm UTC](https://forums.plex.tv/t/viewstatesync-process-does-not-run-properly/892566 "2024-10-17T14:02:08Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![jean\_francois](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/jean_francois/32/326879_2.png) [@jean\_francois](https://forums.plex.tv/u/jean_francois)\
**Post date:** [October 17, 2024, 2:02pm UTC](https://forums.plex.tv/t/viewstatesync-process-does-not-run-properly/892566/1 "2024-10-17T14:02:08Z")

</div>

Server Version#: 1.41.0.8994  
Version: Docker, arm64  
Hardware: Raspberry Pi 4

Hello,  
My Plex instance refuse to sync any content since Aug 21st 2024. Scrobbles are not registered to my Plex profile, and it won’t sync watch states between server (it will not receive watched status if I watch from another server, it will not set watched on the other server if I watch on line).

If I watch content on somebody else’s server it will appear in my profile.  
Sync Watch State is ON in settings.

My logs (Plex Media Server.log) shows (This is the only instance of ViewStateSync appearing over the 5 log files):

```auto
Oct 17, 2024 13:39:34.199 [547586707680] DEBUG - [ViewStateSync] Starting
Oct 17, 2024 13:39:34.199 [547586707680] DEBUG - [ViewStateSync] Fetching user tokens
Oct 17, 2024 13:39:34.200 [547586707680] DEBUG - [ViewStateSync/HCl#4f] HTTP requesting GET https://plex.tv/api/v2/server/users/services?auth_token=xxxxxxxxxxxxxxxxxxxx
Oct 17, 2024 13:39:34.477 [547584557280] DEBUG - [HttpClient/HCl#4f] HTTP/1.1 (0.3s) 200 response from GET https://plex.tv/api/v2/server/users/services?auth_token=xxxxxxxxxxxxxxxxxxxx
Oct 17, 2024 13:39:34.481 [547575509216] DEBUG - [ViewStateSync] Got token for user 1 (jean_francois)
Oct 17, 2024 13:39:34.481 [547575509216] DEBUG - [ViewStateSync] Got token for user 26346633 (FRIEND1)
Oct 17, 2024 13:39:34.481 [547575509216] DEBUG - [ViewStateSync] Got token for user 70378230 (PARTNER)
Oct 17, 2024 13:39:34.481 [547575509216] DEBUG - [ViewStateSync/HCl#50] HTTP requesting GET https://plex.tv/api/v2/server/users/15458/view_state_sync
Oct 17, 2024 13:39:34.520 [547584557280] DEBUG - [HttpClient/HCl#50] HTTP/1.1 (0.0s) 200 response from GET https://plex.tv/api/v2/server/users/15458/view_state_sync (reused)
Oct 17, 2024 13:39:34.521 [547575509216] ERROR - Promise destroyed without handling exception: %s

```

In comparison, my partner’s server (on M1 Mac, latest Plex version) shows:

```auto
Oct 17, 2024 09:38:34.721 [0x16baf3000] DEBUG - [Req#6b825/ViewStateSync] Starting
Oct 17, 2024 09:38:34.721 [0x16baf3000] DEBUG - [Req#6b825/ViewStateSync] Fetching user tokens
Oct 17, 2024 09:38:34.722 [0x16baf3000] DEBUG - [Req#6b825/ViewStateSync/HCl#1f60] HTTP requesting GET https://plex.tv/api/v2/server/users/services?auth_token=xxxxxxxxxxxxxxxxxxxx
Oct 17, 2024 09:38:34.878 [0x16c29b000] DEBUG - [HttpClient/HCl#1f60] HTTP/1.1 (0.2s) 200 response from GET https://plex.tv/api/v2/server/users/services?auth_token=xxxxxxxxxxxxxxxxxxxx
Oct 17, 2024 09:38:34.886 [0x16bb7f000] DEBUG - [Req#6b825/ViewStateSync] Got token for user 1 (PARTNER)
Oct 17, 2024 09:38:34.886 [0x16bb7f000] DEBUG - [Req#6b825/ViewStateSync] Got token for user 15458 (ME)
Oct 17, 2024 09:38:34.886 [0x16bb7f000] DEBUG - [Req#6b825/ViewStateSync/HCl#1f61] HTTP requesting GET https://plex.tv/api/v2/server/users/70378230/view_state_sync
Oct 17, 2024 09:38:34.993 [0x16c29b000] DEBUG - [HttpClient/HCl#1f61] HTTP/1.1 (0.1s) 200 response from GET https://plex.tv/api/v2/server/users/70378230/view_state_sync (reused)
Oct 17, 2024 09:38:34.993 [0x16bb7f000] DEBUG - [Req#6b825/ViewStateSync] Starting for user 1
Oct 17, 2024 09:38:34.993 [0x16bb7f000] DEBUG - [Req#6b825/ViewStateSync] Sending state
Oct 17, 2024 09:38:34.993 [0x16bb7f000] DEBUG - [Req#6b825/ViewStateSync] All state sent
Oct 17, 2024 09:38:34.994 [0x16bb7f000] DEBUG - [Req#6b825/ViewStateSync] Getting state
Oct 17, 2024 09:38:34.994 [0x16bb7f000] DEBUG - [Req#6b825/ViewStateSync/HCl#1f62] HTTP requesting GET https://scrobbles.plex.tv/state/70378230?after=MTcyOTAzODAxMDA5My02NzBmMDZiYTdiZDA0ZGE1YmUyZGUzNzU%3D&count=100
Oct 17, 2024 09:38:35.166 [0x16c29b000] DEBUG - [HttpClient/HCl#1f62] HTTP/2.0 (0.2s) 200 response from GET https://scrobbles.plex.tv/state/70378230?after=MTcyOTAzODAxMDA5My02NzBmMDZiYTdiZDA0ZGE1YmUyZGUzNzU%3D&count=100
Oct 17, 2024 09:38:35.166 [0x16bb7f000] DEBUG - [Req#6b825/ViewStateSync] Reading 0 states
Oct 17, 2024 09:38:35.166 [0x16bb7f000] DEBUG - [Req#6b825/ViewStateSync] Done getting states
Oct 17, 2024 09:38:35.167 [0x16bb7f000] DEBUG - [Req#6b825/ViewStateSync/HCl#1f63] HTTP requesting GET https://plex.tv/api/v2/server/users/15458/view_state_sync
Oct 17, 2024 09:38:35.213 [0x16c29b000] DEBUG - [HttpClient/HCl#1f63] HTTP/1.1 (0.0s) 200 response from GET https://plex.tv/api/v2/server/users/15458/view_state_sync (reused)
Oct 17, 2024 09:38:35.213 [0x16bb7f000] DEBUG - [Req#6b825/ViewStateSync] Starting for user 15458
Oct 17, 2024 09:38:35.213 [0x16bb7f000] DEBUG - [Req#6b825/ViewStateSync] Sending state
Oct 17, 2024 09:38:35.213 [0x16bb7f000] DEBUG - [Req#6b825/ViewStateSync] All state sent
Oct 17, 2024 09:38:35.214 [0x16bb7f000] DEBUG - [Req#6b825/ViewStateSync] Getting state
Oct 17, 2024 09:38:35.214 [0x16bb7f000] DEBUG - [Req#6b825/ViewStateSync/HCl#1f64] HTTP requesting GET https://scrobbles.plex.tv/state/15458?after=MTcyOTAxODg3MjczNS02NzBlYmFmZTdiZDA0ZGE1YmUxNDk5Mjk%3D&count=100
Oct 17, 2024 09:38:35.268 [0x16c29b000] DEBUG - [HttpClient/HCl#1f64] HTTP/2.0 (0.1s) 200 response from GET https://scrobbles.plex.tv/state/15458?after=MTcyOTAxODg3MjczNS02NzBlYmFmZTdiZDA0ZGE1YmUxNDk5Mjk%3D&count=100 (reused)
Oct 17, 2024 09:38:35.268 [0x16bb7f000] DEBUG - [Req#6b825/ViewStateSync] Reading 0 states
Oct 17, 2024 09:38:35.268 [0x16bb7f000] DEBUG - [Req#6b825/ViewStateSync] Done getting states
Oct 17, 2024 09:38:35.268 [0x16bb7f000] DEBUG - [Req#6b825/ViewStateSync] Finished

```

---

<div class="post-metadata">

**Author:** ![gbooker02](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/gbooker02/32/9726_2.png) [@gbooker02](https://forums.plex.tv/u/gbooker02)\
**Post date:** [October 21, 2024, 9:25pm UTC](https://forums.plex.tv/t/viewstatesync-process-does-not-run-properly/892566/2 "2024-10-21T21:25:04Z")

</div>

Looks like the code doesn’t handle exceptions properly and when it encounters one it’ll not run VSS again until PMS is restarted. I’ll correct this in a future version. Unfortunately it doesn’t indicate what the exception actually is in the current state.

---

<div class="post-metadata">

**Author:** ![jean\_francois](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/jean_francois/32/326879_2.png) [@jean\_francois](https://forums.plex.tv/u/jean_francois)\
**Post date:** [October 22, 2024, 1:52pm UTC](https://forums.plex.tv/t/viewstatesync-process-does-not-run-properly/892566/3 "2024-10-22T13:52:10Z")

</div>

Thank you for getting back to me! Is there anything more you want me to do? Send verbose logs, database etc? I will be keeping an eye on the changes and forward anything that is needed.

---

<div class="post-metadata">

**Author:** ![solitas](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@solitas](https://forums.plex.tv/u/solitas)\
**Post date:** [November 4, 2024, 4:59pm UTC](https://forums.plex.tv/t/viewstatesync-process-does-not-run-properly/892566/4 "2024-11-04T16:59:06Z")

</div>

Just updated to `1.41.2.9134`, and that exception string still isn’t rendering

```auto
Nov 04, 2024 16:22:03.118 DEBUG - [ViewStateSync/HCl#7e] HTTP requesting GET https://p
lex.tv/api/v2/server/users/(redacted)/view_state_sync
Nov 04, 2024 16:22:03.290 DEBUG - [HttpClient/HCl#7e] HTTP/1.1 (0.2s) 200 response fro
m GET https://plex.tv/api/v2/server/users/(redacted)/view_state_sync (reused)
Nov 04, 2024 16:22:03.291 ERROR - Promise destroyed without handling exception: %s

```

---

<div class="post-metadata">

**Author:** ![solitas](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@solitas](https://forums.plex.tv/u/solitas)\
**Post date:** [November 15, 2024, 5:09am UTC](https://forums.plex.tv/t/viewstatesync-process-does-not-run-properly/892566/5 "2024-11-15T05:09:56Z")

</div>

Still seeing the same issue in `1.41.2.9200`

---

<div class="post-metadata">

**Author:** ![jean\_francois](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/jean_francois/32/326879_2.png) [@jean\_francois](https://forums.plex.tv/u/jean_francois)\
**Post date:** [November 15, 2024, 2:18pm UTC](https://forums.plex.tv/t/viewstatesync-process-does-not-run-properly/892566/6 "2024-11-15T14:18:01Z")

</div>

Yes. I’ve spun up another container to run some tests and playback does register on my profile using the newly created server, so there is something wrong in our current Plex database or something similar that is not account based.

---

<div class="post-metadata">

**Author:** ![Mythos](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@Mythos](https://forums.plex.tv/u/Mythos)\
**Post date:** [November 15, 2024, 7:34pm UTC](https://forums.plex.tv/t/viewstatesync-process-does-not-run-properly/892566/7 "2024-11-15T19:34:40Z")

</div>

Hey there, I’m having constant crashes on my NVIDIA Shield.  
The last log line is almost always related to the `ViewStateSync`.  
Could this be related as you say that the code doesn’t handle exceptions properly?

> [@Plex Server Dropping Player Connections (1.41.0.8911)](https://forums.plex.tv/t/plex-server-dropping-player-connections-1-41-0-8911/886200/39):
>
> My PLEX server on NVIDIA Shield 2919 is now no longer accessible every few days. The evening before, everything is still working, I watch a film, do absolutely nothing on the server and go to bed, then the next morning the server is no longer accessible. I then have no other option than to reset everything, which is extremely time-consuming, and set up the server again. Then it works for a few days and the same thing happens again. Apparently, some users have the same problem and the Plex de…

I’ve added the 6 latest log files from the rotation and they always end with `ViewStateSync` stuff.

[Logs.zip](https://forums.plex.tv/uploads/short-url/4yV7uZLgwgiTSA3UhzGonrKDIIw.zip) (98.5 KB)

---

<div class="post-metadata">

**Author:** ![solitas](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@solitas](https://forums.plex.tv/u/solitas)\
**Post date:** [November 22, 2024, 9:11am UTC](https://forums.plex.tv/t/viewstatesync-process-does-not-run-properly/892566/8 "2024-11-22T09:11:03Z")

</div>

@gbooker02 any way you can prioritize fixing the logs for the next release? Would be helpful to know what’s causing the exception

---

<div class="post-metadata">

**Author:** ![solitas](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@solitas](https://forums.plex.tv/u/solitas)\
**Post date:** [November 28, 2024, 7:28pm UTC](https://forums.plex.tv/t/viewstatesync-process-does-not-run-properly/892566/9 "2024-11-28T19:28:32Z")

</div>

This is still broken on `1.41.3.9232`, and while the logs now print the exception class, they are still unfortunately not useful

```auto
Nov 28, 2024 19:22:45.634 DEBUG - [ViewStateSync] Encountered exception: std::exception

```

---

<div class="post-metadata">

**Author:** ![solitas](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@solitas](https://forums.plex.tv/u/solitas)\
**Post date:** [November 30, 2024, 12:50am UTC](https://forums.plex.tv/t/viewstatesync-process-does-not-run-properly/892566/10 "2024-11-30T00:50:41Z")

</div>

@gbooker02 I went through past PMS versions, and the last version where ViewStateSync worked was `1.40.5.8854-f36c552fd`.

I also confirmed that the exception started happening on `1.40.5.8897-e5987a19d`: [Plex Media Server - #638 by gbooker02](https://forums.plex.tv/t/plex-media-server/30447/638)

Maybe something to do with

> (View State Sync) Item plays could be duplicated when state synced from service.  
> (ViewStateSync) Fewer requests to plex.tv endpoints (PM-1958

---

<div class="post-metadata">

**Author:** ![jean\_francois](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/jean_francois/32/326879_2.png) [@jean\_francois](https://forums.plex.tv/u/jean_francois)\
**Post date:** [December 5, 2024, 5:47pm UTC](https://forums.plex.tv/t/viewstatesync-process-does-not-run-properly/892566/11 "2024-12-05T17:47:07Z")

</div>

A new beta PMS version has been released:

> Items fixed: \* (ViewStateSync) An exception could cause VSS to stop working

I moved machines a week ago and did a clean install of my Plex library so I don’t have the issue anymore, and am unable to run my old broken library to test this patch as it has been erased, but does that fix the problem for you?

---

<div class="post-metadata">

**Author:** ![solitas](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@solitas](https://forums.plex.tv/u/solitas)\
**Post date:** [December 5, 2024, 6:16pm UTC](https://forums.plex.tv/t/viewstatesync-process-does-not-run-properly/892566/12 "2024-12-05T18:16:34Z")

</div>

Nice, yeah looks like it’s fixed in `1.41.3.9276-8f15273fb`:

```auto
Dec 05, 2024 18:13:20.929 DEBUG - [ViewStateSync] Reading 0 states
Dec 05, 2024 18:13:20.929 DEBUG - [ViewStateSync] Done getting states
Dec 05, 2024 18:13:20.930 DEBUG - [ViewStateSync] Finished

```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [March 5, 2025, 6:16pm UTC](https://forums.plex.tv/t/viewstatesync-process-does-not-run-properly/892566/13 "2025-03-05T18:16:41Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
