V10lator / NUSspli

NUS simple packet loader/installer
GNU General Public License v3.0
470 stars 17 forks source link

[v1.149] libcurl error 43 (bad argument) combined with random freezes #302

Closed ranvirsi1 closed 3 months ago

ranvirsi1 commented 5 months ago

it does it for anything i try to download idk why

V10lator commented 5 months ago

Could you show a picture of that error screen, please?

ranvirsi1 commented 5 months ago

Sure image Then the Wii U just freezes up and I have to unplug it

Monadoblade618 commented 5 months ago

Having same issue with the librecurl maybe it's something on there side?

V10lator commented 5 months ago

Stay on topic, please, or I'll have to clean up. For generic questions, like sigpatches, we have FAQs, GitHub and Discord support chats.

V10lator commented 5 months ago

As a first debugging step could one of the affected users run a DEBUG build of NUSspli, please? At the same time run https://github.com/dimok789/loadiine_gx2/raw/master/udp_debug_reader/UdpDebugReader.exe on your computer (make sure no firewalls or stuff are blocking connections between your Wii U and your PC).

This should produce a log output at UdpDebugReader while NUSspli is doing various things. With this setup running recreate the issue and just take a screenshot of the UdpDebugReader window once you see the red error screen on your Wii U then upload this screenshot here, please.

Thanks in advance to whoever will help in debugging. :)

V10lator commented 5 months ago

Also everyone affected tell me if you're using Aroma or Tiramisu, please, and if Aroma if you're using the Aroma or Channel version of NUSspli.

ranvirsi1 commented 5 months ago

Sure. I will run the debugger if i can

ranvirsi1 commented 5 months ago

Also everyone affected tell me if you're using Aroma or Tiramisu, please, and if Aroma if you're using the Aroma or Channel version of NUSspli.

I'm using aroma and the aroma version of NUSspill

ranvirsi1 commented 4 months ago

@V10lator is there a Mac version of udp debug reader as I don't have a windows machine 🥲

V10lator commented 4 months ago

@ranvirsi1 There's udplogreader. This is part of the homebrew SDK, so more complicated to install through. You would basically follow this: https://devkitpro.org/wiki/Getting_Started#macOS - then use pacman to install wut-tools. Or you somehow compile this for yourself: https://github.com/devkitPro/wut-tools/tree/master/src/udplogserver .

Sorry that I can't be of more help but am on Linux, not experienced with Mac.

udplogreader is just a CLI tool through, so you start it from terminal and you won't get any output except when the Wii U wants to log something. You should already see Aroma logging some things while the Wii U boots through, like this: image

AorsiniYT commented 4 months ago

Also everyone affected tell me if you're using Aroma or Tiramisu, please, and if Aroma if you're using the Aroma or Channel version of NUSspli.

The problem occurs in both the aroma and the channel version, I have already tried both versions, I also tried the tiramisu and it is the same.

AorsiniYT commented 4 months ago

image It stops there and the console stops completely, I have to turn it off and on again from the console

V10lator commented 4 months ago

@AorsiniYT Do you remember what the screen showed when it froze? Cause this doesn't look like it even reached the red error screen to me. Also could you maybe try to download the storage_slc:/sys/logs folder with FTP, zip it and handle it to me, please? Maybe this shows why it crashed for you.

AorsiniYT commented 4 months ago

logs.zip here you have

Kadrevex commented 4 months ago

Just a quick note, not sure if this is related at all. I've been having the libcurl 43 error for a few weeks and could only download small games. Last night I reset my router and downloaded games that are a few gigs with no problem at all . After downloading for most of the day with no problems, I got a libcurl error and then kept getting them again like before. I reset my router and now I can download big files again.

ranvirsi1 commented 4 months ago

Stay on topic, please, or I'll have to clean up. For generic questions, like sigpatches, we have FAQs, GitHub and Discord support chats.

So um where can i find the faq and discord?

V10lator commented 4 months ago

Told you to stay on topic or I'll have to clean up so here we go...

So um where can i find the faq and discord?

https://gbatemp.net/threads/nusspli-install-content-directly-from-the-nintendo-update-servers-to-your-wii-u.566055/ https://discord.gg/B8ZBd6mrnV

To the rest: Am still waiting for a debug log of the red error screen as the log from @AorsiniYT is from a crash before that screen.

johnblade commented 4 months ago

Updated last week to aroma, and had an update today for envloader and aroma base. Previously I used tiramisu with nuspli 0.145 and never had this issue. I will test on ethernet later. Don't hesitate to tell me if I can help by sending debug logs or other things.

edit: after almost 4hours of download for testing (nuspli aroma debug), for now not able to reproduce the issue...

V10lator commented 4 months ago

Do not just switch to LAN adapters, send logs as requested:

As a first debugging step could one of the affected users run a DEBUG build of NUSspli, please? At the same time run https://github.com/dimok789/loadiine_gx2/raw/master/udp_debug_reader/UdpDebugReader.exe on your computer (make sure no firewalls or stuff are blocking connections between your Wii U and your PC).

This should produce a log output at UdpDebugReader while NUSspli is doing various things. With this setup running recreate the issue and just take a screenshot of the UdpDebugReader window once you see the red error screen on your Wii U then upload this screenshot here, please.

Thanks in advance to whoever will help in debugging. :)

andrew-stclair commented 4 months ago

I downloaded the debug version and ran the UdpDebugReader while downloading stuff.

image

Edit: Seems the debug logging has stopped.

After taking that screenshot i had left it going to see if anything else came up, but no more logs are showing

V10lator commented 4 months ago

@andrew-stclair And it crashed before the red error screen? Something is going weird here...

V10lator commented 4 months ago

@andrew-stclair or someone other affected: Could you retry grabbing a debug log with this version, please? https://github.com/V10lator/NUSspli/actions/runs/9043164439 (that's basically NUSspli nightly and you normally should not use this but it might help with the crashes, letting the log flow a bit more. It might means no guarantee through, I'm just shooting into the blue to see what happens here).

andrew-stclair commented 4 months ago

Same result unfortunately. Wii U red screens with the same error and the last line in the log output is Download thread spawned!

then no new lines are printed

V10lator commented 4 months ago

Okay, so a new guess: There's a network (WiFi) error which causes the red screen while at the same time disconnecting the log connection. So we can't see what gets logged after that connection error.

Now this ofc. makes debugging way more complicated.

@andrew-stclair Did it crash through or was it possible to continue the download with the test version?

V10lator commented 4 months ago

Good news: Was able to reproduce the error 43 by simply removing the LAN cable in the middle of a download.

Bad news: It didn't crash for me. Now this could be cause I tested something new or cause the last test version fixed it already, so waiting for answer from @andrew-stclair :)

V10lator commented 4 months ago

After a lot of code reviewing and documentation reading it looks like error 43 is not our bug!

It is CafeOS returning "Non-supported option" (errno 92) to some WUT call (maybe socketlasterr? But that's really something for WUT devs to figure out, just can't pass the information forward as I'm banned there).

That also means it's no libCURL error: LibCURL does the completely right thing here as the errno WUT passed to libCURL is a invalid argument in that case.

So just the crashes left...

andrew-stclair commented 4 months ago

I'll run through a game download completely after work and see if i get any crashes. But when i was testing for you on the nightly builds i was not getting any.

V10lator commented 3 months ago

Hopefully fixed with v1.150.

andrew-stclair commented 3 months ago

To add to this, i got a USB Serial Debugger going using the plugin from Aroma for it.

00;32;48;717: Mon 20 May 2024 19:06:08.105      Calling curl_easy_perform()
00;32;48;718: Mon 20 May 2024 19:06:08.107      Download thread spawned!
00:37:56:309: NET: >>> Received request to kill all sockets.
00:37:56:311: NET: Socket binding (resource: 0x00001a82)
00;37;56;192: *** INFO: Thread:0x1174d540 Stack Size:0x0000fff8 Stack Used:0x000019e0 Name:NUSspli downloader
00;37;56;195: Mon 20 May 2024 19:11:15.584      STACK: NUSspli downloader: 0x000019E0/0x0000FFF8
00;37;56;195: Mon 20 May 2024 19:11:15.585      curl_easy_perform() returned: 43
00;37;56;196: Mon 20 May 2024 19:11:15.585      curl_easy_perform returned an error:  (43/0)
File: /vol/storage_usb01/install/game/0000000c.app
00:38:00:345: NET: Change admin state (1 -> 1)(iface:0 link:2)
00:38:00:345: [WD]>>>> Linkup msg from Net
00:38:00:355: wlc_mlme_join_cmd called with Command 0x3 Length 0x21
00:38:00:359: NET: Change admin state (2 -> 2)(iface:1 link:2)
00:38:00:359: NET: Change admin state (1 -> 1)(iface:0 link:3)
00:38:00:466: [WD]>>>> Linkup msg from Net
00:38:00:475: wlc_mlme_join_cmd called with Command 0x3 Length 0x21
00;38;05;371: Mon 20 May 2024 19:11:24.760      Resetting network!
00:38:08:457: Acquired IP address via DHCP client for interface: wl0

Don't know if anything in there is of assistance

sebastian2008JFG commented 3 months ago

Gente ayuda todavía me aparece este mismo error en la última versión de Nusspli y no puedo descargar mis juegos

sebastian2008JFG commented 3 months ago

Network error: Internal WUT error

See https://github.com/V10lator/NUSspli/issues/302#issuecomment-2108134284 Next attempt in 1 seconds.

NUSspli v1.151

sebastian2008JFG commented 3 months ago

Arreglen por favor la gente de Nusspli ese error

V10lator commented 3 months ago

English, please, else I have no idea what you're saying.

V10lator commented 3 months ago

Network error: Internal WUT error

It says internat WUT error for a reason: Not our bug but from DevktitPro / WUT.