blawar / nut

GNU General Public License v3.0
1.11k stars 195 forks source link

[Bug] Linux Nut server files aren't populating in Tinfoil #311

Open kangfat opened 3 years ago

kangfat commented 3 years ago

Describe the bug When using the Nut server on Linux (Ubuntu) files don't populate in Tinfoil. This only happens with Linux based systems when attempting to install via network.

To Reproduce Steps to reproduce the behaviour:

  1. Setup Nut in Linux environment
  2. Enter Nut server info into Tinfoil
  3. Refresh/restart Tinfoil

Actual behaviour No files are listed in Tinfoil under New Games/DLC/Updates.

Expected behaviour Files from Nut to be displayed .

NUT version (or git hash):

Additional context This was working at one point in time but I've been unable to get it to work under Linux for a few months now. I've installed Nut multiple times on multiple different machines/VMs with no luck. I have had no issues with Windows based systems.

kangfat commented 3 years ago

I updated the OP but this issue is seen via network installs.

blawar commented 3 years ago

does nutfs work through the file browser @kangfat ?

kangfat commented 3 years ago

I haven't setup the GUI version on my desktop box, however, I will if it will help. I can go to IP:9000 in a web browser and it will list all of the files I have. This has worked on every system I've tried it on, it just won't list the files in Tinfoil.

kangfat commented 3 years ago

Do you mean listed under usbfs:, nutfs:, (somewhere else) in File Browser or in New Games?

nutfs and both File Browser and New Games.

cptsk1ttles commented 3 years ago

I'm having the same issue. When running the server in standard mode all my games are scanned as i'd expect however running them in server mode which i need for my setup does not scan the files. I like the OP am using v3.3 also running in standard mode fills up my disk because it copies all the games from my mounted directory to the nut directory filling up the disk.

v2.7 is the latest version that still works. I'm thinking its either something the OP and I are not doing in the config file or maybe the scan subroutine isn't being run for some reason in server mode.

my conf file is supersimple I've also tried just modifying the default one provided with the same result.

{ "paths": { "scan": ["/media/ns"] }, "server": { "hostname": "0.0.0.0", "port": 9000 } }

black8592 commented 2 years ago

Had the same in windows, files not showing in usb / usbfs. But sometimes they showed up, messed around with drivers and wht not. But the solution is simple:

  1. Start NUT
  2. Start Tinfoil and confirm popups
  3. Connect switch to pc, it says loading usb files
  4. Enjoy.

think the event for loading usb files or something is not triggered properly if the switch is already plugged in before starting tinfoil, or popups interfere. even if i remove the cable and reinsert while tinfoil is running it won't load. I have to follow the order above.

Sometimes it will work if it's plugged before starting tinfoil, have not found a pattern yet. Sometimes it say "refresh", followed by "loading usb files", then it works. Sometimes I even see "unloading usb files", no files after. To make it work 100% follow the steps above. This triggers the "loading usb files" message every time.

I'm using firmware 13.0.0 and newest athmosphere, thik it was 1.1.0.0

ghost commented 2 years ago

Here work perfectly on Linux (Ubuntu Server 20.04LTS). But I need to do some steps:

  1. Point nut.conf to the directory with files (top level directory), e.g.: "scan": ["/mnt/titles/"]
  2. Scan files before enter in server mode: python nut.py -s
  3. Start server mode: python nut.py -S
  4. Configure Tinfoil to point to your local IP or name (if using local DNS) with nutfs protocol.
  5. Have fun!

I love to allow nut to organize things, so I normally use the -o options after -s and run with -s again to reindex. Doing that, everything works for me with nutfs. Nut 3.3 is working like a charm on my Linux. One thing, you cant run the scan if nut was running, so, stop the service (or the program) before execute the steps above.

I also put nut to load on boot with this entry:

# vi /etc/systemd/system/nutsrv.service

with the content:

[Unit]
Description=Nut Service
After=network.target

[Service]
ExecStart=/opt/nut/venv/bin/python3 /opt/nut/nut.py -S --silent
Restart=always

[Install]
WantedBy=multi-user.target

and then, enable to boot:

# systemctl enable nutsrv.service

So, just reload the services or reboot, if you prefer. I installed nut on /opt and create a virtualenv with Python to keep my system clean.

ogg1e commented 2 years ago

I'm seeing the same problem on ubuntu 20. If I browse to the server via http in chrome, I can see the titles. But when I setup tinfoil using the nutfs protocol, it shows an empty list.

di-effe commented 2 years ago

Not sure if it can help, but I had also to set user and password (guest/guest) on the tinfoil nutfs configuration