[Bug]: Throwing Response as Error When Connecting Over SMB
Preflight Checklist
- [x] I have searched the issue tracker for a bug report that matches the one I want to file, without success.
OpenComic Version
1.6.0
Operating System
Manjaro
Installed via
Flatpak, AUR
Steps to reproduce
- Add an SMB Share
- Open the Share
These credentials were tested in the smbclient utility without issue.
Expected Behavior
A connection is made.
Actual Behavior
We receive the "Could not connect to the server: connection | undefined" error.
Error message
"Could not connect to the server: connection | undefined" opencomic.log
The error is thrown sometime during the call of this.smb.session = await this.smb.client.authenticate(auth);. It throws a "Request" object with a typeName of "SessionSetup."
Additional Information
Note that this error only appears if the Samba server is actually running.
Sample file
No response
Thanks for reporting!
I've done some testing and the issue occurs because the library I use in OpenComic does not support NTLMv2. I haven't found any Node.js library that supports it either. However, I've found several ways to make the SMB server work with OpenComic. You can use any of these methods.
Option 1: Enable NTLMv1 in Samba
In smb.conf:
[global]
ntlm auth = yes
Option 2: Mount the SMB server as a folder and add it to OpenComic as a master folder.
sudo mkdir -p /mnt/smb
sudo mount -t cifs //192.168.1.100/share /mnt/smb -o username=user,password=pass,vers=3.1.1
Then add the mounted folder as a master folder in OpenComic.
Option 3: Use Nautilus (Or any other file explorer that supports the same functionality) to connect to the SMB server.
- Go to OpenComic settings and add a master folder.
- In Nautilus, go to
Other Locationsand connect to the SMB server from there.
Screenshots:
just to add onto this. i use a truenas server. i couldnt get smb to work. and simply adding the location to the truenas folder location, though it will index into library, the comics in zipped file cannot be opened.
solution: was to create a network drive. Go to windows 11, right click my computer, select add map network drive. Once done, go to library, then add the network drive you added which now uses a drive letter e.g. X: then it will index and now it works when you try to view a comic. This is one solution to get it to work.