Upload fails - file metadata is missing in GCS
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.1k
- Forks
- 228
- Avg merge
- 5m
- Merged PRs (30d)
- 1
Description
I have react application in production (tus node server with tus gcs store) with many active users.
From time to time my server is being reset from error I get from tus, due to file metadata is missing.
The error is:
/node_modules/@tus/gcs-store/dist/index.js:130
const { size, metadata: meta } = metadata.metadata;
^
TypeError: Cannot destructure property 'size' of 'metadata.metadata' as it is undefined.
I can’t find a way to reproduce it, and therefore I cant find a way to fix it.
I also couldn’t find a way to catch this error and prevent the reset.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the stack trace at @tus/gcs-store/dist/index.js:130 and inspect how GCS object metadata is read during upload handling. Investigate when metadata.metadata can be undefined and whether the failure can be reproduced or safely handled. Done means identifying the cause and preventing this error from resetting the server.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- google-cloud, node.js, typescript
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100