Giter Site home page Giter Site logo

Comments (22)

slook avatar slook commented on July 20, 2024 1

the same or very similar issues

@darkstar1971 It might be the same error but in a different place, please provide a copy of the stack trace from the Critical Error dialog if you can thanks.

couldn't isolate the lines in init.py that might need editing (of course it could be other files that are to blame

The error can probably be avoided using encode_path() (import from utils module) inside os.statvfs() on the actual line that raises the error, which in @hogbat 's trace would be needing a change on line 1827 in transfers.py:

max_bytes = os.statvfs(encode_path(folder_path)).f_namemax

However, I don't know if that workaround would work or not (since I cannot test this) nor is it the best way to resolve the regression if there are other UTF-8 releated problems elsewhere, or if this crash would warrant backporting a proper fix into the 3.2.x branch or not (another release of Nicotine+ 3.2.10 was not planned, since there's no CI in that branch anymore), but now there are a grand total 2 known Critical crashes in Nicotine+ 3.2.9 (this one and the "slsk://username" crash in the userbrowse module), then maybe @mathiascode could be tempted to consider, in the interests of the endevour to create a super-stable release for the history books, doing a legacy backport in the interim before releasing 3.3.0?

Thank you both very much for your reports, do you have a way of establishing if the issue still exists in Nicotine+ 3.3.0.dev6 or not?...
https://github.com/nicotine-plus/nicotine-plus/blob/master/doc/TESTING.md (minimum version Python 3.6 required)

from nicotine-plus.

mathiascode avatar mathiascode commented on July 20, 2024 1

Duplicate of #2569, see this comment: #2569 (comment)

In short, the issue was worked around in the current unstable version, but your file system uses the wrong encoding, so non-ASCII characters crash Nicotine+ 3.2.9. Try setting the locale and see if it helps: https://stackoverflow.com/questions/27931668/encoding-problems-when-running-an-app-in-docker-python-java-ruby-with-u

@slook No more 3.2.x releases are possible, since Windows 7 support was dropped by MSYS2 (and CI is probably completely broken by now).

from nicotine-plus.

darkstar1971 avatar darkstar1971 commented on July 20, 2024 1

i was able to get cproensa's testing image (3.3.0.dev6) and it works flawlessly when downloading folders w/ diacritical marks in the name.

the interface is much nicer than 3.2.9 - more responsive scrolling on my macbook (3.2.9 scrolling was too fast), for one thing. it's difficult to explain but all the components of the UI seem sturdiesr. i expect that many features have been debugged and streamlined.

great work by team nicotine!

from nicotine-plus.

slook avatar slook commented on July 20, 2024 1

how do I assign a different user to run the container?

@darkstar1971 I did find possibly useful information about this, see link:
https://github.com/fletchto99/nicotine-plus-docker#user--group-identifiers

from nicotine-plus.

darkstar1971 avatar darkstar1971 commented on July 20, 2024

i am experiencing the same or very similar issues on a Synology NAS running nicotine+ in a docker container. same error but it doesn't always abort the app and require fresh install.

i get this error when attempting to download a folder with diacritical marks (accented characters) in the name. however, i can download individual files with diacritical marks.

after a certain number of these errors i'm kicked off server.slsknet.org and can't log back in. restarting nicotine+ doesn't fix the problem. i'm forced to delete then reinstall the nicotine+ container - and Web Station (which among other things assigns ports to containers).

supposedly the edits to source code below fixed the problem back in Oct 2021, but it appears to have been broken again. when i compared the file init.py in the current code base to the one referenced in this code there are many differences, so many that a non-coder like myself couldn't isolate the lines in init.py that might need editing (of course it could be other files that are to blame - like the two referenced in the error you posted a screenshot of: search.py and transfers.py. that said, my hunch is that they are merely the files that triggered an error in another file that handles Unicode.

23d7d25

from nicotine-plus.

earwigcahootz avatar earwigcahootz commented on July 20, 2024

Unfortunately, I cannot test the new version as I am using a template for my container and do not know how to manually update to a different version.

from nicotine-plus.

slook avatar slook commented on July 20, 2024

Fair enough, I thought that might be the case. Please can you ask the author of your template to test Nicotine+ 3.3.0.dev6 (master) for us, since we currently have no Docker testers, the Release Candidate(s) will available during December.

from nicotine-plus.

earwigcahootz avatar earwigcahootz commented on July 20, 2024

Hmm, there doesn't seem to be a way to contact this author via Dockerhub. I found the user here on Git but they don't have any project related to this container or any other way for me to message them that I'm aware of.

from nicotine-plus.

slook avatar slook commented on July 20, 2024

See also discussion #2312

from nicotine-plus.

earwigcahootz avatar earwigcahootz commented on July 20, 2024

See also discussion #2312

I hadn't thought of looking into other clients to run in Docker. I'll have to read up on them. When I tried N+ and found the search result filter I was happy so I looked no further.
Thanks!

from nicotine-plus.

slook avatar slook commented on July 20, 2024

slskd does have search result filters, and it comes with its own docker container (in fact, that is the main way it is intended to be run). Of course it has no desktop UI, which is almost always an advantage for running applications remotely imo.

However, please do try N+ out again in a later version when you can!

from nicotine-plus.

darkstar1971 avatar darkstar1971 commented on July 20, 2024

i've tried multiple times to map a DSM share volume to a debug path in nicotine+ as docker run, docker compose and within Container Manager like so:

-v /volume1/docker/nicotine/config/data:/root/.local/share/nicotine

when I do that i can't log in to the slsk server, and get an error like this (the dialog box in the upper left is only partially visible and clicking on the button to "change login details" doesn't clear the dialog box ... i can't use tab to toggle between buttons / form fields either):

Screenshot 2023-11-22 at 10 38 05 PM

the permissions on volume1/docker/nicotine/config/data are the same ones running the docker container.

the /root/.local/share/nicotine/logs folder has always been empty even after triggering the UnicodeEncodeError - though earlier i did find a log file /root/.local/share/nicotine/logs/private/somebuddy.log which contains the message i sent to "somebuddy."

the debug folder defined in n+'s logging settings is /root/.local/share/nicotine/logs/debug

so when it comes to the error which is generated when attempting to download a folder with diacritical marks in the name, i'm only able to provide a screenshot which is basically identical to hogbat's:

Screenshot 2023-11-24 at 12 15 48 AM

nothing is copied to the clipboard when clicking on "Copy & Report Bug."

thanks for your interest in troubleshooting this issue. i will say that now that since i figured out how to replicate the error and how to avoid it (downloading files instead of the folder, even when they also have diacritical marks, works fine) and nicotine has been very stable now for a little over 24 hours.

from nicotine-plus.

darkstar1971 avatar darkstar1971 commented on July 20, 2024

i spoke too soon. after replicating the twice (maybe three times?) while trying to get a clean screenshot has apparently caused n+ to disconnect from the slsk server. i'm not getting any results when searching.

this means i will have to delete the n+ container (and uninstall web station - an unrelated issue) and start from scratch. bummer.

by the way i am using n+ version 3.2.9 (https://hub.docker.com/r/sirjmann92/nicotineplus-proper).

i've also installed n+ using portainer.

one last weird detail: i can no longer log in as my original username - i get that error about "Changing login details."

when i try to login with my original name / pw in slsk on my laptop, i get this error:

Login failed due to a wrong username/password combination. If you haven't logged in in a while, it's possible your username was recycled and taken by another user. Please try logging in with a different username and password using the button below, or via the 'Login As' button above the Options->Login tab.

so maybe someone took my username in the very short period of time when i was logged out. strange.

from nicotine-plus.

darkstar1971 avatar darkstar1971 commented on July 20, 2024

any advice on debug logging?

if i have the debug path set as /root/.local/share/nicotine/logs should a debug.log file be created any time there is an error?

from nicotine-plus.

slook avatar slook commented on July 20, 2024

Only if logging to file is on in Preferences > Logging

from nicotine-plus.

darkstar1971 avatar darkstar1971 commented on July 20, 2024

ah, ok, i didn't notice the checkboxes for different logging options. i thought if i defined that log path in docker compose / container manager / portainer that it would use that folder to create a debug log.

i triggered the folder w/ special characters error but all i got in the debug file was this:

root@nicotine:~/.local/share/nicotine# cat logs/debug/debug_1700815076.log
2023-11-25 00:14:21 Failed to open URL: No known URI provider available

from nicotine-plus.

slook avatar slook commented on July 20, 2024

Open the log with something like nano or vim instead.

It's questionable whether or not nicotine might be unhappy about running as the root user in the container.

from nicotine-plus.

darkstar1971 avatar darkstar1971 commented on July 20, 2024

vi shows the same text as cat.

from nicotine-plus.

darkstar1971 avatar darkstar1971 commented on July 20, 2024

Open the log with something like nano or vim instead.

It's questionable whether or not nicotine might be unhappy about running as the root user in the container.

this is a sortof embarrassing question (because so basic), but how do I assign a different user to run the container? i thought it would run as my default DSM user.

thanks

from nicotine-plus.

slook avatar slook commented on July 20, 2024

I do not have much more than minimal experience with using Docker, so I'm not sure whether or not in Docker it is best practice to create a regular user for security, because as a rule in linux don’t do everything in root.

That would involve having the core-utils and sudo packages (or equivalent) available to create a user called "user" or such using useradd and groupadd linux commands within the container, to create a restricted account, then installing the nicotine package under that user.

To further elaborate the container environment, you might install other packages such as nano (for editing config files) and locales (for setting the proper UTF-8 filesystem encoding that drives towards efforts to avoid this bug).

Afterwards, any unnecessary packages should be removed from the container environment for hardening the system.

As such, the program should be run within an unprivileged userspace environment that is more like what it is designed for.

from nicotine-plus.

mathiascode avatar mathiascode commented on July 20, 2024

Closing as duplicate, since the issue will be fixed/worked around in Nicotine+ 3.3.0 regardless.

from nicotine-plus.

darkstar1971 avatar darkstar1971 commented on July 20, 2024

yes that's exactly it, PUID and PGID are the way to control user permissions within the nicotine+ docker..

from nicotine-plus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.