blawar / nut

GNU General Public License v3.0
1.12k stars 193 forks source link

[Bug] nut + Tinfoil Errors (MTP, `Failed to Create Thread!`, etc.) #314

Closed forthwrong1 closed 3 years ago

forthwrong1 commented 3 years ago

Versions Switch: First version Atmosphere: 12.1.0-0.19.5-r2 - Latest Firmware: 12.1.0 - Latest Sigpatches: Latest from https://github.com/ITotalJustice/patches/releases/tag/12.1.0-0.19.5-r2 Tinfoil: Self-Installer 12.10 - Latest Nut.exe: NUT 3.3 - latest Tinfoil Drivers installed: yes -latest

  1. I start nut.exe and get the following console log: https://pastebin.com/yx1xMSxP
  2. I start Tinfoil on my Switch
  3. I connect the usb between the laptop and switch. The usb drive shows in tinfoil. The games show in tinfoil. All seems to be going well. Then, within 30 seconds, The following error message repeatedly spawns until I press the home button to exit Tinfoil: Failed to Create Thread!. Only opening Tinfoil, and not connecting it to nut, does not produce any error.
forthwrong1 commented 3 years ago

Update: If I can start installing a game before the error messages pop up, then the nut console log shows that the game continues to download to completion. The error message shows up during the download and continues to spam spawn until tinfoil is closed.

Also of note is that once the USB is connected, if I go to the 'New Games' tab of Tinfoil, the games in the list seem to be constantly refreshing, as is evidenced by the flickering of that portion of the screen.

sotojo01 commented 3 years ago

exact issue also. I tried different cords and known working cords. I have the latest driver, nro, and nut. Issue occurs in both nsp and nro. It still completes usb transfers if you can start process before the error but tinfoil must be rebooted afterwards. Seems to occur once you start browsing usbfs

blawar commented 3 years ago

I'm seeing multiple reports of this. Will be fixed soon.

escapeartist5 commented 3 years ago

Same issue here. I tried the latest 3 versions of nut and same result (3.1, 3.2, 3.3)

blawar commented 3 years ago

unable to reproduce. still investigating, but it is difficult to fix unless I can reproduce.

I run clean atmosphere 19.5 on sysnand with no custom sys modules booting with fusee primary. I am investigating the possibility of atmosphere modifications causing the problem.

sotojo01 commented 3 years ago

I’m running mission control sys mod only. Emunand vanilla atmo 19.5 fw 12.0.1 booted via fusee primary. Latest nut and driver. Happens inconsistently with that error. But almost certainly happens within a few minutes or installs once browsing usbfs. I think when I rolled back nut and tinfoil offline it didn’t error .

escapeartist5 commented 3 years ago

I have a fresh Switch setup and the issue happens within a minute of plugging in the USB cable to my PC running nut while in Tinfoil.

Here are my details:

samriggio commented 3 years ago

I receive the same error in both Tinfoil and Lithium connecting via USB to a Linux Mint laptop.

Atmosphere 19.5 (no sysmods) booted with fusee-primary Emunand 12.1.0 System firmware 12.10 Tinfoil or Lithium Nut 3.3

blawar commented 3 years ago

@samriggio @escapeartist5 can you try going into tinfoil options and disabling "extract icons" from NSP's. Also, can you delete your files.json / make sure NUT has not indexed any files, then try usbfs and see if you get the error?

console output from NUT would also help, perhaps its trying to extract too many icons or erroring when trying to extract from a specific file such as an XCI.

neoflower commented 3 years ago

I'm also having this issue. Have tried using a fresh files.json and disabling 'extract icons from nsp', the problem still persists.

Console output from tinfoil shows:

USB Connected
Entering NUT thread
MTP connect

this is on a constant repeating loop until the error appears. (Have tried disabling MTP in tinfoil options, error still appears)

Ga1aga commented 3 years ago

Can confirm I'm having the same issue as OP, I did a fresh install of everything

Atmosphere 0.19.5 on emunand Tinfoil 12.10 Nut 3.3 OFW 12.1.0 Latest Sigpatches Booting with fusee-primary

drewskidrewsgv commented 3 years ago

I'm having the same issue and I noticed it happens more with larger files. I was able to install smaller 1GB-2GB XCI files, but larger files like 10GB and up the error happens about half way through at the 40% mark or so.

Also Tinfoil will crash as well.

Artorios11 commented 3 years ago

I'm also experiencing this same error. Atmosphere M.19.2 Tinfoil->12.10 Nut ->3.3 Switch Firmware ->12.0.1 Downloaded Sigpatches through Sigpatch-Updater Booting with Fusee Primary The error only occurs when the Switch is connected to the PC through Nut . It does not matter whether or not a game is being downloaded or not , it simply starts spasming out with the error.

bbates728 commented 3 years ago

I am also experiencing this error

Atmosphere 0.19.5 Tinfoil 12.1 Nut 3.3 Switch Firmware 11.0.1

I am brand new to this but am available to try new settings to help isolate the problem.

AdamNJG commented 3 years ago

I am using the latest versions of Atmosphere, Tinfoil and nut with a switch firmware of 12.1.0 (my sd card is exFat)

I got this as an error log from nut:

usb exception: [Errno None] b'libusb0-dll:err [_usb_reap_async] reaping request failed, win error: A device attached to the system is not functioning.\r\n\n'

AdamNJG commented 3 years ago

It is also worth noting that installations are working, but the Failed to Create Thread! error creates pop ups at increasing speeds, but nut is still transfering and the application works after transfer has finished from nut

drewskidrewsgv commented 3 years ago

It is also worth noting that installations are working, but the Failed to Create Thread! error creates pop ups at increasing speeds, but nut is still transfering and the application works after transfer has finished from nut

Mine doesn’t. It shows that it’s still transferring but Tinfoil crashes then it will just stay stuck usually around 40-50%

AdamNJG commented 3 years ago

It is also worth noting that installations are working, but the Failed to Create Thread! error creates pop ups at increasing speeds, but nut is still transfering and the application works after transfer has finished from nut

Mine doesn’t. It shows that it’s still transferring but Tinfoil crashes then it will just stay stuck usually around 40-50%

It may be that the things I installed were smaller in size, trying a larger one now (30gb)

Also I am not sure what the transfer speed should be, but it starts off at 100mb/s and dropping to around 30mb/s over time,

kolgon commented 3 years ago

I do experience the same issue. Also for me it still can install smaller files (biggest I managed to install since the bug is happening was 1.3 GB). When it comes to bigger files then nut tells me that everything was sucessfull, when I try to launch the installed file then it tells me some files are corrupted and it wont start. Also from Tinfoil I can only leave with using the home button and then running another game.

blawar commented 3 years ago

Can someone confirm that disabling MTP in the options (then restarting) fixes the issue? You may have to install the USB driver using zadig if you do this, because this reverts back to the old driver.

kolgon commented 3 years ago

Can someone confirm that disabling MTP in the options (then restarting) fixes the issue? You may have to install the USB driver using zadig if you do this, because this reverts back to the old driver.

Can not confirm. Disabled MTP (then restarted). Also installed the libusbK (v3.0.7.0) driver using zadig. Still same issue going on.

Artorios11 commented 3 years ago

Can not confirm. Disabled MTP (then restarted). Also installed the libusbK (v3.0.7.0) driver using zadig. Still same issue going on.

Experienced the same results as Kolgon

garsbien commented 3 years ago

