[Bug]: The device table seems to be getting endlessly populated by the iOS app Plappa #2710

Closed
opened 2026-04-25 00:09:47 +02:00 by adam · 9 comments
Owner

Originally created by @purple-emily on GitHub (Apr 11, 2025).

What happened?

There are 52,743 entries in my database.

id deviceId clientName clientVersion ipAddress deviceName deviceVersion extraData createdAt updatedAt userId
78dbff7a-a8a9-461c-898f-5c1fc3da4bc8 78dbff7a-a8a9-461c-898f-5c1fc3da4bc8 plappa 1.4.3 172.16.1.1 null null {"osName":"iOS"} 2024-11-20 19:24:29.253 +00:00 2024-11-20 19:24:29.253 +00:00 7488a216-5f38-4467-8291-a6c91375b0b4
9b677238-ea15-48e7-828e-9f2982df3626 9b677238-ea15-48e7-828e-9f2982df3626 plappa 1.4.3 172.16.1.1 null null {"osName":"iOS"} 2024-11-20 19:24:39.270 +00:00 2024-11-20 19:24:39.270 +00:00 7488a216-5f38-4467-8291-a6c91375b0b4
e652d747-8baa-43a1-b015-aacac0c13fd0 e652d747-8baa-43a1-b015-aacac0c13fd0 plappa 1.4.3 172.16.1.1 null null {"osName":"iOS"} 2024-11-20 19:24:49.280 +00:00 2024-11-20 19:24:49.280 +00:00 7488a216-5f38-4467-8291-a6c91375b0b4
6027e3ce-855e-4b4f-ad06-67b351cc43a8 6027e3ce-855e-4b4f-ad06-67b351cc43a8 plappa 1.4.3 172.16.1.1 null null {"osName":"iOS"} 2024-11-20 19:24:59.263 +00:00 2024-11-20 19:24:59.263 +00:00 7488a216-5f38-4467-8291-a6c91375b0b4
80566bec-9676-49af-af02-0a0211bf61ec 80566bec-9676-49af-af02-0a0211bf61ec plappa 1.4.3 172.16.1.1 null null {"osName":"iOS"} 2024-11-20 19:25:09.265 +00:00 2024-11-20 19:25:09.265 +00:00 7488a216-5f38-4467-8291-a6c91375b0b4
56ec73ce-f266-4a4f-b4e6-1572a2b81b7b 56ec73ce-f266-4a4f-b4e6-1572a2b81b7b plappa 1.4.3 172.16.1.1 null null {"osName":"iOS"} 2024-11-20 19:25:19.281 +00:00 2024-11-20 19:25:19.281 +00:00 7488a216-5f38-4467-8291-a6c91375b0b4
b699ad3a-ec8f-473e-a616-c5cfd6bd0642 b699ad3a-ec8f-473e-a616-c5cfd6bd0642 plappa 1.4.3 172.16.1.1 null null {"osName":"iOS"} 2024-11-20 19:25:29.278 +00:00 2024-11-20 19:25:29.278 +00:00 7488a216-5f38-4467-8291-a6c91375b0b4
d87b6502-ebd2-4807-b511-00557e95d81b d87b6502-ebd2-4807-b511-00557e95d81b plappa 1.4.3 172.16.1.1 null null {"osName":"iOS"} 2024-11-20 19:25:39.262 +00:00 2024-11-20 19:25:39.262 +00:00 7488a216-5f38-4467-8291-a6c91375b0b4
13bc4c7c-1a52-4f0f-8938-769cceb7c1e1 13bc4c7c-1a52-4f0f-8938-769cceb7c1e1 plappa 1.4.3 172.16.1.1 null null {"osName":"iOS"} 2024-11-20 19:25:49.248 +00:00 2024-11-20 19:25:49.248 +00:00 7488a216-5f38-4467-8291-a6c91375b0b4
69c7cffe-c7bf-4dee-abb5-438a7e65da9e 69c7cffe-c7bf-4dee-abb5-438a7e65da9e plappa 1.4.3 172.16.1.1 null null {"osName":"iOS"} 2024-11-20 19:30:09.419 +00:00 2024-11-20 19:30:09.419 +00:00 7488a216-5f38-4467-8291-a6c91375b0b4
4abb4436-f064-434c-9ba5-3164286b8b1b 4abb4436-f064-434c-9ba5-3164286b8b1b plappa 1.4.3 172.16.1.1 null null {"osName":"iOS"} 2024-11-20 19:30:09.422 +00:00 2024-11-20 19:30:09.422 +00:00 7488a216-5f38-4467-8291-a6c91375b0b4
cd05f4a6-ce87-4c6a-b988-887b0239d8aa cd05f4a6-ce87-4c6a-b988-887b0239d8aa plappa 1.4.3 172.16.1.1 null null {"osName":"iOS"} 2024-11-20 19:30:17.181 +00:00 2024-11-20 19:30:17.181 +00:00 7488a216-5f38-4467-8291-a6c91375b0b4
3519d781-2e44-43b8-a444-707214e8d220 3519d781-2e44-43b8-a444-707214e8d220 plappa 1.4.3 172.16.1.1 null null {"osName":"iOS"} 2024-11-20 19:30:30.563 +00:00 2024-11-20 19:30:30.563 +00:00 7488a216-5f38-4467-8291-a6c91375b0b4
63d1bd61-25c3-4f26-9d79-9231904167eb 63d1bd61-25c3-4f26-9d79-9231904167eb plappa 1.4.3 172.16.1.1 null null {"osName":"iOS"} 2024-11-20 19:30:40.563 +00:00 2024-11-20 19:30:40.563 +00:00 7488a216-5f38-4467-8291-a6c91375b0b4
da1d62a7-fa37-455b-9105-6bfd5d6dee09 da1d62a7-fa37-455b-9105-6bfd5d6dee09 plappa 1.4.3 172.16.1.1 null null {"osName":"iOS"} 2024-11-20 19:30:50.539 +00:00 2024-11-20 19:30:50.539 +00:00 7488a216-5f38-4467-8291-a6c91375b0b4
13c26182-538e-4780-94bf-b3852984d51a 13c26182-538e-4780-94bf-b3852984d51a plappa 1.4.3 172.16.1.1 null null {"osName":"iOS"} 2024-11-20 19:31:00.579 +00:00 2024-11-20 19:31:00.579 +00:00 7488a216-5f38-4467-8291-a6c91375b0b4
b106998c-f5c1-4539-8025-a25e0d4c9a42 b106998c-f5c1-4539-8025-a25e0d4c9a42 plappa 1.4.3 172.16.1.1 null null {"osName":"iOS"} 2024-11-20 19:31:10.556 +00:00 2024-11-20 19:31:10.556 +00:00 7488a216-5f38-4467-8291-a6c91375b0b4
c444359a-b21d-40b9-bd25-1103d1be42c1 c444359a-b21d-40b9-bd25-1103d1be42c1 plappa 1.4.3 172.16.1.1 null null {"osName":"iOS"} 2024-11-20 19:31:20.543 +00:00 2024-11-20 19:31:20.543 +00:00 7488a216-5f38-4467-8291-a6c91375b0b4
760da9fc-b480-489d-acfc-c519ea0c2f31 760da9fc-b480-489d-acfc-c519ea0c2f31 plappa 1.4.3 172.16.1.1 null null {"osName":"iOS"} 2024-11-20 19:31:30.555 +00:00 2024-11-20 19:31:30.555 +00:00 7488a216-5f38-4467-8291-a6c91375b0b4
5edfbc33-541e-4b5d-96ae-cc8b7edb971a 5edfbc33-541e-4b5d-96ae-cc8b7edb971a plappa 1.4.3 172.16.1.1 null null {"osName":"iOS"} 2024-11-20 19:31:40.536 +00:00 2024-11-20 19:31:40.536 +00:00 7488a216-5f38-4467-8291-a6c91375b0b4
9a2862bc-e9e7-4cdc-9b7b-55dc6409fd86 9a2862bc-e9e7-4cdc-9b7b-55dc6409fd86 plappa 1.4.3 172.16.1.1 null null {"osName":"iOS"} 2024-11-20 19:31:50.546 +00:00 2024-11-20 19:31:50.546 +00:00 7488a216-5f38-4467-8291-a6c91375b0b4
26bef70f-05fc-4ae3-b7d7-6b346b99ef6e 26bef70f-05fc-4ae3-b7d7-6b346b99ef6e plappa 1.4.3 172.16.1.1 null null {"osName":"iOS"} 2024-11-20 19:31:55.679 +00:00 2024-11-20 19:31:55.679 +00:00 7488a216-5f38-4467-8291-a6c91375b0b4

There are a few "Unknown" entries listed:

id deviceId clientName clientVersion ipAddress deviceName deviceVersion extraData createdAt updatedAt userId
10a75b3e-0f6a-4067-aabf-88f835052d91 10a75b3e-0f6a-4067-aabf-88f835052d91 Unknown 2.10.1 172.16.1.1 null null {"osName":"iOS"} 2024-11-20 19:32:39.353 +00:00 2024-11-20 19:32:39.353 +00:00 7488a216-5f38-4467-8291-a6c91375b0b4
34168cba-330a-481e-b143-48eba25cc12f 34168cba-330a-481e-b143-48eba25cc12f plappa 1.4.3 172.16.1.1 null null {"osName":"iOS"} 2024-11-20 19:32:39.695 +00:00 2024-11-20 19:32:39.695 +00:00 7488a216-5f38-4467-8291-a6c91375b0b4
29406e7b-67e4-49ef-8a21-1e2f4fbc0c8d 29406e7b-67e4-49ef-8a21-1e2f4fbc0c8d plappa 1.4.3 172.16.1.1 null null {"osName":"iOS"} 2024-11-20 19:32:39.704 +00:00 2024-11-20 19:32:39.704 +00:00 7488a216-5f38-4467-8291-a6c91375b0b4
b51026c7-6b0f-479a-8150-99afbd69ce0e b51026c7-6b0f-479a-8150-99afbd69ce0e Unknown 2.10.1 172.16.1.1 null null {"osName":"iOS"} 2024-11-20 19:37:02.909 +00:00 2024-11-20 19:37:02.909 +00:00 7488a216-5f38-4467-8291-a6c91375b0b4

