VSCode extension is not able to fetch PR details
Asked by Oleksandr Kuzovych:

Hello, community,

I have encountered the following problem: the extension manages to login successfully and bring the list of existing PRs. When I try to unfold one of PRs it ends up with an  

"Error: *fetching* *pull* *request* *details* *failed"*

![screen-shot-1.png](https://community.atlassian.com/t5/image/serverpage/image-id/253341i21D1CF4AF3654D3B/image-size/large?v=v2&px=999 "screen-shot-1.png")

While investigating the extension logs I found that it uses a deprecated REST API call:

/rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/tasks

As it can be read here it is [**Deprecated since 7.2**.](https://docs.atlassian.com/bitbucket-server/rest/7.14.0/bitbucket-rest.html)server version.

Extension error log:

![screen-shot-2.png](https://community.atlassian.com/t5/image/serverpage/image-id/253335i1E1D89F3F9E850AE/image-size/large?v=v2&px=999 "screen-shot-2.png")

Manual curl invocation produces the following result:

![screen-shot-3.png](https://community.atlassian.com/t5/image/serverpage/image-id/253337i21DF3C41365E51B4/image-size/large?v=v2&px=999 "screen-shot-3.png")

Extension version: 3.0.3

VSCode version: 1.77.3

Platform: Ubuntu 20.04

Bitbucket server version: 8.2.1

Does anyone have an idea how to fix this?

Thanks


Answers:
author: Nicholas Dietz
body: I was excited to use the PR integration into vscode. Then I'd never have to use bitbucket online ever again. Alas: this bug.

How do I open a jira ticket against this?  

Alas: this other bug:

![Screenshot_2024-03-08_08-51-31.png](https://community.atlassian.com/t5/image/serverpage/image-id/311059i40900FCF416E8B8F/image-size/large?v=v2&px=999 "Screenshot_2024-03-08_08-51-31.png")

comments: author: Juan Antonio Pavon Carmona
body: I have the same problem. :(


author: Manuel Corrales
body: Same problem:

<br />

![error.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/317202iE1C39F7B6DC98070/image-size/large?v=v2&px=999 "error.jpg")  
Bitbucket serv version: 8.9.11


author: Berki Adam
body: I have the same problem. We moved to Bitbucket v8.9 from version 7 and the extension stopped working with the same error codes, mentioned above :( Any plan for fixing this issue?


author: Jakub G?siorowski
body: The same on

Atlassian Bitbucket v8.14.0  
VS Code \& extension version LST


author: Becka Leyon
body: I am experiencing this same issue after our Bitbucket server test instance was upgraded to 8.9.0. Our production instance is still running Bitbucket Server 7.21.5, and I *do not* see those errors when working with production.

* Extension version: 3.03
* VS Code version 1.77.3
* Bitbucket Server version 8.9.0

I try to create a new pull request, and get this in the extension's GUI after clicking the "CREATE PULL REQUEST" button:

<br />

*Something went wrong*   
*context:null*   
*message:"Tasks are now managed using Comments with BLOCKER severity. Use /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/blocker-comments?count=true instead."*   
*exceptionName:null*

<br />

The "Create pull request" window remains open, but is not able to update, and all the fields just spin.

The pull request is created on the Bitbucket server, however, and I get a notification from the extension right in VS Code, and the pull request title shows up in my list/tree. But the pull request doesn't open.

This is the error output log from the VS Code extension:

\[2023-04-22 19:54:08:669\] ----------------------------------------------------------------------  
\[2023-04-22 19:54:08:669\] curl -X GET -H "User-Agent:atlascode/2.x axios/0.19.2" -H "Content-Type:application/json" -H "Authorization:Basic blahblahblah==" "<https://our-bbtestserver.com/rest/api/1.0/projects/proj/repos/practice-test/pull-requests/1/tasks>"  
\[2023-04-22 19:54:08:670\] ----------------------------------------------------------------------  
\[2023-04-22 19:54:08:825\] Error getting URL: <https://our-bbtestserver.com/rest/api/1.0/projects/proj/repos/practice-test/pull-requests/1/tasks> \[object Object\]  
\[2023-04-22 19:54:08:825\] error fetching pull request details \[object Object\]

comments: author: Jim ETEVENARD
body: This faulty call is done here : [src/bitbucket/bitbucket-server/pullRequests.ts.](https://bitbucket.org/atlassianlabs/atlascode/src/c8b3ad71b976ff7a6beeefa4e26a811718e727fb/src/bitbucket/bitbucket-server/pullRequests.ts#src/bitbucket/bitbucket-server/pullRequests.ts-182)


Tags: app

bitbucket-server

server

vscode