{ "paths": { "titleBase": "titles/{name}[{id}][v{version}].nsp", "titleDLC": "titles/DLC/{name}[{id}][v{version}].nsp", "titleUpdate": "titles/updates/{name}[{id}][v{version}].nsp", "titleDemo": "titles/demos/{name}[{id}][v{version}].nsp", "titleDemoUpdate": "titles/demos/updates/{name}[{id}][v{version}].nsp", "nsxTitleBase": null, "nsxTitleDLC": null, "nsxTitleUpdate": null, "nsxTitleDemo": null, "nsxTitleDemoUpdate": null, "nszTitleBase": null, "nszTitleDLC": null, "nszTitleUpdate": null, "nszTitleDemo": null, "nszTitleDemoUpdate": null, "xciTitleBase": null, "xciTitleDLC": null, "xciTitleUpdate": null, "xciTitleDemo": null, "xciTitleDemoUpdate": null, "scan": [ "C:/Users/darkp/Downloads/titles" ], "titleDatabase": "titledb", "keys": "keys.txt", "calibration": "PRODINFO.bin", "shopNCert": "ShopN.pem", "nspOut": "_NSPOUT", "titleImages": "titles/images/", "duplicates": "duplicates/" }, "compression": { "level": 19, "auto": false }, "pullUrls": [], "threads": 1, "download": { "base": true, "demo": false, "DLC": true, "update": false, "sansTitleKey": false, "deltas": false, "regions": [], "rankMin": null, "rankMax": null, "fileSizeMax": null, "fileSizeMin": null, "ratingMin": null, "ratingMax": null, "releaseDateMin": null, "releaseDateMax": null, "mtime_min": null, "mtime_max": null }, "server": { "hostname": "0.0.0.0", "port": 9000 }, "autolaunchBrowser": true, "autoUpdateTitleDb": true, "allowNoMetadata": true }

if we put thread on 0 ? from nut.conf ?

Knowitall599 commented 3 years ago

Well, I just found this problem was solved by simply running it in compatibility mode for Windows 7. No error was thrown for an nsp file of any size.

Artorios11 commented 3 years ago

Running Nut (3.3) with compatibility mode for Windows 7 has not had any effects for me. Still encountered the 「Failed to create thread」error on the first seconds of attempting a download.

kolgon commented 3 years ago

I also tried Windows 8 compatibility mode, still the same error.

Knowitall599 commented 3 years ago

Interesting...It doesn't help in all circumstances. I wonder how difficult this is to solve if I looked at the code. Has anyone looked into what they thought it might be.

tadeu2 commented 3 years ago

I have the same error. Ive installed Mario Odissey by pressing enter in the nut console, and ok in the pop up window at the same time. It continously until it finish.

kolgon commented 3 years ago

Is there a good guide how to install NSPs via FTP. Maybe we could use this until the nut problem is fixed. Some good titles are waiting to be played :D

Knowitall599 commented 3 years ago

Oh yeah, if this doesn't work then just use tinfoil to copy files to the sd card, but use the nro version and don't install shit on your system. Make sure you know how it works, but I'll say that you can use the same drivers to do this. To install other homebrew/backups you will need tinwoo on github. Make sure you grab version 5 of the usbloader and install python stuff on your computer. You won't get any more errors and you will be able to do whatever it is you want @kolgon.

forrany commented 3 years ago

The same here....

Knowitall599 commented 3 years ago

The problem isn't with NUT you guys. Its with the driver or tinfoil.

bbates728 commented 3 years ago

@Knowitall599 can you eli5 how to fix it?

kolgon commented 3 years ago

The problem isn't with NUT you guys. Its with the driver or tinfoil.

I was about to say that too. Seems to be switch sided. I installed some nsp files using TinWoo / NS USBloader via network connection, it installs fine gives me the "congrats everything went fine" message, when I try to run the installed backup it shows me the exact same error as I got with the failed Tinfoil/Nut install.

So maybe just try a reinstall of Tinfoil then?

Knowitall599 commented 3 years ago

Everyone should learn to use libusbK and install the package that includes an inf maker wizard thingy. Once you have the correct values from the inf file that blawar did put together you could understand. Now all you need is the registry entry, but you have to edit the value in the with regedit after you merge(install) it. Once you have the value changed from 600000 to a timeout of 100000 then you won't have any issue, but I wouldn't use the tinfoil interface for that. Instead, use windows and it will let you know where to install that shit if you browse to the correct drive. Once under that drive you'll see something that looks like an empty file and another thing that says drag here to install. Works better then doing that shit on tinfoil on the switch.

Kadravor commented 3 years ago

Atmosphere 0.19.5 on EmuNAND Tinfoil 12.10 Nut 3.3 OFW 12.1.0 Latest Sigpatches Booting with fusee-primary

