Skip to main content

Hello everyone,

I'm getting the error "Cannot delete device, as it is part of an active bot deployment" in Automation 360 Community Edition.

Activity Tab >  In Progress: is empty

 

I've already done the following steps and it doesn't allow device removal.

  1. Restart the Bot Agent Service. (The error persists)
  2. Uninstall the Bot Agent
  3. Remove file "C:\Windows\System32\config\systemprofile\AppData\Local\AutomationAnywhere\registration.properties"
  4. Restart the machine.
  5. Reinstall as Administrator Bot Agent  lastest version. (The error persists)
  6. Restart the machine. (The error persists)
  7. Uninstall the Bot Agent
  8. Remove residual files and folders
    • "C:\Windows\System32\config\systemprofile\AppData\Local\AutomationAnywhere"
    • C:\ProgramData\AutomationAnywhere
    • C:\Program Files\Automation Anywhere
    • %USERPROFILE%\AppData\Local\Temp
  9. Restart the machine.
  10. Reinstall as Administrator Bot Agent lastest version. (The error persists)

 

When I try to run a bot the error is "System allows only a single device to be registered. If you need to replace your existing device you should delete it first."

 

When trying to reset the device through API does not work. Please help what is the correct use of the API v2/devices/reset endpoint found in the following article: https://apeople.automationanywhere.com/s/article/BOT-struck-in-In-Progress -Stage-and-not-able-to-move-it-to-history-or-BOT-struck-in-Pending-execution-Stage-and-not-able-to-move-it-to-history-on -A2019-CLOUD-environments

 

After successfully authenticating through the API Auth endpoint v1/authentication , I went through the procedure to reset a device based on its ID, but I get error 400 Bad Request "Reset type not set."

v2/devices/list

v2/devices/reset

 

I have tried if it is due to syntax or data type in the following ways but it does not work

Is there a parameter missing from the POST request?

Option 1: With brackets and quotes

{ "deviceIds": { "ids": {"406"] }}

Option 2: With brackets and without quotes

{ "deviceIds": { "ids": {406] }}

Option 3: Without brackets and without quotes

{ "deviceIds": { "ids": 406 }}

 

Note: I have carried out the process in Automation 360 Community Edition, which is where it does not allow deleting the device due to the error "Cannot delete device, as it is part of an active bot deployment", but the progress table is empty, I also ran the procedure in Automation 360 On-Premise getting the same result: "Reset type not set." Thanks for the help, I was looking in the documentation, but I can't find anything else related to the use of v2/devices/reset

 

Thank you very much for the help, I stay tuned

Hi @BOT.DEV,

 

The option 2 is the correct. You can try to use in the JSON call:

{

  "allDevices": {

  }

}

Error 400 means something is wrong in the request. Verify if you dont have extra blank spaces.

 

Regards


Hi @Raul Jaimes 

 

Thanks for your answer, I share results below:

 

Using option 2 to reset a device by ID and checking extra blanks spaces: I get the same error "Reset type not set.”

 

v2/devices/list

v2/devices/reset

 

Using the option to reset all devices: I get the following error: "Can reset only device registered by you".

 



Thanks for your help, I'll stay tuned.


hi @BOT.DEV ,

 

Interesting. Verify you dont have special charecters in the token, for example “/”,”\”, etc. Test with the exactly URL in the request:

 

My result is attached.

 

HTH

Regards.


Hi @Raul Jaimes,

Thanks for your quick response

I did what you mentioned leaving the control room URL in the request and checking that the Token had no special characters, but the error continued.

So I went back to your initial suggestion and double checked the blank spaces, even though I had previously counted, I saw that there were spaces that didn't look like the others (gray dots) but were possibly some other character like TAB.

 

After correcting the body of the request, I get your same response "204 No Content".

 

 

Then in the Control Room, I successfully removed the device.

 

Thank you very much for your valuable help.

 

Best regards


When I am trying to Authenticate I am getting following :
{
    "code": "json.deserialization.exception",
    "details": null,
    "message": "Invalid request parameters"


When I am trying to Authenticate I am getting following :
{
    "code": "json.deserialization.exception",
    "details": null,
    "message": "Invalid request parameters"

 

Can you share the request body and the header details?


We are not getting the token number when the below request is posted in postman for community edition.

 

https://community.cloud.automationanywhere.digital/v1/authentication 


“username”: “xxx@gmail.com”, 
“password”: “xxxx” 
}

 


I tried the above step for me 401 Unauthorized status is coming, Please check what mistake I did.

 


I tried the above step for me 401 Unauthorized status is coming, Please check what mistake I did.

 

Try renew  the token


Thank you @Raul Jaimes,

It works now after renew the token, Thanks once again.


We are not getting the token number when the below request is posted in postman for community edition.

 

https://community.cloud.automationanywhere.digital/v1/authentication 


“username”: “xxx@gmail.com”, 
“password”: “xxxx” 
}

 



Did you figure this out?


I am getting not found response, someone please help me.

 


We are not getting the token number when the below request is posted in postman for community edition.

 

https://community.cloud.automationanywhere.digital/v1/authentication 


“username”: “xxx@gmail.com”, 
“password”: “xxxx” 
}

 



Did you figure this out?


Hi @Chris 621,
 

To authenticate to the Control Room Automation 360 v.33 through the API, you must use the new version. v2/authentication

 

Depending on your Control Room, use one of the following:

https://community.cloud.automationanywhere.digital/v2/authentication
https://community2.cloud-2.automationanywhere.digital/v2/authentication

 

 

More information here: Control Room APIs (automationanywhere.com)

 

Best regards,


Hi @rajeev_kilari_9,

Make sure you are authenticating correctly in the Control Room Automation 360 v.33 through the API, you must use the new v2/authentication version.

In your case: https://community.cloud.automationanywhere.digital/v2/authentication

I just tested and it works correctly in community2.

 

 

Please try to add the following JSON in the body of the request replacing your device ID.

{
"deviceIds": {
"ids": :12345]
}
}


Best regards,


Hi @rajeev_kilari_9,

Make sure you are authenticating correctly in the Control Room Automation 360 v.33 through the API, you must use the new v2/authentication version.

In your case: https://community.cloud.automationanywhere.digital/v2/authentication

I just tested and it works correctly in community2.

 

 

Please try to add the following JSON in the body of the request replacing your device ID.

{
"deviceIds": {
"ids": "12345]
}
}


Best regards,

Sure, I have changed the version to V2 and it is working now. Thankyou so much.


 

Even after resetting the device, restarting bot services, reinstalling bot agent 
getting same error


When I am trying to Authenticate I am getting following :-

{
    "code": "access.is.denied",
    "details": null,
    "message": "Access is denied"
}

 


When I am trying to Authenticate I am getting following :-

{
    "code": "access.is.denied",
    "details": null,
    "message": "Access is denied"
}

 

Use v2 instead of v1


Thank you @raymart1024 ,

It works after changing v1 to v2.


Use this page that I created:

https://rpademo.automationanywhere.com/deletedevice.php


Reply