Open rtmaus opened 3 years ago
Can you try setting the timeout on connection instead? I don't think your timeout is being honored based on the log it looks like it's being set after the connection, due to the way the MS dev team handles the timeout setting it requires that setting prior to establishing a connection:
Here's an example:
Connect-CrmOnline -ClientSecret $clientSecret -OAuthClientId $clientId -ServerUrl $url -ConnectionTimeoutInSeconds 300
Hi seanmcne,
I am getting the warning as below after creating the connection: WARNING: Please reconnect to the service after setting the connection timeout or the new timeout will not be used for operations.
When import/publish cmdlet runs, many a times i am not getting an response, can you help? here is my code:
Write-Verbose "Creating Test Crm Connection" -Verbose
$TestConnection = Connect-CrmOnline -Credential $cred -ServerUrl $TargetUrl Set-CrmConnectionTimeout -conn $TestConnection -TimeoutInSeconds 3000
Write-Verbose "Importing Solution to $TargetfriendlyName" -Verbose Import-CrmSolution -conn $TestConnection -SolutionFilePath "$SolutionFilePath\$SolutionName.zip" Write-Verbose "Solution Imported" -Verbose
Try this, the module will update to the right TLS version now also you can set the connection timeout on connection to take care of it (otherwise you have to connect, set the timeout, and then connect again).
You can also import using an async job to upload it as a system job and poll for success or failure.
Hope that helps! Sean
Write-Verbose "Creating Test Crm Connection" -Verbose
Connect-CrmOnline -Credential $cred -ServerUrl $TargetUrl -forceOAuth -ConnectionTimeoutInSeconds 3000
Write-Verbose "Importing Solution to $TargetfriendlyName" -Verbose
Import-CrmSolution -SolutionFilePath "$SolutionFilePath$SolutionName.zip"
Write-Verbose "Solution Imported" -Verbose
We are using Powershell and github actions to export a solution:
Github Action
Connection
$crm = Connect-CrmOnline -ClientSecret $clientSecret -OAuthClientId $clientId -ServerUrl $url
When executing the following we are getting intermittent failures of the following:
Export-CrmSolution -SolutionName $SolutionName -conn $CrmSourceConnection -SolutionFilePath $ExportPath -SolutionZipFileName $fileName -Managed -Debug -Verbose
The error returned:
I've increased the timeout but I suspect that the failure is actually occurring before then. The intermittent nature is the confusing part.
Is this the most up to date end-point?
https://xxx.crm6.dynamics.com/XRMServices/2011/Organization.svc/web?SDKClientVersion=9.0.45.2156
I can confirm that the exported files are showing as downloaded but its not being caught by command: