Invoke-RestMethod fails seconds after deploy: The system detected an invalid pointer address in attempting to use a pointer argument in a call.
See original GitHub issueAfter I’ve deployed my PowerShell azure function, I immediately automatically call a HTTP triggered function to check the sanity of the deployed instance (as a component test).
This function calls another azure function using Invoke-RestMethod
. The call to the function fails:
EXCEPTION: The system detected an invalid pointer address in attempting to use a pointer argument in a call. Exception : Type : System.Net.Http.HttpRequestException TargetSite : Name : MoveNext DeclaringType : System.Net.Http.ConnectHelper+<ConnectAsync>d__1, System.Net.Http, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a MemberType : Method Module : System.Net.Http.dll StackTrace : at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean allowHttp2, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.GetHttpConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpClient.FinishSendAsyncUnbuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts) at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(HttpClient client, HttpRequestMessage request, Boolean keepAuthorization) at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord() Message : The system detected an invalid pointer address in attempting to use a pointer argument in a call. InnerException : Type : System.Net.Sockets.SocketException Message : The system detected an invalid pointer address in attempting to use a pointer argument in a call. SocketErrorCode : Fault ErrorCode : 10014 NativeErrorCode : 10014 TargetSite : Name : Throw DeclaringType : System.Runtime.ExceptionServices.ExceptionDispatchInfo MemberType : Method Module : System.Private.CoreLib.dll StackTrace : at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken) Source : System.Private.CoreLib HResult : -2147467259 Source : System.Net.Http HResult : -2147467259 TargetObject : Method: GET, RequestUri: '(...)', Version: 1.1, Content: System.Net.Http.StringContent, Headers: { Authorization: Bearer WellThisIsMyLittleSecret User-Agent: Mozilla/5.0 User-Agent: (Windows NT 10.0; Microsoft Windows 10.0.14393; en-US) User-Agent: PowerShell/7.0.7 Content-Length: 0 } CategoryInfo : InvalidOperation: (Method: GET, Reques…ontent-Length: 0 }:HttpRequestMessage) [Invoke-RestMethod], HttpRequestException FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand ErrorDetails : The system detected an invalid pointer address in attempting to use a pointer argument in a call. InvocationInfo : MyCommand : Invoke-RestMethod ScriptLineNumber : 36 OffsetInLine : 15 HistoryId : 1 ScriptName : (...)
When I retry seconds later the call succeeds.
I expect the HTTP call to always work. It seems like this behavior has changed in the past months.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:11 (8 by maintainers)
Top Results From Across the Web
[Help] Errored: The system detected an invalid pointer ...
[Help] Errored: The system detected an invalid pointer address in attempting to use a pointer argument in a call : r/qBittorrent.
Read more >Invalid Pointer Address error attempting to connect to TCP ...
When connecting to the endpoint within SocketConnect, I get a SocketException stating: The system detected an invalid pointer address in ...
Read more >Azure Function in .Net errors -The system detected an ...
Hi, I have an Azure Function in .Net that connects to Mongo Atlas to download logs. It is deployed in Azure. The function...
Read more >Many torrents fail with an error "The system detected ...
Many torrents fail with an error "The system detected an invalid pointer address in attempting to use a pointer argument in a call"...
Read more >The system detected an invalid pointer address in ...
The system detected an invalid pointer address in attempting to use a pointer argument in a call. [::ffff:170.114.52.2]:443 (zoom.us:443).
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have created a ticket with id
2203180050000623
.Hello @snerte – This doc explains how to create a support ticket: https://docs.microsoft.com/en-us/azure/azure-portal/supportability/how-to-create-azure-support-request