PipedreamHQ / PipedreamHQ/pipedream
[BUG] Connect File Stash returns internal 401 requiring upgrade in development (Basic workspace)
- Dominant language
- JavaScript
- Stars
- 11.7k
- Forks
- 5.8k
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 102
Description
**Describe the bug**
Connect File Stash fails in `development` with an internal 401 asking for a workspace upgrade, although the [environment documentation](https://pipedream.com/docs/connect/managed-auth/environments) says all Connect features are available in development on any plan.
Reproduced on Free and again after upgrading the same workspace to Basic. The underlying action downloads its file successfully; the failure happens afterward in `FileStash.onAfterRun → syncUp → #syncToS3 → S3Manager.getS3Config`.
This also reproduces with `helper_functions-download-file-to-tmp`, without Google Drive or third-party OAuth, so the minimal reproduction does not need a connected account.
**To Reproduce**
1. Use a Connect project in `development` on a Basic workspace and a valid external user ID.
2. Obtain a normal OAuth client-credentials access token.
3. Execute this request, substituting your own identifiers and token:
```sh
curl --request POST \
"https://api.pipedream.com/v1/connect/${PROJECT_ID}/actions/run" \
--header "Authorization: Bearer ${ACCESS_TOKEN}" \
--header 'Content-Type: application/json' \
--header 'X-PD-Environment: development' \
--data '{
"external_user_id": "YOUR_EXISTING_EXTERNAL_USER_ID",
"id": "helper_functions-download-file-to-tmp",
"configured_props": {
"url": "https://raw.githubusercontent.com/PipedreamHQ/pipedream/master/components/helper_functions/actions/download-file-to-tmp/download-file-to-tmp.mjs",
"filename": "vientos-helper-matrix.txt"
},
"stash_id": ""
}'
```
The current component version returned by the API during testing was `0.3.6`, with `stash: "required"` and a `dir` prop declaring `accessMode: "write"`, `sync: true`.
4. The outer HTTP response is 200, but the action result contains this error (excerpt):
```json
{
"$debug": {
"status": 401,
"data": {
"error": "Please upgrade your workspace to use this feature"
}
},
"name": "Error",
"message": "Error communicating with file api"
}
```
The response includes a `stashId` and the action's return value, but no `$filestash_uploads`. The stack includes:
```text
S3Manager.getS3Config
#syncToS3
FileStash.syncUp
FileStash.onAfterRun
```
5. Omit `stash_id` from the same request: the download action completes without the error, but naturally does not expose the file through File Stash.
**Expected behavior**
Following the [File Stash guide](https://pipedream.com/docs/connect/components/files), the file should be synced and returned through `exports.$filestash_uploads` with a usable temporary download URL.
If File Stash is an exception to the documented development availability, please clarify the exact plan/entitlement required for Connect File Stash and whether manual workspace enablement is needed. The Advanced requirement in the separate File Stores documentation does not clearly establish the requirement for Connect File Stash.
**Screenshots**
Not applicable: API reproduction and sanitized error above.
**Additional context**
- Tested with `@pipedream/sdk` 3.1.6 and direct REST. With identical logical inputs, the same access token, project and environment, both fail identically.
- `google_drive-download-file` 0.2.2 reports `stash: "optional"`; it fails with the same post-execution error.
- A 13-check matrix produced three successful controls without stash and ten identical internal 401s with stash. Variants included empty string, `"NEW"`, boolean `true`, reusing the returned stash ID, singular `fileId`, `__lv`, array `fileIds`, explicit/default paths, latest/pinned version, a regular text file, a Google document exported to text, and Helper Functions.
- The regular-file buffer control matched the original bytes. Both temporary Drive files were deleted after testing.
- Latest matrix: 2026-09-12, 23:23:32–23:23:56 UTC. The failure persisted approximately 16 minutes after the Basic upgrade; we cannot rule out a longer entitlement propagation delay.
- [Community report with the same internal 401](https://pipedream.com/community/t/why-am-i-unable-to-use-a-feature-with-the-python-pipedream-sdk-and-how-can-i-disable-the-file-stashing-feature/14451). Its suggested workaround omits stash, which does not address workflows that need the file URL.
- #18425 concerns a missing stash ID after successful file sync, which differs from this failure during sync.
Project/workspace identifiers can be provided privately if needed. No credentials or signed file URLs are included here.
Contributor guide
Research direction
Start with the reported FileStash.onAfterRun → syncUp → #syncToS3 → S3Manager.getS3Config path and reproduce the failure using the provided curl request, with and without stash_id. Trace why development access receives the internal 401, then verify that a stashed file sync completes and the result includes $filestash_uploads with a usable temporary download URL.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, javascript, node.js
- Domain
- api, backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100