-
Notifications
You must be signed in to change notification settings - Fork 49
Description
This is a follow-up of this issue for the amazon-transcribe-streaming-sdk. I'm trying to use my company's internal proxy, and it doesn't seem like those environment variables are being picked up. I'm using Windows (aws_transcribe=0.5.2, awscrt=0.13.5), and have the following environment variables set:
HTTP_PROXY=http://proxy.companyname.net:10443, HTTPS_PROXY=http://proxy.companyname.net:10443, NO_PROXY="localhost,127.0.0.1,.companyname.net,.companyname.com", AWS_PROFILE="C:\Users\...\.aws", AWS_DEFAULT_PROFILE="[only profile availible]".
When I run the code here, I get awscrt.exceptions.AwsCrtError: AWS_IO_SOCKET_TIMEOUT: socket operation timed out. The full trace for that is in the other issue. I've tried modifying httpsession.py to pass in a HttpProxyOptions object. The file with the modified code is attached. That code results in the following when a proper proxy configuration is given:
dev shell : 2.3.9 : default profile
$ poetry run python .../test-transcription.py
DEBUG: wrap_future
DEBUG: make_request
DEBUG: _get_connection
DEBUG: _create_connection
DEBUG: parsing proxy string: http://proxy.companyname.net:10443
DEBUG: parsed proxy_protocol: http
DEBUG: parsed proxy_user: None
DEBUG: parsed proxy_password: None
DEBUG: parsed proxy_host: proxy.companyname.net
DEBUG: parsed proxy_port: 10443
DEBUG: wrap_future
** Exception 0xc0000005 occured **
at 0x00007FFC6BF17E42: Failed to lookup symbol: error 487
at 0x00007FFC6BF1802F: Failed to lookup symbol: error 487
at 0x7FFC6BF2FB60: PyInit__awscrt
at 0x7FFC9B1F60A0: UnhandledExceptionFilter
at 0x7FFC9E05C500: memset
at 0x7FFC9E0466F0: _C_specific_handler
at 0x7FFC9E05A600: _chkstk
at 0x7FFC9DFE4550: RtlImageNtHeaderEx
at 0x7FFC9E059850: KiUserExceptionDispatcher
at 0x00007FFC6BED2BED: Failed to lookup symbol: error 487
at 0x00007FFC6BED2ACC: Failed to lookup symbol: error 487
at 0x00007FFC6BEBE7E7: Failed to lookup symbol: error 487
at 0x00007FFC6BEC64D0: Failed to lookup symbol: error 487
at 0x00007FFC6BEC78E8: Failed to lookup symbol: error 487
at 0x00007FFC6BEF18F3: Failed to lookup symbol: error 487
at 0x00007FFC6BEF03F5: Failed to lookup symbol: error 487
at 0x00007FFC6BEEE29A: Failed to lookup symbol: error 487
at 0x00007FFC6BECF2C5: Failed to lookup symbol: error 487
at 0x00007FFC6BECD371: Failed to lookup symbol: error 487
at 0x00007FFC6BECC84B: Failed to lookup symbol: error 487
at 0x00007FFC6BF0C53A: Failed to lookup symbol: error 487
at 0x00007FFC6BF0C745: Failed to lookup symbol: error 487
at 0x00007FFC6BF0B094: Failed to lookup symbol: error 487
at 0x00007FFC6BF05318: Failed to lookup symbol: error 487
at 0x00007FFC6BF21F62: Failed to lookup symbol: error 487
at 0x7FFC9C4784C0: BaseThreadInitThunk
at 0x7FFC9E001770: RtlUserThreadStart
I understand that awscrt has had some form of provisional proxy support since awscrt==0.12.3. According to stack overflow, error 487 seems to be "the response code a SIP User Agent Server (UAS) will send to the client after the client sends a CANCEL request for the original unanswered INVITE request (yet to receive a final response)." I may try running a packet capture over the weekend or sometime next week to see what comes of it.