VSCode extension is not able to fetch PR details

Oleksandr Kuzovych
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 21, 2023

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

 

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.2server version.

Extension error log:

screen-shot-2.png

Manual curl invocation produces the following result:

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

 

7 answers

2 votes
Manuel Corrales
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 9, 2024

Hi,


Following the workaround for tasks "Blank pages":
VSCode plugin does shows available jira issues but page is blank 

I have done a similar workaround for the fetch PR details issue.

In:

~/.vscode/extensions/atlassian.atlascode-3.0.9/build/extension/extension.js

Replace:

this.client.get(`/rest/api/1.0/projects/${t}/repos/${n}/pull-requests/${e.data.id}/tasks`);

With:

this.client.get(`/rest/api/1.0/projects/${t}/repos/${n}/pull-requests/${e.data.id}/blocker-comments`);

 
I hope you find it helpful.

Ivan Dilchovski
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 28, 2024

This worked for me! Thanks!

I also had to change one instance of `/tasks/count/` with `blocker-comments?count=true` for Details in the PR explorer to work.

2 votes
Nicholas Dietz
Contributor
March 8, 2024

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

Juan Antonio Pavon Carmona
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 8, 2024

I have the same problem. :(

0 votes
FALLAI Denis
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 1, 2024

Hi, 
Can we hope that this bug will be fixed one day?
It even seems that the correction has been coded and is awaiting merge: PR-1068 
In the meantime, the VS Code extension is unusable...

0 votes
Manuel Corrales
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 9, 2024

Same problem:


error.jpg
 Bitbucket serv version: 8.9.11

0 votes
Berki Adam
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 28, 2024

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? 

0 votes
Jakub Gąsiorowski
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 20, 2023

The same on 

Atlassian Bitbucket v8.14.0
VS Code & extension version LST

0 votes
Becka Leyon
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 23, 2023

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:


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


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]

Jim ETEVENARD
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 29, 2023

This faulty call is done here : src/bitbucket/bitbucket-server/pullRequests.ts.

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events