Error while running updatePage from CLI repetitively
Asked by Cristian Serban:

When trying to update a Confluence page using findreplace, I'm getting the following error:

confluence.bat :  
At C:\\Code\\Scripts\\JOobjParsing2.ps1:19 char:5  
+ confluence.bat --action "modifyPage" --id "984186904" --findRepla ...  
+ \~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~  
+ CategoryInfo : NotSpecified: (:String) \[\], RemoteException  
+ FullyQualifiedErrorId : NativeCommandError  

Client error: License is not valid. Reason: Add-on is not installed or the license is inactive. App key is org.swift.confluence.cli.

The same update sometime works


Answers:
author: Sudhir_Appfire_
body: Hi [@Cristian Serban](/t5/user/viewprofilepage/user-id/2443366),

Hope you are doing good!

We want some additional information from you after looking from the error :  
1. Can you please check if the License for Confluence CLI app you are using is valid?

2. If the License is showing as Valid and still you are facing the issue, then try to install **atlassian-cli-8.6.0-SNAPSHOT- distribution.zip** from [Downloads-Early Access Program(EAP)](https://bobswift.atlassian.net/wiki/spaces/ACLI/pages/267233555/Downloads+-+Early+Access+Program+EAP) and verify if the issue is resolved.

3. After downloading the **atlassian-cli-8.6.0-SNAPSHOT- distribution.zip**file and running the command, still, you get the same error, then please share the DEBUG log by adding --debug to the following command

```
confluence.bat --action "modifyPage" --id "984186904" --findReplace --debug
```

Please let us know if you face any issues and we will be happy to help you.

Thank you,  
Sudhir

comments: author: Cristian Serban
body: Hi Sudhir,

Sorry for my late response to this.

Here's the latest: I used 8.6.0 snapshot but I hit the same error. Added the --debug to the command and the log shows several failed confluence commands and one successful

See below please:

<br />

URL requested: <https://digitsucc.atlassian.net/wiki/rest/api/latest/settings/systemInfo>  
Request type: GET  
Content type: application/json; charset=utf-8  
Using basic authentication.  
Request property X-Atlassian-Token, value: \[no-check\]  
Request property Content-Type, value: \[application/json; charset=utf-8\]  
Response code: 200, message: OK, url: <https://digitsucc.atlassian.net/wiki/rest/api/latest/settings/systemInfo>  
Result data: {"cloudId":"9402112e-a64b-40cb-ad68-d49ab1194899","commitHash":"ab86f8fb8cad37ee60f433909418e37f733331c0"}  
**Client error: License is not valid. Reason: App is not installed or the license is inactive. App key is org.swift.confluence.cli.**   
**org.swift.common.cli.CliClient$LicenseValidationException: License is not valid. Reason: App is not installed or the license is inactive. App key is**   
**org.swift.confluence.cli.**   
**at org.swift.confluence.cli.ConfluenceClient.validateLicense(ConfluenceClient.java:377)**   
**at org.swift.confluence.cli.ConfluenceClient.handleRequest(ConfluenceClient.java:849)**   
**at org.swift.common.cli.DefaultRemoteClient.process(DefaultRemoteClient.java:819)**   
**at org.swift.common.cli.CliClient.doWork(CliClient.java:755)**   
**at org.swift.common.cli.CliClient.doWork(CliClient.java:711)**   
**at org.swift.confluence.cli.ConfluenceClient.main(ConfluenceClient.java:193)**   
**reset session**   
Server information for debug log:  
Product . . . . . . . . . . . : Confluence  
Cloud id . . . . . . . . . . : 9402112e-a64b-40cb-ad68-d49ab1194899  
Version . . . . . . . . . . . : 1000.0.0  
Base URL . . . . . . . . . . : <https://digitsucc.atlassian.net/wiki>  
Build . . . . . . . . . . . . : ab86f8fb8cad37ee60f433909418e37f733331c0  
License information . . . . . : License is not valid. Reason: App is not installed or the license is inactive. App key is org.swift.confluence.cli.  
Response time (milliseconds) : 1813

<br />

URL requested: <https://digitsucc.atlassian.net/wiki/rest/api/latest/settings/systemInfo>  
Request type: GET  
Content type: application/json; charset=utf-8  
Using basic authentication.  
Request property X-Atlassian-Token, value: \[no-check\]  
Request property Content-Type, value: \[application/json; charset=utf-8\]  
Response code: 200, message: OK, url: <https://digitsucc.atlassian.net/wiki/rest/api/latest/settings/systemInfo>  
Result data: {"cloudId":"9402112e-a64b-40cb-ad68-d49ab1194899","commitHash":"ab86f8fb8cad37ee60f433909418e37f733331c0"}  
**Client error: License is not valid. Reason: App is not installed or the license is inactive. App key is org.swift.confluence.cli.**   
**org.swift.common.cli.CliClient$LicenseValidationException: License is not valid. Reason: App is not installed or the license is inactive. App key is**   
**org.swift.confluence.cli.**   
**at org.swift.confluence.cli.ConfluenceClient.validateLicense(ConfluenceClient.java:377)**   
**at org.swift.confluence.cli.ConfluenceClient.handleRequest(ConfluenceClient.java:849)**   
**at org.swift.common.cli.DefaultRemoteClient.process(DefaultRemoteClient.java:819)**   
**at org.swift.common.cli.CliClient.doWork(CliClient.java:755)**   
**at org.swift.common.cli.CliClient.doWork(CliClient.java:711)**   
**at org.swift.confluence.cli.ConfluenceClient.main(ConfluenceClient.java:193)**   
**reset session**   
Server information for debug log:  
Product . . . . . . . . . . . : Confluence  
Cloud id . . . . . . . . . . : 9402112e-a64b-40cb-ad68-d49ab1194899  
Version . . . . . . . . . . . : 1000.0.0  
Base URL . . . . . . . . . . : <https://digitsucc.atlassian.net/wiki>  
Build . . . . . . . . . . . . : ab86f8fb8cad37ee60f433909418e37f733331c0  
License information . . . . . : License is not valid. Reason: App is not installed or the license is inactive. App key is org.swift.confluence.cli.  
Response time (milliseconds) : 1791

<br />

URL requested: <https://digitsucc.atlassian.net/wiki/rest/api/latest/settings/systemInfo>  
Request type: GET  
Content type: application/json; charset=utf-8  
Using basic authentication.  
Request property X-Atlassian-Token, value: \[no-check\]  
Request property Content-Type, value: \[application/json; charset=utf-8\]  
Response code: 200, message: OK, url: <https://digitsucc.atlassian.net/wiki/rest/api/latest/settings/systemInfo>  
Result data: {"cloudId":"9402112e-a64b-40cb-ad68-d49ab1194899","commitHash":"ab86f8fb8cad37ee60f433909418e37f733331c0"}  
confluence.bat : Client information:

---

<br />

URL requested: <https://digitsucc.atlassian.net/wiki/rest/api/latest/settings/systemInfo>  
Request type: GET  
Content type: application/json; charset=utf-8  
Using basic authentication.  
Request property X-Atlassian-Token, value: \[no-check\]  
Request property Content-Type, value: \[application/json; charset=utf-8\]  
Response code: 200, message: OK, url: <https://digitsucc.atlassian.net/wiki/rest/api/latest/settings/systemInfo>  
Result data: {"cloudId":"9402112e-a64b-40cb-ad68-d49ab1194899","commitHash":"ab86f8fb8cad37ee60f433909418e37f733331c0"}  
Client error: License is not valid. Reason: App is not installed or the license is inactive. App key is org.swift.confluence.cli.  
org.swift.common.cli.CliClient$LicenseValidationException: License is not valid. Reason: App is not installed or the license is inactive. App key is  
org.swift.confluence.cli.  
at org.swift.confluence.cli.ConfluenceClient.validateLicense(ConfluenceClient.java:377)  
at org.swift.confluence.cli.ConfluenceClient.handleRequest(ConfluenceClient.java:849)  
at org.swift.common.cli.DefaultRemoteClient.process(DefaultRemoteClient.java:819)  
at org.swift.common.cli.CliClient.doWork(CliClient.java:755)  
at org.swift.common.cli.CliClient.doWork(CliClient.java:711)  
at org.swift.confluence.cli.ConfluenceClient.main(ConfluenceClient.java:193)  
reset session  
Server information for debug log:  
Product . . . . . . . . . . . : Confluence  
Cloud id . . . . . . . . . . : 9402112e-a64b-40cb-ad68-d49ab1194899  
Version . . . . . . . . . . . : 1000.0.0  
Base URL . . . . . . . . . . : <https://digitsucc.atlassian.net/wiki>  
Build . . . . . . . . . . . . : ab86f8fb8cad37ee60f433909418e37f733331c0  
License information . . . . . : License is not valid. Reason: App is not installed or the license is inactive. App key is org.swift.confluence.cli.  
Response time (milliseconds) : 1813

<br />

URL requested: <https://digitsucc.atlassian.net/wiki/rest/api/latest/settings/systemInfo>  
Request type: GET  
Content type: application/json; charset=utf-8  
Using basic authentication.  
Request property X-Atlassian-Token, value: \[no-check\]  
Request property Content-Type, value: \[application/json; charset=utf-8\]  
Response code: 200, message: OK, url: <https://digitsucc.atlassian.net/wiki/rest/api/latest/settings/systemInfo>  
Result data: {"cloudId":"9402112e-a64b-40cb-ad68-d49ab1194899","commitHash":"ab86f8fb8cad37ee60f433909418e37f733331c0"}  
Client error: License is not valid. Reason: App is not installed or the license is inactive. App key is org.swift.confluence.cli.  
org.swift.common.cli.CliClient$LicenseValidationException: License is not valid. Reason: App is not installed or the license is inactive. App key is  
org.swift.confluence.cli.  
at org.swift.confluence.cli.ConfluenceClient.validateLicense(ConfluenceClient.java:377)  
at org.swift.confluence.cli.ConfluenceClient.handleRequest(ConfluenceClient.java:849)  
at org.swift.common.cli.DefaultRemoteClient.process(DefaultRemoteClient.java:819)  
at org.swift.common.cli.CliClient.doWork(CliClient.java:755)  
at org.swift.common.cli.CliClient.doWork(CliClient.java:711)  
at org.swift.confluence.cli.ConfluenceClient.main(ConfluenceClient.java:193)  
reset session  
Server information for debug log:  
Product . . . . . . . . . . . : Confluence  
Cloud id . . . . . . . . . . : 9402112e-a64b-40cb-ad68-d49ab1194899  
Version . . . . . . . . . . . : 1000.0.0  
Base URL . . . . . . . . . . : <https://digitsucc.atlassian.net/wiki>  
Build . . . . . . . . . . . . : ab86f8fb8cad37ee60f433909418e37f733331c0  
License information . . . . . : License is not valid. Reason: App is not installed or the license is inactive. App key is org.swift.confluence.cli.  
Response time (milliseconds) : 1791  
\</tbody\>\</table\>:'\<tr\>\<td\>ChatMessage-ReceiverSchema\</td\>\<td\>.chatMessage{}.resourceURL\</td\>\<td\><https://ttn1.wrgsec.ucc.t-mobile.com:443/chat/v1/U-84e08>  
46a-dc29-4c32-9e91-619ede42df93@prodtest.pool5.ucc.t-mobile.com/oneToOne/%2B12065397002/eb3d9db5-1759-401c-8e60-abed4407a73c:bee1df78-a58a-4f83-aa59-92c  
2d5270969/messages/c6b9f7b4-20cc-44c6-90f6-54aec8f60384\</td\>\<td\>\<br /\>\</td\>\</tr\>\</tbody\>\</table\>'  
confluence.bat : Client information:

<br />

URL requested: <https://digitsucc.atlassian.net/wiki/rest/api/latest/settings/systemInfo>  
Request type: GET  
Content type: application/json; charset=utf-8  
Using basic authentication.  
Request property X-Atlassian-Token, value: \[no-check\]  
Request property Content-Type, value: \[application/json; charset=utf-8\]  
Response code: 200, message: OK, url: <https://digitsucc.atlassian.net/wiki/rest/api/latest/settings/systemInfo>  
Result data: {"cloudId":"9402112e-a64b-40cb-ad68-d49ab1194899","commitHash":"ab86f8fb8cad37ee60f433909418e37f733331c0"}  
**URL requested: <https://digitsucc.atlassian.net/wiki/rest/api/latest/content/986186190?expand=space.homepage%2Chistory%2Cversion%2Cancestors%2Cmetadata.l>**   
**abels%2Cbody.storage\&type=page\&status=current**   
**Request type: GET**   
**Content type: application/json; charset=utf-8**   
**Using basic authentication.**   
**Request property X-Atlassian-Token, value: \[no-check\]**   
**Request property Content-Type, value: \[application/json; charset=utf-8\]**   
**Response code: 200, message: OK, url: <https://digitsucc.atlassian.net/wiki/rest/api/latest/content/986186190?expand=space.homepage%2Chistory%2Cversion%2>**   
**Cancestors%2Cmetadata.labels%2Cbody.storage\&type=page\&status=current**   
**Result data: {"id":"986186190","type":"**


author: Sudhir_Appfire_
body: Hi [@Cristian Serban](/t5/user/viewprofilepage/user-id/2443366) ,

We are from BobSwift support team and we have created a support request on behalf of you in our portal.

Could you please try to access [the ticket](https://bobswift.atlassian.net/servicedesk/customer/portal/1/SUPPORT-2574) and signup to our portal for further discussion on this ticket.

Thank you,  
Sudhir


Tags: cli

cloud

confluence-cloud