Skip to content

rclone configForm calls a disabled production service and fails with an invalid URL #2057

Description

@jmagar

Environment

Unraid OS Version: 7.3.2

Are you using a reverse proxy? No. Reproduced directly against the Unraid GraphQL API.

Pre-submission Checklist

  • I have verified that my Unraid OS is up to date
  • I have tested this issue by accessing my server directly (not through a reverse proxy)
  • This is not an Unraid Connect related issue

Issue Description

The public rclone.configForm GraphQL field calls RCloneApiService.getProviders() even though RCloneApiService deliberately disables startup in production. The service therefore has no initialized Unix-socket base URL, and Got rejects the resulting request URL.

Latest main at reproduction: 12c23d808a45e8521ded6d36bdf0c0aaf152775a.

Production startup exits here:

api/src/unraid-api/graph/resolvers/rclone/rclone-api.service.ts

if (ENVIRONMENT === 'production') {
    this.logger.debug('RClone startup is disabled');
    this.isInitialized = false;
    return;
}

The exposed resolver still calls the disabled service:

configForm -> getFormSchemas -> loadProviderInfo -> getProviders -> callRcloneApi('config/providers').

callRcloneApi normalizes that endpoint to /config/providers. With the service uninitialized, Got 14.4.7 throws:

RequestError: `url` must not start with a slash

Steps to Reproduce

  1. Run the API in its production Unraid environment.
  2. Execute:
    query { rclone { configForm(formOptions: { providerType: "s3" }) { id } } }
  3. Observe the resolver error and the corresponding RCloneApiService / RCloneFormService log entries.

Expected Behavior

The field should either return a valid configuration form from an initialized provider source or explicitly report that Rclone functionality is unavailable.

Actual Behavior

GraphQL returns:

`url` must not start with a slash

The server log records:

RCloneApiService: Error calling RClone API (config/providers)
RCloneFormService: Error loading provider information
RequestError: `url` must not start with a slash

Additional Context

The same failure can be reproduced directly with the repository's installed Got dependency by calling got.post('/config/providers', { enableUnixSockets: true }).

The relevant Rclone files are unchanged between deployed release commit f3205d978fada931da54df4255d41c07489066d9 and latest main. rclone.remotes can mask the same unavailable service by catching errors and returning an empty list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions