evan-buss / openbooks

Search and Download eBooks
https://evan-buss.github.io/openbooks/
MIT License
1.77k stars 57 forks source link

Only supports one session? #130

Closed tensor5g closed 1 year ago

tensor5g commented 1 year ago

If I attempt to connect to my openbooks container from multiple tabs or devices, I receive the error "Unable to connect to server" until I close the tab that is connected and refresh the new one. Is this a known limitation or a bug? If it is a limitation, are there any plans to allow multiple users? I think I will attempt to work around this by spinning up 3 instances and place them behind a load-balanced nginx reverse proxy, but that's something I don't expect most people would want to do. Natively supporting multiple users and queuing their searches/downloads seems like a much more ideal solution.

Destreyf commented 1 year ago

@tensor5g This is a recent change, it used to generate a random name for each session/connection based on a noun_adjective but now the name is required, I actually came here for the same reason.

As of v4.5.0 this change is in effect https://github.com/evan-buss/openbooks/releases/tag/v4.5.0

My guess is this was to reduce apparent spam as the IRC's don't really like when people use automated systems as it generates a lot of spam/bulk requests, which can bog down the system they have in place.

You can see a description of this in the docs: https://evan-buss.github.io/openbooks/irc-notes/

This does create some issues for me as well where I share access to this system with a couple family members.

I haven't tried it yet, but you could attempt to use an older version like v4.4.1.

tensor5g commented 1 year ago

You're right, I can see this in the release notes for 4.5.0: Opening a second browser tab will show an error message.

4.4.1 will probably fix it, but might also get you banned from the IRC. Hopefully something can be implemented to allow multiple browser sessions to share the same IRC session.

Destreyf commented 1 year ago

@tensor5g I did some digging, I think 4.4.1 will be safe (for now) as the IRC version sent appears to be the same between 4.4.1 and 4.5.0.

I also think doing some sort of queue/session management can be put in place as it simplifies my use case where I have multiple personal devices and relatives who have access to it.

tensor5g commented 1 year ago

The IRC version is the same, but the useragent is different. I tried using 4.4.1 and search didn't work. You can't manually set useragent in 4.4.1 without changing the code and manually building. I'll just have to hope for now that two people don't want to use it at the same time, or someone doesn't leave it open in a tab and forget about it.