What did you expect to happen?

A single entry for my phone?

Steps to reproduce the issue

  1. Install plappa
  2. Listen to audiobook

Audiobookshelf version

v2.20.0

How are you running audiobookshelf?

Docker

What OS is your Audiobookshelf server hosted from?

Linux

If the issue is being seen in the UI, what browsers are you seeing the problem on?

None

Logs


Additional Notes

No response

Originally created by @purple-emily on GitHub (Apr 11, 2025). ### What happened? There are 52,743 entries in my database. | id | deviceId | clientName | clientVersion | ipAddress | deviceName | deviceVersion | extraData | createdAt | updatedAt | userId | |------------------------------------------|------------------------------------------|------------|---------------|---------------|------------|---------------|--------------------|------------------------------------|------------------------------------|------------------------------------------| | 78dbff7a\-a8a9\-461c\-898f\-5c1fc3da4bc8 | 78dbff7a\-a8a9\-461c\-898f\-5c1fc3da4bc8 | plappa | 1\.4\.3 | 172\.16\.1\.1 | null | null | \{"osName":"iOS"\} | 2024\-11\-20 19:24:29\.253 \+00:00 | 2024\-11\-20 19:24:29\.253 \+00:00 | 7488a216\-5f38\-4467\-8291\-a6c91375b0b4 | | 9b677238\-ea15\-48e7\-828e\-9f2982df3626 | 9b677238\-ea15\-48e7\-828e\-9f2982df3626 | plappa | 1\.4\.3 | 172\.16\.1\.1 | null | null | \{"osName":"iOS"\} | 2024\-11\-20 19:24:39\.270 \+00:00 | 2024\-11\-20 19:24:39\.270 \+00:00 | 7488a216\-5f38\-4467\-8291\-a6c91375b0b4 | | e652d747\-8baa\-43a1\-b015\-aacac0c13fd0 | e652d747\-8baa\-43a1\-b015\-aacac0c13fd0 | plappa | 1\.4\.3 | 172\.16\.1\.1 | null | null | \{"osName":"iOS"\} | 2024\-11\-20 19:24:49\.280 \+00:00 | 2024\-11\-20 19:24:49\.280 \+00:00 | 7488a216\-5f38\-4467\-8291\-a6c91375b0b4 | | 6027e3ce\-855e\-4b4f\-ad06\-67b351cc43a8 | 6027e3ce\-855e\-4b4f\-ad06\-67b351cc43a8 | plappa | 1\.4\.3 | 172\.16\.1\.1 | null | null | \{"osName":"iOS"\} | 2024\-11\-20 19:24:59\.263 \+00:00 | 2024\-11\-20 19:24:59\.263 \+00:00 | 7488a216\-5f38\-4467\-8291\-a6c91375b0b4 | | 80566bec\-9676\-49af\-af02\-0a0211bf61ec | 80566bec\-9676\-49af\-af02\-0a0211bf61ec | plappa | 1\.4\.3 | 172\.16\.1\.1 | null | null | \{"osName":"iOS"\} | 2024\-11\-20 19:25:09\.265 \+00:00 | 2024\-11\-20 19:25:09\.265 \+00:00 | 7488a216\-5f38\-4467\-8291\-a6c91375b0b4 | | 56ec73ce\-f266\-4a4f\-b4e6\-1572a2b81b7b | 56ec73ce\-f266\-4a4f\-b4e6\-1572a2b81b7b | plappa | 1\.4\.3 | 172\.16\.1\.1 | null | null | \{"osName":"iOS"\} | 2024\-11\-20 19:25:19\.281 \+00:00 | 2024\-11\-20 19:25:19\.281 \+00:00 | 7488a216\-5f38\-4467\-8291\-a6c91375b0b4 | | b699ad3a\-ec8f\-473e\-a616\-c5cfd6bd0642 | b699ad3a\-ec8f\-473e\-a616\-c5cfd6bd0642 | plappa | 1\.4\.3 | 172\.16\.1\.1 | null | null | \{"osName":"iOS"\} | 2024\-11\-20 19:25:29\.278 \+00:00 | 2024\-11\-20 19:25:29\.278 \+00:00 | 7488a216\-5f38\-4467\-8291\-a6c91375b0b4 | | d87b6502\-ebd2\-4807\-b511\-00557e95d81b | d87b6502\-ebd2\-4807\-b511\-00557e95d81b | plappa | 1\.4\.3 | 172\.16\.1\.1 | null | null | \{"osName":"iOS"\} | 2024\-11\-20 19:25:39\.262 \+00:00 | 2024\-11\-20 19:25:39\.262 \+00:00 | 7488a216\-5f38\-4467\-8291\-a6c91375b0b4 | | 13bc4c7c\-1a52\-4f0f\-8938\-769cceb7c1e1 | 13bc4c7c\-1a52\-4f0f\-8938\-769cceb7c1e1 | plappa | 1\.4\.3 | 172\.16\.1\.1 | null | null | \{"osName":"iOS"\} | 2024\-11\-20 19:25:49\.248 \+00:00 | 2024\-11\-20 19:25:49\.248 \+00:00 | 7488a216\-5f38\-4467\-8291\-a6c91375b0b4 | | 69c7cffe\-c7bf\-4dee\-abb5\-438a7e65da9e | 69c7cffe\-c7bf\-4dee\-abb5\-438a7e65da9e | plappa | 1\.4\.3 | 172\.16\.1\.1 | null | null | \{"osName":"iOS"\} | 2024\-11\-20 19:30:09\.419 \+00:00 | 2024\-11\-20 19:30:09\.419 \+00:00 | 7488a216\-5f38\-4467\-8291\-a6c91375b0b4 | | 4abb4436\-f064\-434c\-9ba5\-3164286b8b1b | 4abb4436\-f064\-434c\-9ba5\-3164286b8b1b | plappa | 1\.4\.3 | 172\.16\.1\.1 | null | null | \{"osName":"iOS"\} | 2024\-11\-20 19:30:09\.422 \+00:00 | 2024\-11\-20 19:30:09\.422 \+00:00 | 7488a216\-5f38\-4467\-8291\-a6c91375b0b4 | | cd05f4a6\-ce87\-4c6a\-b988\-887b0239d8aa | cd05f4a6\-ce87\-4c6a\-b988\-887b0239d8aa | plappa | 1\.4\.3 | 172\.16\.1\.1 | null | null | \{"osName":"iOS"\} | 2024\-11\-20 19:30:17\.181 \+00:00 | 2024\-11\-20 19:30:17\.181 \+00:00 | 7488a216\-5f38\-4467\-8291\-a6c91375b0b4 | | 3519d781\-2e44\-43b8\-a444\-707214e8d220 | 3519d781\-2e44\-43b8\-a444\-707214e8d220 | plappa | 1\.4\.3 | 172\.16\.1\.1 | null | null | \{"osName":"iOS"\} | 2024\-11\-20 19:30:30\.563 \+00:00 | 2024\-11\-20 19:30:30\.563 \+00:00 | 7488a216\-5f38\-4467\-8291\-a6c91375b0b4 | | 63d1bd61\-25c3\-4f26\-9d79\-9231904167eb | 63d1bd61\-25c3\-4f26\-9d79\-9231904167eb | plappa | 1\.4\.3 | 172\.16\.1\.1 | null | null | \{"osName":"iOS"\} | 2024\-11\-20 19:30:40\.563 \+00:00 | 2024\-11\-20 19:30:40\.563 \+00:00 | 7488a216\-5f38\-4467\-8291\-a6c91375b0b4 | | da1d62a7\-fa37\-455b\-9105\-6bfd5d6dee09 | da1d62a7\-fa37\-455b\-9105\-6bfd5d6dee09 | plappa | 1\.4\.3 | 172\.16\.1\.1 | null | null | \{"osName":"iOS"\} | 2024\-11\-20 19:30:50\.539 \+00:00 | 2024\-11\-20 19:30:50\.539 \+00:00 | 7488a216\-5f38\-4467\-8291\-a6c91375b0b4 | | 13c26182\-538e\-4780\-94bf\-b3852984d51a | 13c26182\-538e\-4780\-94bf\-b3852984d51a | plappa | 1\.4\.3 | 172\.16\.1\.1 | null | null | \{"osName":"iOS"\} | 2024\-11\-20 19:31:00\.579 \+00:00 | 2024\-11\-20 19:31:00\.579 \+00:00 | 7488a216\-5f38\-4467\-8291\-a6c91375b0b4 | | b106998c\-f5c1\-4539\-8025\-a25e0d4c9a42 | b106998c\-f5c1\-4539\-8025\-a25e0d4c9a42 | plappa | 1\.4\.3 | 172\.16\.1\.1 | null | null | \{"osName":"iOS"\} | 2024\-11\-20 19:31:10\.556 \+00:00 | 2024\-11\-20 19:31:10\.556 \+00:00 | 7488a216\-5f38\-4467\-8291\-a6c91375b0b4 | | c444359a\-b21d\-40b9\-bd25\-1103d1be42c1 | c444359a\-b21d\-40b9\-bd25\-1103d1be42c1 | plappa | 1\.4\.3 | 172\.16\.1\.1 | null | null | \{"osName":"iOS"\} | 2024\-11\-20 19:31:20\.543 \+00:00 | 2024\-11\-20 19:31:20\.543 \+00:00 | 7488a216\-5f38\-4467\-8291\-a6c91375b0b4 | | 760da9fc\-b480\-489d\-acfc\-c519ea0c2f31 | 760da9fc\-b480\-489d\-acfc\-c519ea0c2f31 | plappa | 1\.4\.3 | 172\.16\.1\.1 | null | null | \{"osName":"iOS"\} | 2024\-11\-20 19:31:30\.555 \+00:00 | 2024\-11\-20 19:31:30\.555 \+00:00 | 7488a216\-5f38\-4467\-8291\-a6c91375b0b4 | | 5edfbc33\-541e\-4b5d\-96ae\-cc8b7edb971a | 5edfbc33\-541e\-4b5d\-96ae\-cc8b7edb971a | plappa | 1\.4\.3 | 172\.16\.1\.1 | null | null | \{"osName":"iOS"\} | 2024\-11\-20 19:31:40\.536 \+00:00 | 2024\-11\-20 19:31:40\.536 \+00:00 | 7488a216\-5f38\-4467\-8291\-a6c91375b0b4 | | 9a2862bc\-e9e7\-4cdc\-9b7b\-55dc6409fd86 | 9a2862bc\-e9e7\-4cdc\-9b7b\-55dc6409fd86 | plappa | 1\.4\.3 | 172\.16\.1\.1 | null | null | \{"osName":"iOS"\} | 2024\-11\-20 19:31:50\.546 \+00:00 | 2024\-11\-20 19:31:50\.546 \+00:00 | 7488a216\-5f38\-4467\-8291\-a6c91375b0b4 | | 26bef70f\-05fc\-4ae3\-b7d7\-6b346b99ef6e | 26bef70f\-05fc\-4ae3\-b7d7\-6b346b99ef6e | plappa | 1\.4\.3 | 172\.16\.1\.1 | null | null | \{"osName":"iOS"\} | 2024\-11\-20 19:31:55\.679 \+00:00 | 2024\-11\-20 19:31:55\.679 \+00:00 | 7488a216\-5f38\-4467\-8291\-a6c91375b0b4 | There are a few "Unknown" entries listed: | id | deviceId | clientName | clientVersion | ipAddress | deviceName | deviceVersion | extraData | createdAt | updatedAt | userId | |------------------------------------------|------------------------------------------|------------|---------------|---------------|------------|---------------|--------------------|------------------------------------|------------------------------------|------------------------------------------| | 10a75b3e\-0f6a\-4067\-aabf\-88f835052d91 | 10a75b3e\-0f6a\-4067\-aabf\-88f835052d91 | Unknown | 2\.10\.1 | 172\.16\.1\.1 | null | null | \{"osName":"iOS"\} | 2024\-11\-20 19:32:39\.353 \+00:00 | 2024\-11\-20 19:32:39\.353 \+00:00 | 7488a216\-5f38\-4467\-8291\-a6c91375b0b4 | | 34168cba\-330a\-481e\-b143\-48eba25cc12f | 34168cba\-330a\-481e\-b143\-48eba25cc12f | plappa | 1\.4\.3 | 172\.16\.1\.1 | null | null | \{"osName":"iOS"\} | 2024\-11\-20 19:32:39\.695 \+00:00 | 2024\-11\-20 19:32:39\.695 \+00:00 | 7488a216\-5f38\-4467\-8291\-a6c91375b0b4 | | 29406e7b\-67e4\-49ef\-8a21\-1e2f4fbc0c8d | 29406e7b\-67e4\-49ef\-8a21\-1e2f4fbc0c8d | plappa | 1\.4\.3 | 172\.16\.1\.1 | null | null | \{"osName":"iOS"\} | 2024\-11\-20 19:32:39\.704 \+00:00 | 2024\-11\-20 19:32:39\.704 \+00:00 | 7488a216\-5f38\-4467\-8291\-a6c91375b0b4 | | b51026c7\-6b0f\-479a\-8150\-99afbd69ce0e | b51026c7\-6b0f\-479a\-8150\-99afbd69ce0e | Unknown | 2\.10\.1 | 172\.16\.1\.1 | null | null | \{"osName":"iOS"\} | 2024\-11\-20 19:37:02\.909 \+00:00 | 2024\-11\-20 19:37:02\.909 \+00:00 | 7488a216\-5f38\-4467\-8291\-a6c91375b0b4 | ### What did you expect to happen? A single entry for my phone? ### Steps to reproduce the issue 1. Install plappa 2. Listen to audiobook ### Audiobookshelf version v2.20.0 ### How are you running audiobookshelf? Docker ### What OS is your Audiobookshelf server hosted from? Linux ### If the issue is being seen in the UI, what browsers are you seeing the problem on? None ### Logs ```shell ``` ### Additional Notes _No response_
adam added the bug label 2026-04-25 00:09:47 +02:00
adam closed this issue 2026-04-25 00:09:47 +02:00
Author
Owner

@Vito0912 commented on GitHub (Apr 11, 2025):

Plappa is a third-party app. This problem is likely due to their approach. So this issue should be reported to plappa instead

As an app developer, if you send a session, you can pass a device ID. The device ID does not appear to be constant for Plappa, which results in additional devices being added.

@Vito0912 commented on GitHub (Apr 11, 2025): Plappa is a third-party app. This problem is likely due to their approach. So this issue should be reported to plappa instead As an app developer, if you send a session, you can pass a device ID. The device ID does not appear to be constant for Plappa, which results in additional devices being added.
Author
Owner

@LeoKlaus commented on GitHub (Apr 11, 2025):

Plappa doesn't provide a device ID at all, so I'm assuming the random ID is generated server side.
Should the device ID be considered mandatory?

@LeoKlaus commented on GitHub (Apr 11, 2025): Plappa doesn't provide a device ID at all, so I'm assuming the random ID is generated server side. Should the device ID be considered mandatory?
Author
Owner

@Vito0912 commented on GitHub (Apr 11, 2025):

The ID is not mandatory. It's probably good to provide one, but there shouldn't be any direct consequences if you don't (as you see. Nobody noticed xD). Every session will create a new device, and aside from potential "performance" issues (bc growing table), there should be no problem since the device is not used for anything else (afaik).

https://github.com/advplyr/audiobookshelf/blob/26309019e74e18b53e7029560ae4c927af9c8465/server/objects/DeviceInfo.js#L93

The device ID will simply be the autogenerated ID.

Should the device ID be considered mandatory?

TLDR: No, but it does not hurt to provide one.

@Vito0912 commented on GitHub (Apr 11, 2025): The ID is not mandatory. It's probably good to provide one, but there shouldn't be any direct consequences if you don't (as you see. Nobody noticed xD). Every session will create a new device, and aside from potential "performance" issues (bc growing table), there should be no problem since the device is not used for anything else (afaik). https://github.com/advplyr/audiobookshelf/blob/26309019e74e18b53e7029560ae4c927af9c8465/server/objects/DeviceInfo.js#L93 The device ID will simply be the autogenerated ID. > Should the device ID be considered mandatory? TLDR: No, but it does not hurt to provide one.
Author
Owner

@purple-emily commented on GitHub (Apr 11, 2025):

So essentially that’s what’s happening. Plappa seems to be initiating a new session every few seconds and this creates a new entry making the device table grow rapidly. @LeoKlaus

@purple-emily commented on GitHub (Apr 11, 2025): So essentially that’s what’s happening. Plappa seems to be initiating a new session every few seconds and this creates a new entry making the device table grow rapidly. @LeoKlaus
Author
Owner

@Vito0912 commented on GitHub (Apr 11, 2025):

Thanks for pointing that out. That does look odd indeed. I haven't been paying attention to the timestamp

As far as I know, (everything from now on is speculation without actually trying), one just creates the session (with deviceId which should create a new device) and then uses the generated sessionId to update that session.

It currently looks like a new session is created every 10 seconds, which seems very odd. @purple-emily, can you look in the setting under "Recent Sessions" to see what's displayed there?

@Vito0912 commented on GitHub (Apr 11, 2025): Thanks for pointing that out. That does look odd indeed. I haven't been paying attention to the timestamp As far as I know, (everything from now on is speculation without actually trying), one just creates the session (with deviceId which should create a new device) and then uses the generated sessionId to update that session. It currently looks like a new session is created every 10 seconds, which seems very odd. @purple-emily, can you look in the setting under "Recent Sessions" to see what's displayed there?
Author
Owner

@LeoKlaus commented on GitHub (Apr 11, 2025):

Just to clarify, plappa does not create a new session every ten seconds. The session and its ID stay the same until the app is restarted or playback is stopped.

@LeoKlaus commented on GitHub (Apr 11, 2025): Just to clarify, plappa does _not_ create a new session every ten seconds. The session and its ID stay the same until the app is restarted or playback is stopped.
Author
Owner

