microsoft / tfs-cli

Cross-platform CLI for Microsoft Team Foundation Server and Visual Studio Team Services
MIT License
369 stars 132 forks source link

Internal Server Error(500) - TF400856: The following service is not registered in the database: InstalledExtensions. #165

Open BalaSubramanian-L opened 7 years ago

BalaSubramanian-L commented 7 years ago

I am trying tot install an extension, but i am getting the below error. please provide suggestions

tfx extension install --extension-id "cloud-foundry-build-extension" --publisher "ms-vsts" --service-url [URL] --auth-type basic --username [username] --password [password] --accounts [accountname]

TFS Cross Platform Command Line Interface v0.3.38 Copyright Microsoft Corporation tfx : error: Error: Failed Request: Internal Server Error(500) - TF400856: The following service is not registered in the database: InstalledExtensions. At line:1 char:1

T-Hugs commented 7 years ago

What version of TFS are you targeting?

BalaSubramanian-L commented 7 years ago

TFS2015 - Team_foundation_server_2015_update_3. i am trying this install in on-premise setup

MCollins434 commented 6 years ago

Same error using: TFS 2017 Update 1 TFS Cross Platform Command Line Interface v0.4.11

Any updates?

pabrams commented 6 years ago

I'm suddenly getting this too. TFS 2017 Update 3. This was working before, and as far as I know, nothing has changed.

C:\Users\Paul.Abrams\Source\Repos\vsts-team-calendar>node_modules.bin\tfx exten sion install --service-url http://hostname:8080/tfs --publisher mypub --extension-id my-extension-id --accounts http://hostname:8080/tfs/collectionName

TFS Cross Platform Command Line Interface v0.5.10 Copyright Microsoft Corporation

Personal access token: error: Error: Failed Request: Internal Server Error(500) - TF400856: The following service is not registered in the database: InstalledExtensions.

I'm pretty sure InstalledExtensions IS registered in the database, since tfx extension publish works fine, and the database says it's installed, too:

DECLARE @return_value int

EXEC    @return_value = [dbo].[prc_GetServiceVersion]
        @serviceName = N'InstalledExtensions'

SELECT  'Return Value' = @return_value

GO

ServiceName Version MinVersion InstalledExtensions 8 8

pabrams commented 6 years ago

I figured out my problem, it's because I was passing the server url for ServiceUrl instead of the collection url.

Usually the ServiceUrl is of the form http://server:8080/tfs, but in the case of tfx extension install it must be in the form http://server:8080/tfs/COLLECTION. This is not at all clear in the help files.