Search
Welcome to M-Files Empower – our new support experience. We'd love to hear what you think!Give feedback
Home/Support and troubleshooting/Examples and how to

(Workaround) How to force Hubshare to use REST API and not gRPC API

Last updated on 17 June 2023

Admin
M-Files Hubshare

Overview

In some cases, the vault configuration or the server environment is not well set to have Hubshare work correctly with gRPC API. You can force Hubshare not to use it until you are able to configure it correctly. This article shows you how.

Solution

If you have set up your vault in the extension configuration of Hubshare, and you don't have a warning telling you to enable gRPC. This means the vault is reachable through gRPC API.

image.png

In the screenshot above, Vault 1 is reached through REST API only, and Vault 2 is reached through both REST and gRPC API.

If the gRPC is not well configured, or your environment doesn't allow it properly, you can face some situations where Hubshare reaches your vault through gRPC but isn't fully working.

Here is an example of a log appearing in one of those cases:

[Global] Error exception Vault ID: {FXXXXXD56-XXXX-XXXX-XXXX-404XXXXXX403}

MFiles.gRPC.Client.MFilesException: Vault ID: {FXXXXXD56-XXXX-XXXX-XXXX-404XXXXXX403} ---> MFiles.gRPC.Client.MFilesGrpcException: Vault ID: {FXXXXXD56-XXXX-XXXX-XXXX-404XXXXXX403} VaultManager.cpp, 2264: Vault ID: {FXXXXXD56-XXXX-XXXX-XXXX-404XXXXXX403} (0x80040120) VaultManager.cpp, 2264: 80040020 (0x80040020) RPCLogin.cpp, 757: 80040020 (0x80040020) gRPC.generated.cpp, 8396: 80040020 (0x80040020)

Until you find a way to fix your vault configuration and/or your network environment so your vault is fully working through gRPC API. You can force Hubshare to only use the REST API, here is how:

  1. Go in your extension configuration settings in Hubshare.
  2. Click on advanced options. image.png
  3. You will see the gRPC port filled with 443 or 7766 (Hubshare is auto-filling this when recognizing gRPC on the vault)image.png
  4. Fill this field with a port which is not used by gRPC, and press save.

The request might take a minute, since Hubshare will try to reach the vault through a wrong gRPC port.

You will then see the warning appearing telling you to enable gRPC on the M-Files server for optimal performance, you should have your extension work now, until you sort out your configuration and make the gRPC work. When you need to come back to use gRPC API, just empty that "gRPC port field" and press check, then save.

Note: This option is only a workaround, to make complete use of the Hubshare & M-Files extension, please enable gRPC and work through it. 

Still need help?

On this page