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

Error: unhandled exception: WinHttpOpen error: 87 [PuppyError] #109

Open
bdkhoa2022 opened this issue Sep 7, 2023 · 3 comments · May be fixed by #117
Open

Error: unhandled exception: WinHttpOpen error: 87 [PuppyError] #109

bdkhoa2022 opened this issue Sep 7, 2023 · 3 comments · May be fixed by #117

Comments

@bdkhoa2022
Copy link

my code:

import puppy

echo fetch("http://neverssl.com/")

env:
Windows 7 Home Basic x64

nim c test.nim
output:

C:\Users\user\.nimble\pkgs\puppy-2.1.0\puppy.nim(108) fetch
C:\Users\user\.nimble\pkgs\puppy-2.1.0\puppy.nim(57) get
C:\Users\user\.nimble\pkgs\puppy-2.1.0\puppy.nim(37) fetch
C:\Users\user\.nimble\pkgs\puppy-2.1.0\puppy\platforms\win32\platform.nim(18) in
ternalFetch
Error: unhandled exception: WinHttpOpen error: 87 [PuppyError]
@treeform
Copy link
Owner

treeform commented Sep 8, 2023

Wow thats a very strange error. I need to find Windows 7 to test it.

Can you try passing it different params?

WINHTTP_ACCESS_TYPE_AUTOMATIC_PROXY,

like:
WINHTTP_ACCESS_TYPE_DEFAULT_PROXY
WINHTTP_ACCESS_TYPE_NO_PROXY
WINHTTP_ACCESS_TYPE_NAMED_PROXY

And see if that works? Do you have a proxy setup?

@bdkhoa2022
Copy link
Author

Wow thats a very strange error. I need to find Windows 7 to test it.

Can you try passing it different params?

WINHTTP_ACCESS_TYPE_AUTOMATIC_PROXY,

like: WINHTTP_ACCESS_TYPE_DEFAULT_PROXY WINHTTP_ACCESS_TYPE_NO_PROXY WINHTTP_ACCESS_TYPE_NAMED_PROXY

And see if that works? Do you have a proxy setup?

"WINHTTP_ACCESS_TYPE_NO_PROXY" work fine,thanks.

puppy/src/puppy/platforms/win32/platform.nim

  WINHTTP_ACCESS_TYPE_NO_PROXY* = 1
  WINHTTP_ACCESS_TYPE_DEFAULT_PROXY* = 2
  WINHTTP_ACCESS_TYPE_NAMED_PROXY* = 3
  WINHTTP_ACCESS_TYPE_AUTOMATIC_PROXY* = 4

@bung87
Copy link

bung87 commented Jan 20, 2024

according to genotrance/px#43 (comment)

it need to be WINHTTP_ACCESS_TYPE_DEFAULT_PROXY when windows version under 6.3

"6.3" refers to Windows 8.1 or Windows Server 2012 R2.

Windows 7 Home Basic x64 is 6.1.7601.

bung87 added a commit to bung87/puppy that referenced this issue Feb 6, 2024
@bung87 bung87 linked a pull request Mar 1, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants