usebruno/bruno · error · Error

Method ${path} not found, please refresh the methods

Error message

Method ${path} not found, please refresh the methods

What it means

Thrown by the private #getMethodFromPath when the requested gRPC method path is not in the client's in-memory methods map. The map is populated by reflection or proto-file loading; a miss means the method set is stale, the proto is outdated, or the path is wrong.

Source

Thrown at packages/bruno-requests/src/grpc/grpc-client.js:417

    };

    if (proxyUrl.username) {
      proxyChannelOptions['grpc.http_connect_creds']
        = `${decodeURIComponent(proxyUrl.username)}:${decodeURIComponent(proxyUrl.password)}`;
    }

    const targetHost = `${proxyUrl.hostname}:${proxyUrl.port || 80}`;
    return { targetHost, proxyChannelOptions };
  }

  /**
   * Get method from the path
   */
  #getMethodFromPath(path) {
    if (this.methods.has(path)) {
      return this.methods.get(path);
    }
    throw new Error(`Method ${path} not found, please refresh the methods`);
  }

  /**
   * Refresh methods using reflection or proto file as fallback
   * @param {Object} options - Options for refreshing methods
   * @param {string} options.url - The gRPC server URL
   * @param {Object} options.headers - The request headers/metadata
   * @param {string} [options.protoPath] - Path to proto file if available
   * @param {string} [options.collectionPath] - Collection path for proto file resolution
   * @param {string} [options.collectionUid] - Collection UID
   * @param {Object} [options.certificates] - Certificate configuration
   * @param {Object} [options.verifyOptions] - Additional options for verifying the server certificate
   * @param {string[]} [options.includeDirs] - Include directories for proto file resolution
   * @returns {Promise<boolean>} Whether methods were successfully refreshed
   * @private
   */
  async #refreshMethods({ url, headers, protoPath, collectionPath, collectionUid, certificates = {}, verifyOptions, includeDirs = [], proxyConfig }) {
    try {

View on GitHub (pinned to 9bdd81c7bd)

Solutions

  1. Call the client's refresh methods flow again (re-run reflection or reload the proto) and retry.
  2. Verify the path string exactly matches package.Service/Method from the current proto, including casing and package prefix.
  3. Confirm the gRPC server actually exposes the method (check server logs or grpcurl list).
  4. If using a local proto, ensure it is the same version the server compiled against.

Example fix

// before
client.invoke('/pkg.Svc/OldMethodName', { ... });  // renamed on server

// after
await client.refreshMethods({ url, headers });       // re-discover
client.invoke('/pkg.Svc/NewMethodName', { ... });
Defensive patterns

Strategy: retry

Validate before calling

// Pre-check: confirm the path is known before invoking
const knownPaths = await client.listMethods();  // or maintain a cached set
if (!knownPaths.includes(path)) throw new Error(`Unknown method ${path}; refresh methods first`);

Type guard

function isKnownMethod(client, path) { return client.methods && client.methods.has(path); }

Try / catch

async function invokeWithRefresh(client, path, req, opts) {
  try { return await client.invoke(path, req, opts); }
  catch (e) {
    if (e.message.includes('not found, please refresh the methods')) {
      await client.refreshMethods(opts);            // re-discover
      return client.invoke(path, req, opts);         // retry once
    }
    throw e;
  }
}

Prevention

When it happens

Trigger: Calling invoke with a path like '/pkg.Svc/Method' that was not present when refreshMethods ran — e.g. the server added a new method after reflection, the proto file changed, or the path string has a typo/different package prefix.

Common situations: Server deployed a new gRPC service version with renamed methods; the proto file loaded locally is out of date; reflection returned a partial list due to a transient error; path casing or package name mismatch.

Related errors


AI-assisted analysis of usebruno/bruno@9bdd81c7bd (2026-08-13). Data as JSON: /api/errors/2d6ab25d07081d05. Report an issue: GitHub.