unraid / unraid/api

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

Open
#2,057 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
113
Forks
22
Avg merge
10h 40m
Merged PRs (30d)
13

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the GraphQL rclone configForm resolver flow, then read api/src/unraid-api/graph/resolvers/rclone/rclone-api.service.ts and the related RCloneFormService path described in the issue. Reproduce the configForm query in the production environment and trace the disabled-service call; done means the field no longer produces the invalid URL error and follows one of the stated unavailable-service behaviors.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.