@Vito0912 commented on GitHub (Apr 11, 2025):

@LeoKlaus I installed the app in the meantime and can reproduce the same behavior. I am not sure which API endpoints you use, but they are used somewhat differently

I found the "issue." You use:

/api/session/local
/api/me/progress/batch/update
/api/authorize

The first two are an untraditional way of doing it, but there is nothing "wrong" with this (in theory).


(Nothing to do with the actual problem, just something I defintily want to point out bc of data usage)

However, you also call /api/authorize every 10 seconds. If I may ask, why is that?

The authorize endpoint returns the whole user. The user contains every progress ever listened to and bookmarks.

For my user (who has been using ABS for about a year), this amounts to 284KB being sent every 10 seconds, which seems very excessive.


Regarding the first two endpoints:

Is there a reason why you used these instead of /sync? I cannot see the payload you send as I currently do not have the right software on hand, but I assume that you are just overwriting the session (not actually updating it, if you see it that way) and thus a new device gets generated (because you probably—again, just speculation—send the session with the ID but no device, which overwrites the session and therefore a new device gets generated).

Also iirc /api/session/local updates the progress of the items anyways. So you don't need the second api call

If you want to chat about the API, I am open to help

@Vito0912 commented on GitHub (Apr 11, 2025): @LeoKlaus I installed the app in the meantime and can reproduce the same behavior. ~I am not sure which API endpoints you use, but they are used somewhat differently~ I found the "issue." You use: `/api/session/local` `/api/me/progress/batch/update` `/api/authorize` The first two are an untraditional way of doing it, but there is nothing "wrong" with this (in theory). --- (Nothing to do with the actual problem, just something I defintily want to point out bc of data usage) However, you also call `/api/authorize` every 10 seconds. If I may ask, why is that? The authorize endpoint returns the whole user. The user contains every progress ever listened to and bookmarks. For my user (who has been using ABS for about a year), this amounts to 284KB being sent every 10 seconds, which seems very excessive. --- Regarding the first two endpoints: Is there a reason why you used these instead of `/sync`? I cannot see the payload you send as I currently do not have the right software on hand, but I assume that you are just overwriting the session (not actually updating it, if you see it that way) and thus a new device gets generated (because you probably—again, just speculation—send the session with the ID but no device, which overwrites the session and therefore a new device gets generated). Also iirc `/api/session/local` updates the progress of the items anyways. So you don't need the second api call If you want to chat about the API, I am open to help
Author
Owner

@LeoKlaus commented on GitHub (Apr 11, 2025):

Thank you for taking the time to look into this.

The ABS integration for plappa was kinda rushed as plappa was originally intended to only support Jellyfin and Emby. Originally, plappa only supported progress syncing and when moving towards sessions, I left in the progress sync as some parts of the app still use progress instead of sessions for progress tracking. AFAIK, the authorize endpoint is the only one that returns progress for all items at once, though loading with every sync is excessive.

Simply put, I'm looking at a lot of tech debt that would require an entire rewrite of at least the API handling, but I haven't found the time for that so far.

The sessions are posted to the /api/session/local-all in this format:

                "id": session.id,
                "libraryId": session.libraryId,
                "libraryItemId": session.libraryItemId,
                "displayTitle": session.displayTitle,
                "displayAuthor": session.displayAuthor,
                "episodeId": session.episodeId,
                "mediaType": session.mediaType.rawValue,
                "mediaMetadata": [
                    "title": session.displayTitle,
                    "genres": []
                ],
                "playmethod": session.playmethod.rawValue,
                "date": session.date,
                "dayOfWeek": session.dayOfWeek,
                "timeListening": session.timeListening,
                "startTime": session.startTime,
                "currentTime": session.currentTime,
                "startedAt": Int(session.startedAt.timeIntervalSince1970 * 1000),
                "updatedAt": Int(session.updatedAt.timeIntervalSince1970 * 1000),
                "deviceInfo": {
                     "osName": "iOS",
                     "osVersion": UIDevice.current.systemVersion, // iOS version
                     "clientVersion": Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String, // App version
                     "clientName": "plappa"
                }

My understanding is that this should update the existing session, not create a new one. If all that's needed to fix this for now is a static device id, I could add that fairly quickly (depending on how long Apple takes to approve the update).

I'll make sure to reach out once I find the time to rewrite the API handling in plappa, there are certainly parts of the ABS api I don't quite understand.

@LeoKlaus commented on GitHub (Apr 11, 2025): Thank you for taking the time to look into this. The ABS integration for plappa was kinda rushed as plappa was originally intended to only support Jellyfin and Emby. Originally, plappa only supported progress syncing and when moving towards sessions, I left in the progress sync as some parts of the app still use progress instead of sessions for progress tracking. AFAIK, the authorize endpoint is the only one that returns progress for all items at once, though loading with every sync is excessive. Simply put, I'm looking at a lot of tech debt that would require an entire rewrite of at least the API handling, but I haven't found the time for that so far. The sessions are posted to the `/api/session/local-all` in this format: ``` swift "id": session.id, "libraryId": session.libraryId, "libraryItemId": session.libraryItemId, "displayTitle": session.displayTitle, "displayAuthor": session.displayAuthor, "episodeId": session.episodeId, "mediaType": session.mediaType.rawValue, "mediaMetadata": [ "title": session.displayTitle, "genres": [] ], "playmethod": session.playmethod.rawValue, "date": session.date, "dayOfWeek": session.dayOfWeek, "timeListening": session.timeListening, "startTime": session.startTime, "currentTime": session.currentTime, "startedAt": Int(session.startedAt.timeIntervalSince1970 * 1000), "updatedAt": Int(session.updatedAt.timeIntervalSince1970 * 1000), "deviceInfo": { "osName": "iOS", "osVersion": UIDevice.current.systemVersion, // iOS version "clientVersion": Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String, // App version "clientName": "plappa" } ``` My understanding is that this should update the existing session, not create a new one. If all that's needed to fix this for now is a static device id, I could add that fairly quickly (depending on how long Apple takes to approve the update). I'll make sure to reach out once I find the time to rewrite the API handling in plappa, there are certainly parts of the ABS api I don't quite understand.
Author
Owner

@Vito0912 commented on GitHub (Apr 11, 2025):

My understanding is that this should update the existing session, not create a new one.

It's doing both, in a way. Some code, like checking if the device exists or creating a new device, runs again, and not all attributes are updated (that's why I call it overwritten). But the way you are doing it is the intended method.

As far as I know, you just have to add "deviceId" to the "deviceInfo" object to fix the creation of devices. I imagine some users definitely have millions of devices now ^^ xD. Also, I don't think you have to be quick. As far as I understand, this has been the case since the beginning of the abs part of the app, so yeah. I am not sure how a static id would interact with different users (but having the same deviceId). Probably no problem, but who knows.

AFAIK, the authorize endpoint is the only one that returns progress for all items at once, though loading with every sync is excessive.

Indeed, there is sadly no nice way. This is also a big bummer for my client that I am programming. Not even all progress for one library is possible (or not even all progress without the user and bookmarks).

/api/me also returns that data (It only returns the server and not the server details).

though loading with every sync is excessive.

If it's just about retrieving the new progress from the server for the listening item, there is /api/me/progress/<LibraryItemID> to get only the progress for that item.

@Vito0912 commented on GitHub (Apr 11, 2025): > My understanding is that this should update the existing session, not create a new one. It's doing both, in a way. Some code, like checking if the device exists or creating a new device, runs again, and not all attributes are updated (that's why I call it overwritten). But the way you are doing it is the intended method. As far as I know, you just have to add "deviceId" to the "deviceInfo" object to fix the creation of devices. I imagine some users definitely have millions of devices now ^^ xD. Also, I don't think you have to be quick. As far as I understand, this has been the case since the beginning of the abs part of the app, so yeah. I am not sure how a static id would interact with different users (but having the same deviceId). Probably no problem, but who knows. > AFAIK, the authorize endpoint is the only one that returns progress for all items at once, though loading with every sync is excessive. Indeed, there is sadly no nice way. This is also a big bummer for my client that I am programming. Not even all progress for one library is possible (or not even all progress without the user and bookmarks). `/api/me` also returns that data (It only returns the server and not the server details). > though loading with every sync is excessive. If it's just about retrieving the new progress from the server for the listening item, there is `/api/me/progress/<LibraryItemID>` to get only the progress for that item.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#2710