Cannot call method on clear-cache pipeline
Asked by PCG:

Hello,

By today, the clear-cache image has been updated and I cannot longer use it.

the BITBUCKET_USERNAME and BITBUCKET_APP_PASSWORD are correct (were working last week) but I have created new ones now.

It is not crystal clear which permissons should be given at the app password anyway.

I read somewere pipelines - write and repositories - read would be necessary

Is there anything else wrong?

name: 'Clear cache'  
size: 2x  
script:  
- pipe: atlassian/bitbucket-clear-cache:3.3.0  
variables:  
BITBUCKET_USERNAME: $BITBUCKET_USERNAME  
BITBUCKET_APP_PASSWORD: $BITBUCKET_APP_PASSWORD  
CACHES: \['node'\]  
DEBUG: 'true'  
condition:  
changesets:  
includePaths:  
- package.json  
- bitbucket-pipelines.yml


Answers:
author: Theodora Boudale
body: Hi everyone,

There was an issue with the caches API which was also affecting services that use this API, like the pipe bitbucket-clear-cache.

A fix has been rolled out, so the issue should no longer occur.

In case you're still experiencing any issues, please feel free to reach out.

Kind regards,  
Theodora

comments: author: PCG
body: That worked for me, thank you!


author: Theodora Boudale
body: That's good to hear, thank you for the update!


author: Oday Rafeh
body: Hi All [@PCG](/t5/user/viewprofilepage/user-id/1243942) , [@Julian Schmidt](/t5/user/viewprofilepage/user-id/5175468) , [@Darvesh](/t5/user/viewprofilepage/user-id/5175488)

The error "Failed to retrieve caches: 405" suggests that there is an issue with the API endpoint for retrieving caches.

This could be caused by a problem with the Bitbucket server, or there may be an issue with the permissions for the user and the app password being used.

To troubleshoot this issue, you can try :

Verify that the user and app password being used have the necessary permissions to access the cache. As you mentioned earlier, the app password should have at least the "pipelines - write" and "repositories - read" permissions.

Check if there are any recent changes or updates made to your Bitbucket account or repository that may have caused this issue.

Try clearing the cache manually from the Bitbucket web interface to see if that resolves the issue.

If none of the above steps works, you can try reaching out to Bitbucket support for further assistance.

Regarding the Bitbucket Clear Cache pipeline, you can try updating the version of the pipe being used to see if that resolves the issue.

comments: author: PCG
body: I created a new BITBUCKET_USERNAME and BITBUCKET_APP_PASSWORD with all reasonable permissons allowed to ensure it is not a permission problem, but since I cannot edit permissions or even view them once the app password has been created I cannot make a screenshot

There are no recent updates in the repository that may this step fail

I can't see how I can clear cache manually,

I updated the clear-cache image to 3.3.0 but this don't fix the problem

DEBUG flag does not shown the problem is coming from a wrong permissions configuration. That would be helpful.

Anyway, it looks the bitbucket server has a problem, I'm not the only person experiencing problems suddenly


author: Oday Rafeh
body: Hi [@PCG](/t5/user/viewprofilepage/user-id/1243942) , Sorry that I can't help

And Yes You are right, The issue may be caused by a problem with the Bitbucket server or an incorrect configuration. it may be worth reaching out to Bitbucket support for further assistance.

Have a nice day


author: PCG
body: Thank you for trying [@Oday Rafeh](/t5/user/viewprofilepage/user-id/5172837) , is it supossed that bitbucket support is going to read and resolve posts written here?


author: Julian
body: I submitted a request to solve the bug and linked this question. The issue is acknowledged by the support.  

Maybe they will post further updates here as well.


author: PCG
body: can you post here the link to the bug ticket?


author: Julian
body: Sure, [this is the corresponding Ticket.](https://support.atlassian.com/requests/BBS-200212/)


author: Oren Havshush
body: We are facing the same error


author: Julian
body: I can confirm this issue. We receive the same error message.


author: Darvesh
body: We are facing the same issue. It fails with the following error.


    ? Failed to retrieve caches: 405 {"type": "error", "error": {"message": "Method not allowed"}} https://api.bitbucket.org/2.0/repositories/karoraelevate/nest/pipelines-config/caches/?page=1&pagelen=100


Tags: bitbucket-cloud

bitbucket-pipelines

cache

cloud