Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit series tag issue[Bug]: #3207

Open
tdz262 opened this issue Jul 30, 2024 · 4 comments · May be fixed by #3417
Open

Edit series tag issue[Bug]: #3207

tdz262 opened this issue Jul 30, 2024 · 4 comments · May be fixed by #3417
Labels
bug Something isn't working

Comments

@tdz262
Copy link

tdz262 commented Jul 30, 2024

What happened?

If you enter "RI" in the series tag ABS freezes, The edit page isn't closeable and you can't select any of the series options. You need to refresh the Page before it works again. Copy and pasting the full name in works though. Typing it out it freezes once RI are entered. Tried this with multiple files.

What did you expect to happen?

I have the series Ripple System. When entering the series information entering RI causing the window to freeze, I expected it to filter down the different series lists until the one i wanted was there.

Steps to reproduce the issue

  1. Try to edit a series tag and enter RI into the field.

Audiobookshelf version

2.11.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?

Chrome

Logs

No response

Additional Notes

No response

@tdz262 tdz262 added the bug Something isn't working label Jul 30, 2024
@nichwall
Copy link
Contributor

Could you attach some browser logs when this happens (you can access these logs using F12)? Sounds like something on the page is crashing

@tdz262
Copy link
Author

tdz262 commented Aug 1, 2024

Ok i hit f12 when i came across the error. I copied the console page. What else am i suppose to do?
chromelog.log

@nichwall
Copy link
Contributor

nichwall commented Aug 1, 2024

Thanks for sharing the log. And there isn't anything other indication in the UI that something broke? Like there are no error popups?

Looks like the same thing as #2158 and #1663, but a specific fix was not found.

If you're willing to share your database file (the SQLite file in /config, make sure your server is not running before copying the file) or a backup from /metadata/backups, that would be useful for reproducing the problem because a root cause hadn't been found. This can be emailed or DM'd on discord.

@nichwall
Copy link
Contributor

After some research, it looks like this is due to duplicate series existing in the database, and duplicates of the same series being filtered cause the crash. Thanks to the database you provided, I found four different series of "The Wraith's Haunt Series " in the series table, as shown below.
image

I was able to reproduce the issue of two characters causing the web client to get in an unresponsive state, such as:

  • The Wraith's Haunt Series
  • The Wraith's Haunt Series
  • The Wraith's Haunt Series
  • The Wraith's Haunt Series
  • The Wraith's Haunt Series

I added a debug print to the itemsToShow function in the InputDropdown component (original function shown below

itemsToShow() {
if (!this.editable) return this.items
if (!this.textInput || this.textInput === this.input) {
if (this.showAllWhenEmpty) return this.items
return []
}
return this.items.filter((i) => {
var iValue = String(i).toLowerCase()
return iValue.includes(this.textInput.toLowerCase())
})
}
).

image

The Solution

I modified the itemsToShow function to only return unique entries, and that has fixed the web client crashing, and while this does fix the issue, this then leads to an issue of not knowing which of these series you are adding the book to.

A better solution is to ensure that duplicate series cannot be created, and add a database cleanup step (maybe during server startup?) to catch series with the same name that may exist from previous server versions. For example, right now if you go to the series view on your server, you will see 4 series with the same name, each with a single book in them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants