Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DllExport crashing with proxy authentication error #133

Closed
kcl93 opened this issue Dec 18, 2019 · 5 comments
Closed

DllExport crashing with proxy authentication error #133

kcl93 opened this issue Dec 18, 2019 · 5 comments
Labels

Comments

@kcl93
Copy link

kcl93 commented Dec 18, 2019

How to reproduce:

Hello,
I get an error message "The remote server returned an error: (407) Proxy Authentication Required." when trying to execute DllExport on some selected computers at work. It happens Always when trying to Access the DllExport.bat both during Building in VS 2017 or while simply starting it in the Explorer.
The source of issue itself sounds very much like this here (I can't track it down myself): https://stackoverflow.com/questions/2581609/the-remote-server-returned-an-error-407-proxy-authentication-required

  • -version: v1.6.5.4044
  • -build-info: ?
  • Full command to Manager: does not matter
  • Project type: Class library
  • Environment ( VS, MSBuild, ...): VS2017

Used configuration:

Standard

Optional Project files / Samples:

Nothing

log (after removing '@echo off' from the Batch file):

Output.txt

@kcl93 kcl93 added the bug label Dec 18, 2019
@3F
Copy link
Owner

3F commented Dec 18, 2019

Thanks for the report!

log (after removing '@echo off' from the Batch file):

:) Please use -debug key, eg.: DllExport -debug ...

"The remote server returned an error: (407) Proxy Authentication Required."

Can you try to pass manually your credential before I start inspecting issue. I mean, does this work for you: -proxy [usr[:pwd]@]host[:port] [?]

@kcl93
Copy link
Author

kcl93 commented Dec 19, 2019

Hello :)

Thanks for the quick reply! This is the output when using the -debug option:

C:\Users\SomeUser>C:\SomeProject\src\DllExport.bat -debug
[ 8:31:12,62 ] dxpName = DllExport
[ 8:31:12,63 ] dxpVersion = 1.6.5
[ 8:31:12,64 ] -sln-dir =
[ 8:31:12,64 ] -sln-file =
[ 8:31:12,65 ] -metalib =
[ 8:31:12,66 ] -dxp-target =
[ 8:31:12,66 ] -wz-target = tools/net.r_eg.DllExport.Wizard.targets
[ 8:31:12,70 ] wPkgPath = packages\DllExport.1.6.5
[ 8:31:12,71 ] -pkg-link =
[ 8:31:12,71 ] -server = https://www.nuget.org/api/v2/package/
[ 8:31:12,72 ] GetNuTool call: /p:ngserver="https://www.nuget.org/api/v2/package/" /p:ngpackages="DllExport/1.6.5" /p:ngpath="packages\" /p:proxycfg=""

GetNuTool 1.7.0.18022_4bc1dfb - github.com/3F

Getting DllExport/1.6.5 ... The remote server returned an error: (407) Proxy Authentication Required.
Something went wrong. Try to use another keys.

There indeed seem to be some proxy configuration missing. I tried passing it with -proxy but I could not get it to work (likely due to myself using the wrong proxy settings as I am not exactly sure what the right ones are for our office).
It would be great if DllExport could just use the standard proxy settings as all other programs on the related computers work without problems.

I just realized, that you also provide an offline version of DllExport. This one works fine for me with the only small issue that I also have to copy all other NuGet packages to "packages.offline" as Visual Studio does not seem to look at "packages" when a "packages.offline" folder is present.

3F added a commit to 3F/GetNuTool that referenced this issue Jan 11, 2020
Since `WebClient.UseDefaultCredentials = true` will not affect for initialized proxy.
Issue: 3F/DllExport#133
@3F 3F closed this as completed in 7566b5d Jan 11, 2020
@3F
Copy link
Owner

3F commented Jan 11, 2020

@kcl93

GetNuTool now contains related fixes. Please test CI build: https://ci.appveyor.com/project/3Fs/dllexport/builds/30047860/artifacts

More probably I will also prepare 1.6.6 release before 1.7. Please report me about problems if still.

@kcl93
Copy link
Author

kcl93 commented Jan 13, 2020

I have tested your updated batch file and it now works perfectly for me on all machines. Thanks! :)

@3F
Copy link
Owner

3F commented Jan 13, 2020 via email

3F added a commit to 3F/GetNuTool that referenced this issue Jan 16, 2020
* CHANGED: Changed `%~dp0` to `%cd%` processing for the following in batch version by default:

           `wpath` property
           `-unpack` key

           For some cases you need to update the use of the batch version in your code.
           Do not hesitate to contact if you have the questions:
           https://github.com/3F/GetNuTool

* CHANGED: Trims whitespaces in optional proxycfg property.

           Helps to avoid MSB1006 problem for 3rd tools which was based on gnt batch version.
           That is,

           ~ /p:proxycfg=" !proxy! " will be safely considered as optional value
           While /p:proxycfg="" will indicate about incorrect or missing data.

* FIXED: Fixed post actions when executing gnt core in batch version.

* FIXED: "The remote server returned an error: (407) Proxy Authentication Required."

          Related issue: 3F/DllExport#133

* NOTE: Official releases via GitHub Releases:
        https://github.com/3F/GetNuTool/releases/latest

* NOTE: About possible commands and keys: https://github.com/3F/GetNuTool#commands
3F added a commit that referenced this issue Jan 16, 2020
* NOTE: Please don't forget to test latest 1.7 BETA releases (not for production)
        with .NET Core support!
        https://github.com/3F/DllExport

* FIXED: Fixed possible duplication of `PlatformTarget` during setup.

* FIXED: Fixed error when switching between .sln in UI. Wizard.

* FIXED: DllExport crashing with proxy authentication error. Issue #133.

* FIXED: Fixed actions for `-mgr-up` key.
         Including `-action Upgrade` ( Update + mgr-up + force keys )

* FIXED: Fixes possible MSB1006 for proxycfg property.
         "MSB1006: Property is not valid. Switch: proxycfg"

* CHANGED: Updated MvsSln 2.5
           https://github.com/3F/MvsSln/releases/tag/2.5

* CHANGED: Updated Mono Cecil 0.11.1
           https://github.com/jbevain/cecil/releases/tag/0.11.1

* CHANGED: Updated GetNuTool 1.8
           https://github.com/3F/GetNuTool/releases/tag/1.8

* CHANGED: Updated Conari 1.4
           https://github.com/3F/Conari/releases/tag/1.4
3F added a commit that referenced this issue Jan 21, 2020
* NEW: Allowed .NET Standard 1.1 and above targeting.

* FIXED: Fixed "Sdk.WindowsDesktop" problem for .NET Core / SDK-based projects.
         Details in PR #123.

* FIXED: Fixed beta3 incorrect layout (Thanks @Genteure, PR #131).

         Related problem with `Inf/-Inf token patching` option:
         #128 (comment)

* FIXED: DllExport crashing with proxy authentication error. Issue #133.

* FIXED: Fixed actions for `-mgr-up` key.
         Including `-action Upgrade` ( Update + mgr-up + force keys )

* FIXED: Fixes possible MSB1006 for proxycfg property.
         "MSB1006: Property is not valid. Switch: proxycfg"

* CHANGED: UI. VS project icons under Visual Studio 2017 Image Library EULA.RTF license.

* CHANGED: init.ps1 adds optional copying of package data for our manager.
           Part of the "new installation behavior through official NuGet." (beta2)

           Please note: This is not nuget support!
                        It just replaces known info-form that was in 1.6.x.

* CHANGED: Local scope when invoking .\DllExport manager in project files.

* CHANGED: Updated GetNuTool 1.8
           https://github.com/3F/GetNuTool/releases/tag/1.8

* NOTE: Please don't use beta releases in production!

* NOTE: Please report about something here: https://github.com/3F/DllExport/issues
3F added a commit to 3F/hMSBuild that referenced this issue Jan 29, 2020
* NEW: Implemented `-vsw-as "args..."`
       Reassigns default commands to vswhere if used.

       For example:
       ```
       hMSBuild -only-path -vsw-as "-products Microsoft.VisualStudio.Product.BuildTools"
       ```
       Related Issues: #12, #14, #8,

* CHANGED: VS2017+. Using the most modern instance by default.
           You can also specify `-vsw-priority` and `-force` keys to use only what is needed.
           Related Issues: #14, #8.

* CHANGED: Updated wswhere to 2.8.4 by default.

* CHANGED: Updated GetNuTool 1.8
           https://github.com/3F/GetNuTool/releases/tag/1.8

           Most important fix for hMSBuild:
           "The remote server returned an error: (407) Proxy Authentication Required."
           Related issue: 3F/DllExport#133

* NOTE: An compiled.full version now will be distributed together with official hMSBuild releases.
           https://twitter.com/GitHub3F/status/1218224792970715136
           (zip packages) https://github.com/3F/hMSBuild/releases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants