alim92 / powerbi-vsts-extensions

VSTS extensions for Microsoft Power BI
MIT License
3 stars 0 forks source link

The remote server returned an error: (404) Not Found. #3

Open rajeshwar2kc opened 4 years ago

rajeshwar2kc commented 4 years ago

Hi,

When running the task update parameters with refresh task enabled we noticed for some of the reports the errors are "The remote server returned an error: (404) Not Found."

Any help would be appreciated

The full log is as below: 2020-09-14T12:29:13.8727806Z Token recieved! 2020-09-14T12:29:13.8735104Z Setting parameters 2020-09-14T12:29:13.8765241Z Updating parameters - [{"name": "2 Web API URL Organisation","newValue": "splamp"},{"name": "3 Web API URL Suffix","newValue": ".api.crm11.dynamics.com/api/data/v9.1/"}] 2020-09-14T12:29:13.8832380Z ##[debug]Trying to invoke api: https://api.powerbi.com/v1.0/myorg/groups/138e11a0-86ad-4260-a694-755ee8e07abe/datasets/5d57f493-e2a8-4152-ba33-45aeadf1b819/UpdateParameters 2020-09-14T12:29:13.9220115Z ##[debug]POST https://api.powerbi.com/v1.0/myorg/groups/138e11a0-86ad-4260-a694-755ee8e07abe/datasets/5d57f493-e2a8-4152-ba33-45aeadf1b819/UpdateParameters with -1-byte payload 2020-09-14T12:29:14.4962496Z ##[debug]Leaving D:\a_tasks\SetPowerBIDatasetParameters_57cac705-f967-4f81-a815-85ea6f8ea0d4\1.0.0\run-task.ps1. 2020-09-14T12:29:14.5380858Z ##[debug]Caught exception from task script. 2020-09-14T12:29:14.5413610Z ##[debug]Error record: 2020-09-14T12:29:14.6502232Z ##[debug]Invoke-RestMethod : The remote server returned an error: (404) Not Found. 2020-09-14T12:29:14.6514001Z ##[debug]At D:\a_tasks\SetPowerBIDatasetParameters_57cac705-f967-4f81-a815-85ea6f8ea0d4\1.0.0\ps_modules\PowerBi\PowerBi.psm1:45 char:19 2020-09-14T12:29:14.6529416Z ##[debug]+ ... $result = Invoke-RestMethod -Uri $Url -Headers $apiHeaders -Method ... 2020-09-14T12:29:14.6542545Z ##[debug]+ ~~~~~~~~~~~~~ 2020-09-14T12:29:14.6554652Z ##[debug] + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc eption 2020-09-14T12:29:14.6566747Z ##[debug] + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand 2020-09-14T12:29:14.6579537Z ##[debug] 2020-09-14T12:29:14.6597426Z ##[debug]Script stack trace: 2020-09-14T12:29:14.6632818Z ##[debug]at Invoke-API, D:\a_tasks\SetPowerBIDatasetParameters_57cac705-f967-4f81-a815-85ea6f8ea0d4\1.0.0\ps_modules\PowerBi\PowerBi.psm1: line 45 2020-09-14T12:29:14.6646019Z ##[debug]at Set-Parameters, D:\a_tasks\SetPowerBIDatasetParameters_57cac705-f967-4f81-a815-85ea6f8ea0d4\1.0.0\ps_modules\PowerBi\PowerBi.psm1: line 68 2020-09-14T12:29:14.6657815Z ##[debug]at , D:\a_tasks\SetPowerBIDatasetParameters_57cac705-f967-4f81-a815-85ea6f8ea0d4\1.0.0\setpowerbidatasetparameters.ps1: line 8 2020-09-14T12:29:14.6672209Z ##[debug]at , D:\a_tasks\SetPowerBIDatasetParameters_57cac705-f967-4f81-a815-85ea6f8ea0d4\1.0.0\run-task.ps1: line 28 2020-09-14T12:29:14.6695329Z ##[debug]at , : line 1 2020-09-14T12:29:14.6708153Z ##[debug]at , : line 22 2020-09-14T12:29:14.6720242Z ##[debug]at , : line 18 2020-09-14T12:29:14.7216498Z ##[debug]at , : line 1 2020-09-14T12:29:14.7235512Z ##[debug]Exception: 2020-09-14T12:29:14.7288895Z ##[debug]System.Net.WebException: The remote server returned an error: (404) Not Found. 2020-09-14T12:29:14.7305858Z ##[debug] at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request) 2020-09-14T12:29:14.7319118Z ##[debug] at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord() 2020-09-14T12:29:14.7551308Z ##[error]The remote server returned an error: (404) Not Found. 2020-09-14T12:29:14.7561156Z ##[debug]Processed: ##vso[task.logissue type=error]The remote server returned an error: (404) Not Found. 2020-09-14T12:29:14.7571864Z ##[debug]Processed: ##vso[task.complete result=Failed] 2020-09-14T12:29:14.8328143Z ##[section]Finishing: Set Power BI dataset parameters:NTU Quotes Summary.pbix

alim92 commented 4 years ago

Hi from a quick look it seems the URI can't be found, can you please try calling the URI using Postman or similar software: https://api.powerbi.com/v1.0/myorg/groups/138e11a0-86ad-4260-a694-755ee8e07abe/datasets/5d57f493-e2a8-4152-ba33-45aeadf1b819/UpdateParameters

here are the docs for updating parameters: https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/updateparametersingroup