Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
Error in UI to edit PSCall operation after upgrade to 5.6.2 from 5.6.1
-
I upgraded from 5.6.1 to 5.6.2 this morning and now the UI for editing PSCall operations is broken.
When I click on the edit icon for a PSCall operation In Chrome I get a dialog that says:
An unexpected error occured while posting to the server
Internal Server ErrorYou should try to save your work if possibleWhen I load Chrome devtools and look at the network call, the response body is
ERROR: Exception has been thrown by the target of an invocation.
The full request that generated this 500 is shown below with some redactions...
POST /plans/editor/action-statement-editor?applicationId=1&planId=1&planType=Plan&planName=Deploy%20Website HTTP/1.1
Host: <our host>
Connection: keep-alive
Content-Length: 1024
Accept: /
Origin: <our host>
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: http://<our host>/plans/edit?planId=1&planName=Deploy%20Website&planType=Plan
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8
Cookie: <the cookies>Product: BuildMaster
Version: 5.6.2
-
There were no changes that would have caused this, and we cannot reproduce this; can you share the PowerShell Script and the OtterScript that are involved? It could be an error parsing the PS Script.
I would also make sure the Windows extension is loaded.
-
I've provided the PSCall instances and the global script assets below. The plan the PSCall instances are part of includes more more (IIS site/app pool setup, file copy, etc.) and executes perfectly without issue. The only problem is attempting to edit the PSCall operations in Visual Mode.
PSCall instances - variables referenced are defined and set elsewhere in the plan. Error described in OP happen when trying to use edit ALL of these PSCall instances in Visual Mode.
PSCall Create-IisAppRoot ( siteName: $iisSiteName, appRootName: $iisAppRootName, appRootDir: $iisAppRootDir, appPoolName: $iisAppRootAppPoolName );
PSCall Update-Acl ( path: $iisAppRootLogDir, identityReference: IIS AppPool\$iisSiteName, fileSystemRights: FullControl, accessControlType: Allow );
PSCall Update-Xml ( path: $iisAppRootWebConfigFile, xpath: /configuration/connectionStrings/add[@name='Default']/@connectionString, value: Server=$dbServer;Database=$dbName;user=$dbUser;password=$dbPassword );
PSCall Update-Xml ( path: $iisAppRootWebConfigFile, xpath: /configuration/connectionStrings/add[@name='EasyIDEntities1']/@connectionString, value: ' metadata=res://*/Models.csdl|res://*/Models.ssdl|res://*/Models.msl;provider=System.Data.SqlClient;provider connection string="data source=$dbServer;initial catalog=$dbName;user id=$dbUser;password=$dbPassword;multipleactiveresultsets=True;application name=EntityFramework" ' );
Script Assets - These are all global
Create-IisAppRoot.ps1
param( [string]$siteName, [string]$appRootName, [string]$appRootDir, [string]$appPoolName ) C:\Windows\System32\inetsrv\appcmd.exe add app /site.name:"$siteName" /path:"/$appRootName" /physicalpath:"$appRootDir" if ($LASTEXITCODE -ne 0 -and $LASTEXITCODE -ne 183) { throw "Could not create $appRootName for path $appRootDir in site $siteName. appcmd.exe exited with $LASTEXITCODE." } C:\Windows\System32\inetsrv\appcmd.exe set app /app.name:"$siteName/$appRootName" /applicationPool:"$appPoolName"
Update-Acl.ps1
param( [string]$path, [string]$identityReference, [string]$fileSystemRights, [string]$accessControlType ) $acl = Get-Acl $path $rule = New-Object System.Security.AccessControl.FileSystemAccessRule( $identityReference, $fileSystemRights, $accessControlType ) $acl.SetAccessRule($rule) Set-Acl $path $acl
Update-Xml.ps1
param( [string]$path, [string]$xpath, [string]$value, [string]$namespace ) $document = [xml] (Get-Content $path) $result = $null if ($namespace) { $result = Select-Xml -XPath $xpath -Xml $document -Namespace $namespace } else { $result = Select-Xml -XPath $xpath -Xml $document } if ($result.Node -ne $null) { if ($value -eq $null) { $result.Node.ParentNode.RemoveChild($result.Node) } else { $result.Node.Value = $value } } $document.Save($path)
-
Thanks for the detailed instructions; I've recreated this precisely as you've done...
-
Created the 3 Global Scripts
-
Created a global plan with only the contents you provided
-
Saved as text mode. Opened. Went back-and-forth. Edited operations in visual mode, added invalid parameter names, saved.
I just can't seem to reproduced this at all. All of our visual testing is passing as well.
I also reviewed all of the code between 561 and 562, and there are no changes that would have yielded this.
Could you rollback to 561 and see if that fixes it? There should be something in the Admin > Error log that might give some indication.
-
-
Hi Alana,
I am getting the same issue with 5.6.2 (Build 2). I have got the following call in the text mode:
pscall Inject-OutputPath
(
SolutionDir: $WorkingDirectory
);I can save it in text mode and it runs correctly but when I click on it in Visual Mode it fails with the following response: "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>500 - Internal server error.</title>
<style type="text/css">
<!--
body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;}
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;}
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
-->
</style>
</head>
<body>
<div id="header"><h1>Server Error</h1></div>
<div id="content">
<div class="content-container"><fieldset>
<h2>500 - Internal server error.</h2>
<h3>There is a problem with the resource you are looking for, and it cannot be displayed.</h3>
</fieldset></div>
</div>
</body>
</html>
"
-
Thanks; there should be something in the Admin > Error log that might give some indication, can you see the error there?
-
There is no erros in that log.