AtlassianPS/ConfluencePS

Failed to get an answer from the server - Windows 2012R2 PS 5.1

fdo-ng7 opened this issue · 4 comments

Hello, I am running this on a Windows 2012 - PSversion 5.1.14409.1005. Installed ConfluencePS v2.3.6 via PowerShell Gallery. I am trying the very basic Set-ConfluenceInfo the Get-ConfluenceSpace and it return blank..

Test Script:
Set-ConfluenceInfo -BaseURI 'https://YourCloudWiki.atlassian.net/wiki' -PromptCredentials

Tried both command and is blank

Get-ConfluenceSpace or Get-ConfluencePage

When I use -verbose and -debug I get message below:

ERBOSE: [Invoke-Method] Function started
DEBUG: [Invoke-Method] ParameterSetName: __AllParameterSets
DEBUG: [Invoke-Method] PSBoundParameters: 
Key                                                                                 Value
---                                                                                 -----
First                                                                18446744073709551615
GetParameters                                                             {expand, limit}
Method                                                                                Get
Skip                                                                                    0
URi               https://wiki.net/rest/api/content/33001464/child/page
IncludeTotalCount                                                                   False
Credential                                      System.Management.Automation.PSCredential
OutputType                                                              ConfluencePS.Page

DEBUG: [Invoke-Method] Using $GetParameters: 
Name                           Value                                                                                                                     
----                           -----                                                                                                                     
expand                         space,version,body.storage,ancestors                                                                                      
limit                          25                                                                                                                        



VERBOSE: [ConvertTo-GetParameter] Making HTTP get parameter string out of a hashtable
VERBOSE: [Invoke-Method] Invoking method Get to URI https://wiki.net/rest/api/content/33001464/child/page?expand=space,version,body.stor
age,ancestors&limit=25
VERBOSE: [Invoke-Method] Invoke-WebRequest with: 

ErrorAction     : Stop
Headers         : {Accept-Charset, Accept}
ContentType     : application/json; charset=utf-8
Credential      : System.Management.Automation.PSCredential
Method          : Get
Uri             : https://wiki.net/rest/api/content/33001464/child/page?expand=space,version,body.storage,ancestors&limit=25
UseBasicParsing : True
Verbose         : False
VERBOSE: [Invoke-Method] Failed to get an answer from the server
DEBUG: [Invoke-Method] Executed WebRequest. Access $webResponse to see details
VERBOSE: [Invoke-Method] No Web result object was returned from. This is unusual!
VERBOSE: [Invoke-Method] Function ended
VERBOSE: [Get-ConfluenceChildPage] Function ended

Hello @fdo-ng .

I am sorry to hear you are having trouble using ConfluencePS.
I am unable to tell you what is going on, but we can try debugging this:

Try running this command:

Get-ConfluenceSpace -debug

at the fist stop, which should look something like this
image

enter the suspend mode (with s). Here you can see what the command would send the server.
I am interested if the credentials are correct.
With this command, you can inspect the credentials:

"user: $($credential.Username)`nPassword: $($Credential.GetNetworkCredential().Password)"

Executed the Get-ConfluenceSpace -Debug and got the message below:

Invoke-Method : An unknown error ocurred.
At C:\Program Files\WindowsPowerShell\Modules\ConfluencePS\2.3.6\ConfluencePS.psm1:819 char:13

  • Invoke-Method @iwParameters
  • CategoryInfo : InvalidResult: (

:String) [Invoke-Method], ArgumentException
+ FullyQualifiedErrorId : InvalidResponse.Status404,Invoke-Method

10_159_81_166_-_2012_fdtrm1

Hi @fdo-ng

I am sorry for the delay. I failed to see a notification about your response.

Please change your debug preference with
$DebugPreference = "Continue"
By doing this, you should be able to enter "suspend" mode.

But the highlighted parts of your screenshot indicate you are trying to fetch something that doesn't exist or don't have permissions (wrong credentials?)
image

Closed for now. Reopen if needed