I changed the timeout values in [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\VID_16C0&PID_27E2&MI_01\6&2ad25e3f&1&0001\Device Parameters] from 60000 to 10000 and it now takes longer before the error starts showing up on tinfoil. Nut seems to be behaving with no problem during transfers soooo it might come from tinfoil?

Chnaps commented 3 years ago

impossible to do anything on my side... as soon as I connect my usb the message "Failed to Create Thread!" appears continuously and I can't do anything has anyone managed to correct this ?

Epusdaw30 commented 3 years ago

The issue appears to be related to emunand as everyone who specified said they were running on emunand and those who could not reproduce the issue were on sysnand. (I also have this issue and use emunand, will test on sysnand now)

Chnaps commented 3 years ago

The issue appears to be related to emunand as everyone who specified said they were running on emunand and those who could not reproduce the issue were on sysnand. (I also have this issue and use emunand, will test on sysnand now)

Sorry I should have mentioned I am on sysnand

Marde92 commented 3 years ago

Well im on clean install too Atmosphere 0.19.5 on SYSNAND Tinfoil 12.10 Nut 3.3 OFW 12.1.0 Latest Sigpatches Booting with fusee-primary

And in Tinfoil console it says in the beginning: NUT Device created USB Connected Entering NUT thread dep write parseReportData failed 8C820000 NUT write packet failed! NUT usb initialized! exiting NUT thread retrieved file list in 985 ms, registered 244 files in 7 ms data change: 0

and then it starts looping for 84 times in my case and fails on attempt 85:

USB Connected Entering NUT thread MTP connect

maybe it has to do with this NUT write packet failed! error??? This also happens with no nsps or XCis added to NUT. Only difference it says 0 files registered. With the exact same error at the beginning so i thought this maybe has something to do with it. I dont have any clue of this just want to help figure this out. Maybe this helps @blawar

kolgon commented 3 years ago

So it definitely is Tinfoil. I tried installing some Backups directly from HDD via USB C Adapter. Halfway through the installation it shows up a different error which says "corrupted block detected". The Backup then shows up in the Home Menu but cannot be started. Same results when installing from HDD using Tinwoo. There is no error and it says everything was sucessfull, still the Backup would not load.

This is so annoying.

EDIT: disabled the MTP protocoll in Tinfoil and managed to install a large backup nsp with 13gb with no error displayed during installation. Still the Backup wouldnt boot.

mcoderkh commented 3 years ago

Atmosphere 0.19.5 on SYSNAND Tinfoil 12.10 Nut 3.3 OFW 12.1.0 Latest Sigpatches Booting with fusee-primary

I was running older nut 2.7 then installed nut 3.3 some error come while loading nut waited while nut loading then same above issue

EDIT: Disabled MTP and copy game to SD card, try to install using tinfoil (NSZ) not working as its not installing and go back to main menu

Kadravor commented 3 years ago

EDIT: Disabled MTP and copy game to SD card, try to install using tinfoil (NSZ) not working as its not installing and go back to main menu

My MTP is enabled but I also have trouble with NSZ. I get a crash to menu everytime I try to install one

mcoderkh commented 3 years ago

EDIT: Disabled MTP and copy game to SD card, try to install using tinfoil (NSZ) not working as its not installing and go back to main menu

My MTP is enabled but I also have trouble with NSZ. I get a crash to menu everytime I try to install one

I will try with XCI, let see

Edit: I gave up trying I will install ns-usbloader and used woo-installer hope it works!!!!

Edit 2: delete tinfoil and install nsp tinfoil using goldleaf , when connected through USBto PC log in console keeps writing MTP connected USB connected for ever until remove the USB is that nomal?!!

kolgon commented 3 years ago

EDIT: Disabled MTP and copy game to SD card, try to install using tinfoil (NSZ) not working as its not installing and go back to main menu

My MTP is enabled but I also have trouble with NSZ. I get a crash to menu everytime I try to install one

I will try with XCI, let see

Edit: I gave up trying I will install ns-usbloader and used woo-installer hope it works!!!!

Let me know! Did not workout well for me.

And also for the records: Atmosphere 0.19.5 on Emunand Booting with fusee-primary Tinfoil 12.1 Latest Sigpatches Also latest TinWoo installer

