VSCode plugin does shows available jira issues but page is blank
Asked by tobias_hebestreit:

In our company we are using jira and bitbucket server. I have connected my "Jira and Bitbucket (Atlassian Labs)"-plugin with both servers. Authentication is working and also my pull requests and jira issues are visible in the overview. But when I click on the specific issue the page stays blank. Same for a pull request in the bitbucket overview.

I have installed several versions 2.10.12, 3.0.0, 3.0.1. of the plugin with the same result.

I have been looking on the plugin logs at debug level. When clicking a jira issue the log says:

\[2023-03-29 07:24:45:202\] Error: error updating issue: Error: Request failed with status code 404

When clicking a pull request ist says:

2023-03-29 07:20:35:725\] Error getting URL: <https://bitbucket.mycompany.com/bitbucket/rest/api/1.0/projects/esd/repos/ele20ll-2speed-adv/pull-requests/13/tasks> \[object Object\]  
\[2023-03-29 07:20:35:726\] error fetching pull request details \[object Object\]

Apart from that no errors appear in the log appears to be fine.


Answers:
author: Mark Barry
body: If you want this to work with an on-premise Jira 9.x, you can make a simple change to :

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

Replacing:

```
this.getFromJira("issue/createmeta",{projectKeys:[t],expand:"projects.issuetypes.fields"});
```

with:

```
this.getFromJira("issue/createmeta/".concat(t,"/issuetypes"));
```

And restarting VS Code solved the problem for me. Keep in mind, if you use Dev Containers, there may be a local install of the extension within the Dev container as well as on your local machine. E.g., windows user:

```
 c:\users\<you>\.vscode\extensions\atlassian-atlascode-3.0.9\build\extension\extension.js
```

comments: author: Mark Barry
body: A quick update that this allows issues to be viewed, but you still can't create an issue from VS Code if you are using an on-premise instance.


author: Javier_Montero
body: It fixed my problem in VSCode, and now I can see the issue data. Thank you, Mark.

Jira Ver: 9.12.1

VSCode Ver: 1.86.2

OS: Windows 11

Jira \& Bitbucket Add-On Ver: 3.0.10


author: ting_li
body: Exactly the same here:

Jira v9.12.8

VSCode Version: 1.90.2 (user setup)

OS: Windows 10

Jira \& Bitbucket Add-On Ver: 3.0.10

[@Mark Barry](/t5/user/viewprofilepage/user-id/971825) 's solution worked magically! Thanks!

But it would be better if someone could fix the issue creation problem.


author: Venkat
body: I too was able to fix issue view, searching for resolution to issue creation and subtask creation problem


author: Tobias Hebestreit
body: I have found an option to enable more debug output and when I try to acces a jira ticket the last curl-command fails:

\[2023-03-30 07:36:05:124\] 575: client created  
\[2023-03-30 07:36:05:126\] ----------------------------------------------------------------------  
\[2023-03-30 07:36:05:126\] curl -X GET -H "User-Agent:atlascode/2.x axios/0.19.2" -H "X-Atlassian-Token:no-check" -H "Content-Type:application/json" -H "Authorization:Bearer abcdefgthysjkllmop/abcdefgthysjkllmop" "[https://tracker.mycompany.com/rest/api/2/field](https://tracker.konecranes.com/rest/api/2/field)"  
\[2023-03-30 07:36:05:126\] ----------------------------------------------------------------------  
\[2023-03-30 07:36:05:637\] ----------------------------------------------------------------------  
\[2023-03-30 07:36:05:637\] curl -X GET -H "User-Agent:atlascode/2.x axios/0.19.2" -H "X-Atlassian-Token:no-check" -H "Content-Type:application/json" -H "Authorization:Bearer abcdefgthysjkllmop/abcdefgthysjkllmop" "[https://tracker.mycompany.com/rest/api/2/issueLinkType](https://tracker.konecranes.com/rest/api/2/issueLinkType)"  
\[2023-03-30 07:36:05:637\] ----------------------------------------------------------------------  
\[2023-03-30 07:36:05:818\] ----------------------------------------------------------------------  
\[2023-03-30 07:36:05:818\] curl -X GET -H "User-Agent:atlascode/2.x axios/0.19.2" -H "X-Atlassian-Token:no-check" -H "Content-Type:application/json" -H "Authorization:Bearer abcdefgthysjkllmop/abcdefgthysjkllmop" "[https://tracker.mycompany.com/rest/api/2/issue/ELELL-474?expand=transitions%2CrenderedFields%2Ceditmeta%2Ctransitions.fields\&fields=\*all](https://tracker.konecranes.com/rest/api/2/issue/ELELL-474?expand=transitions%2CrenderedFields%2Ceditmeta%2Ctransitions.fields&fields=*all)"  
\[2023-03-30 07:36:05:818\] ----------------------------------------------------------------------  
\[2023-03-30 07:36:06:372\] ----------------------------------------------------------------------  
\[2023-03-30 07:36:06:372\] curl -X GET -H "User-Agent:atlascode/2.x axios/0.19.2" -H "X-Atlassian-Token:no-check" -H "Content-Type:application/json" -H "Authorization:Bearer abcdefgthysjkllmop/abcdefgthysjkllmop" "[https://tracker.mycompany.com/rest/api/2/issue/createmeta?projectKeys=ELELL\&expand=projects.issuetypes.fields](https://tracker.konecranes.com/rest/api/2/issue/createmeta?projectKeys=ELELL&expand=projects.issuetypes.fields)"  
\[2023-03-30 07:36:06:372\] ----------------------------------------------------------------------  
\[2023-03-30 07:36:06:547\] Error: error updating issue: Error: Request failed with status code 404  
\[2023-03-30 07:40:06:034\] ----------------------------------------------------------------------  
When I try to do the last command in the console I get the message Issue does not exist:  

{"errorMessages":\["Issue Does Not Exist"\],"errors":{}}  
From my limited knowledge of this interface I would say that the part "issue/createmeta?projectKeys=ELELL" of the URL does not resolve to an existing issue. In the previous curl commands the jira issues are explicitle mentioned like "issue/ELELL-474"

comments: author: tobias_hebestreit
body: Jira version is 9.5.0 and Bitbucket version is 8.7.1


author: tobias_hebestreit
body: when opening the bitbucket link <https://bitbucket.mycompany.com/bitbucket/rest/api/1.0/projects/esd/repos/ele20ll-2speed-adv/pull-requests/20/tasks> I get the message : "Tasks are now managed using Comments with BLOCKER severity.""


author: Tobias Hebestreit
body: From the FAQs of the VSCode plugin I have read that the plugin is not supporting Jira 9.X versions due to an change in the REST API. It is sad that the official Atlassian plugin is not supporting the Atlassian API, which renders the plugin useless.  
In the review section everybody is complaining about that. The market place is showing 1.5 million installed plugins ....


Tags: bitbucket-server

bug

server

vscode