GlitchEnzo / NuGetForUnity

A NuGet Package Manager for Unity
MIT License
3.25k stars 319 forks source link

Curl error 3: URL rejected #656

Open Nomad1108 opened 5 months ago

Nomad1108 commented 5 months ago

Description

I get one error "Curl error 3: URL rejected: Error" per package when opening the NuGet for Unity window. Packages icons do not load, so best case scenario that's a cosmetic issue, but still annoying...

Capture d’écran 2024-06-20 à 13 05 09
Nomad1108 commented 5 months ago

I tried both plugin install methods: as GIT dependency via Package Manager and then via .unitypackage file but still got the issue.

I've also tried to change the placement to "Custom within Assets" but it did not solve the issue.

Note that I'm not using any proxy...

Capture d’écran 2024-06-20 à 13 09 01
DilaverSerif commented 2 months ago

same

igor84 commented 2 months ago

I tried it on a Mac and I couldn't reproduce the issue. Can you open the icon URL in the browser (for example https://api.nuget.org/v3-flatcontainer/newtonsoft.json/13.0.3/icon)?

DilaverSerif commented 2 months ago

its okey but i have still errors.

Ekran Resmi 2024-09-11 10 57 12

packages.config are changing but I cant use the packages because cant pull packages.

Ekran Resmi 2024-09-11 11 03 38
owlvark commented 1 month ago

I was also getting those Curl errors in the console on a fresh install. I went into the Preferences and checked "Use Verbose Logging" and restarted Unity and the Curl errors did not appear. Perhaps the default NuGet.config has problems?

For reference, after the logging setting change these lines were added to the config:

<?xml version="1.0" encoding="utf-8"?> <packageSourceCredentials /> <add key="verbose" value="true" />

and <clear /> was removed.

Update: the errors are back. The logs have this as the url: Downloading image file:////var/folders/vj/5sqv1srj7ds8y8ztq... failed! Web error: Malformed URL, Handler error: .

owlvark commented 1 month ago

Ok, after further testing, I think it happens when there are spaces in the URL?

JoC0de commented 1 month ago

so they are only for File-URLs? Or how can a URL have spaces normally they are encoded with %20. Do you have spaces inside one of the folders that contain your Unity project?

owlvark commented 1 month ago

Yes, it is a file and there are spaces; it is trying to open a URL like this:

file:////var/folders/vj/5sqv1srj7ds8y8ztqddggkww0000gn/T/Studio Name/Game Name/ER4xRB-z5RmCSiBeUlEktw

This results in the Curl error and a log message that says Web error: Malformed URL towards the end. In my tests, when the spaces in that URL string are replaced with %20 the file loads as intended.

Nomad1108 commented 3 weeks ago

I can confirm that my "Company Name" in Player Settings is two words with a space between them, which would add at least one space to the URL.