Nut+Tinfoil: Failed to create Thread Tinfoil + HDD over USB C Adapter: Backup installs, wont start -> data corrupted TinWoo (either USB or Network via NSUSBLoader or HDD directly): installs sucessfully, wont start -> data corrupted

any more ideas? Will try a full clean install with only Tinfoil running. Anyone had better results on Sysnand ?

EDIT the second: I used the GameCard Installer from the HB Menu to install one of my GameCards directly, worked just fine.

ghost commented 3 years ago

FYI: As this thread is getting long, just remember that you can modify your Notifications settings on the right panel.

Please use this template to report issues, as there are a lot of variables:

Versions



mcoderkh commented 3 years ago

EDIT: Disabled MTP and copy game to SD card, try to install using tinfoil (NSZ) not working as its not installing and go back to main menu

My MTP is enabled but I also have trouble with NSZ. I get a crash to menu everytime I try to install one

I will try with XCI, let see Edit: I gave up trying I will install ns-usbloader and used woo-installer hope it works!!!!

Let me know! Did not workout well for me.

And also for the records: Atmosphere 0.19.5 on Emunand Booting with fusee-primary Tinfoil 12.1 Latest Sigpatches Also latest TinWoo installer

Nut+Tinfoil: Failed to create Thread Tinfoil + HDD over USB C Adapter: Backup installs, wont start -> data corrupted TinWoo (either USB or Network via NSUSBLoader or HDD directly): installs sucessfully, wont start -> data corrupted

any more ideas? Will try a full clean install with only Tinfoil running. Anyone had better results on Sysnand ?

EDIT the second: I used the GameCard Installer from the HB Menu to install one of my GameCards directly, worked just fine.

This is what I did, change sigpatches to https://gbatemp.net/threads/sigpatches-for-atmosphere-hekate-fss0-fusee-primary-fusee-secondary.571543/ then tinfoil stop popping the annoying message but USB is not loading games packages -> its a progress.

install woo installer.nro in switch. then used nsusbloader but gave me error usb not found but there is a download/install driver for windows in it which I didnt know OMG. click it and work like a charmed. I manage to install XCI using the USB from woo installer more than 5 GB.

Chnaps commented 3 years ago

EDIT: Disabled MTP and copy game to SD card, try to install using tinfoil (NSZ) not working as its not installing and go back to main menu

My MTP is enabled but I also have trouble with NSZ. I get a crash to menu everytime I try to install one

I will try with XCI, let see Edit: I gave up trying I will install ns-usbloader and used woo-installer hope it works!!!!

Let me know! Did not workout well for me. And also for the records: Atmosphere 0.19.5 on Emunand Booting with fusee-primary Tinfoil 12.1 Latest Sigpatches Also latest TinWoo installer Nut+Tinfoil: Failed to create Thread Tinfoil + HDD over USB C Adapter: Backup installs, wont start -> data corrupted TinWoo (either USB or Network via NSUSBLoader or HDD directly): installs sucessfully, wont start -> data corrupted any more ideas? Will try a full clean install with only Tinfoil running. Anyone had better results on Sysnand ? EDIT the second: I used the GameCard Installer from the HB Menu to install one of my GameCards directly, worked just fine.

This is what I did, change sigpatches to https://gbatemp.net/threads/sigpatches-for-atmosphere-hekate-fss0-fusee-primary-fusee-secondary.571543/ then tinfoil stop popping the annoying message but USB is not loading games packages -> its a progress.

install woo installer.nro in switch. then used nsusbloader but gave me error usb not found but there is a download/install driver for windows in it which I didnt know OMG. click it and work like a charmed. I manage to install XCI using the USB from woo installer more than 5 GB.

I confirm, this worked for me

Marde92 commented 3 years ago

Well for me installing via network works without any problems but it's slower. I also can install NSP from SD card. Only problem is this annoying error when using usb

YourSaviour commented 3 years ago

Finally found a solution.

It's the Tinfoil to blame. I deleted it and erased all files on the sd card in Tinfoil folder. Re-installed a new version (Try applet and the other versions)

Open Tinfoil first time without being connected to a USB. And Voila, open your NUT and everything should be as good as new!