edgafner / dorkag

Issue Tracker repository for all Dorkag plugins
Other
5 stars 0 forks source link

[BUG]: Can't add any AZD Account with `Failed requirement.` message #78

Closed jancespivo closed 3 months ago

jancespivo commented 3 months ago

Describe the bug Can't add any AZD Account with Failed requirement. message. It is doesn't depend on URL, nor PAT token. The message is always the same: Failed requirement.

To Reproduce Add AZD account, fill anything there. Real or not real URLs / Tokens = Error: Failed requirement.

Screenshots 20240411_09h46m31s_grim

Desktop (please complete the following information):

JetBrains IDE (please complete the following information):

Jonatha1983 commented 3 months ago

Hi @jancespivo

If you are trying to login from the settings you need to add the organization name at the end of the url. See the docs in here:

https://edgafner.github.io/azd-installation.html#login-from-settings

Please let me know if it is another issue.

Thanks for reporting

jancespivo commented 3 months ago

Hi @Jonatha1983 It helped, thanks!

However I can't see toolbox anywhere, it haven't shown. I'll fill another issue, it seems repos are not loaded properly as well.

Jonatha1983 commented 3 months ago

@jancespivo Are you on a project set to the azure devops repository?

Jonatha1983 commented 3 months ago

@jancespivo It does not load repos - the plugin help see the pr that are related to the current git repository you are working on it is not a cross repo like azure devops portal

jancespivo commented 3 months ago

@Jonatha1983 I don't know how to set it. There is no config for that for an existing project. And this is the only thing I can see for new project: 20240411_11h57m38s_grim Under tooltip I can see part of some HTML code with Page not found text.

Jonatha1983 commented 3 months ago

@jancespivo From the last screenshot, it looks like you want to clone your Azure DevOps repo to a new directory. It looks like you did log in with your PAT, but it doesn't show you the existing repositories properly. Am I correct? If that is correct make sure your PAT is created with the "All accessible organizations" options as described here

If you already have a directory you cloned and want to connect to Azure DevOps with the plugin, you don't need to clone it from scratch; log in from the tool window or the settings.

jancespivo commented 3 months ago

@Jonatha1983 It has full access for all accessible organizations 20240411_13h24m39s_grim And regarding the tool window, it haven't appeared anywhere in IDE after installing the plugin.

jancespivo commented 3 months ago

About Azure DevOps Server

Version Azure DevOps Server 2022.1 (AzureDevOpsServer_20240130.2)

Jonatha1983 commented 3 months ago

@jancespivo are you sure you opened the project from your git repository root? The tool window should recognize that the opened project is an azure devops git repository and only if it is, it should be visible. Can you run git remote -vv on your repo root folder and show me the output? (You can hide the names just the structure is what I would like to see)

jancespivo commented 3 months ago

@Jonatha1983 sure I hide only server names

$ git remote -vv
origin  ssh://[REDACTED]:22/projects/SkodaAuto/SMART-SEARCH/_git/SMART-SEARCH (fetch)
origin  ssh://[REDACTED]:22/projects/SkodaAuto/SMART-SEARCH/_git/SMART-SEARCH (push)

Azure DevOps projects are related 1:N to git repositories and I'm also using it in that way (one IDE project with multiple git repos). However I've tried to open this one git repository as a project root and the tool window still hasn't appeared :(

Jonatha1983 commented 3 months ago

@jancespivo, thanks for the important input.

The strange thing in your set is the projects sub-path in the remote origin.

I will add this case to the next release, but just for my mental sanity - can you do this check for me: Clone from the terminal the same remote URL but without the projects word:

git clone ssh://[REDACTED]:22/SkodaAuto/SMART-SEARCH/_git/SMART-SEARCH

Please let me know how it goes.

I will update once I release a version to support a remote with sub-path projects.

Thanks

Jonatha1983 commented 3 months ago

And just two more questions - in your example: SkodaAuto - is the Collection name
SMART-SEARCH - is the Project name SMART-SEARCH - is the Repository name

Is that correct?

Also, in the first image you sent, the server text field in the plugin was set to dev.azure.com; this is the default Azure DevOps Service (cloud). I understand we are talking about an Azure DevOps Server with a different URL, right? You don't have the same URL as the service because that will make my life really hard to support.

jancespivo commented 3 months ago

@Jonatha1983 So the path without projects works as well! I hadn't think about it, because it is the path I see in DevOps UI and I had just copied it to clone the repo. And yes SMART-SEARCH is the project name and repository as well (default name btw). Yes we are talking about different url, we have on-prem server.

Jonatha1983 commented 3 months ago

So, @jancespivo , does the plugin work when you clone without projects, or are you facing the same issue?

Jonatha1983 commented 3 months ago

Also SkodaAuto is the Collection name?

jancespivo commented 3 months ago

@Jonatha1983 Cloning without projects hasn't helped :/ And yes SkodaAuto is a collection.

Jonatha1983 commented 3 months ago

Okay, @jancespivo, thanks for all the info. I'll try to reproduce it tomorrow morning. I have a dedicated Azure Devops Server instance ready for that.

Last 2 questions ( at least for today 😄 ): the [REDACTED] part is a valid URL without any slash, right? Something like: a.b.c.com nothing like a.b\c.com?
Also, does the [REDACTED] contain white spaces?

I am just trying to figure out the best way to try to reproduce it.

Sorry for the inconvenience, and thanks for the collaboration.

jancespivo commented 3 months ago

@Jonatha1983 np :) [REDACTED] is simple domain like devops.someserver.somewhere

Thanks! I'm glad to help ;)

Jonatha1983 commented 3 months ago

@jancespivo I released a new version 2024.1.53 Can you update the plugin after removing the existing account and try to reconnect?

Let me know if you face same issues please.

jancespivo commented 3 months ago

@Jonatha1983 Thank you for your effort. Unfortunately, it still not working for me :( No tool window after update (and removing + adding an account). I also tried multiple combinations of git remote url. Git works also without specifying port (22 is a default for ssh). However nothing changed :( Could I help more? I can provide some logs if needed.

Jonatha1983 commented 3 months ago

Hi @jancespivo

Sorry to ear that.

When you open the IDE all the jetbrains bundle git features are working for you? For instance the branch combobox and git logs tool window?

jancespivo commented 3 months ago

@Jonatha1983 Yes everything works. I also disabled GitToolBox plugin to avoid any interference.

Jonatha1983 commented 3 months ago

@jancespivo Can you do the following:

Make a GET request to

https://[REDACTED]/_apis/status/health (No need for token or any query parameters)

Let me know if in the response header there is or there isn't a key named:

"X-TFS-ServiceError"

Jonatha1983 commented 3 months ago

Sorry it is _apis not _api in the subpath

jancespivo commented 3 months ago

@Jonatha1983 https://[REDACTED]/_apis/status/health HTTP/1.1 404 Not Found

I've added projects subpath: https://[REDACTED]/projects/_apis/status/health and now it is returning X-TFS-ServiceError: TF400813%3A%20Resource%20not%20available%20for%20anonymous%20access.%20Client%20authentication%20required.

Jonatha1983 commented 3 months ago

@jancespivo I found the BUG 😠 😠 😠 😠

Thank you so much for helping me with this.

I am building a new version and will update it once it is released and available in the marketplace.

Jonatha1983 commented 3 months ago

@jancespivo

The new version was released and approved (faster than expected) Please let me know if that fixes the issue.

Also, if you are interested, send me an email to jgafner@gmail.com - I will generate a one-month free coupon for you as a way to express my gratitude for your help!

jancespivo commented 3 months ago

@Jonatha1983 Nothing changed :(

Jonatha1983 commented 3 months ago

@jancespivo Please try to insert now the url with the projects subpath till the collection name included

Jonatha1983 commented 3 months ago

@jancespivo - new version I need to update the docs - but in the case of a Server with a subpath URL, the URL needs to contain the subpath till the collection, as I wrote above.

Again, sorry for that.

jancespivo commented 3 months ago

@Jonatha1983 I didn't have time to test it during the day. Will try tomorrow.

jancespivo commented 3 months ago

@Jonatha1983 It works now :tada: Thanks!

Jonatha1983 commented 3 months ago

@jancespivo great!!!

If you want, send me your email jgafner@gmail.com I will generate a coupon for one-month free, just as a sign of gratitude for keep updating me.

And if you will like the plugin functionality, I would appreciate a nice review or a nice start vote.

https://plugins.jetbrains.com/plugin/22319-azd

I am closing the issue. Thanks again.