Skip to content
Back

Cant view Storage File in Appwrite Console 1.7.4 after set tokens

  • 0
  • Self Hosted
  • Storage
_alnes_
27 Sep, 2025, 14:11

If I set a token on a storage file using the appwrite function (createFileToken), I can no longer see the file in detail in the appwrite console. I get the error: Invalid Argument Server Error.

Docker Logs:

TypeScript
[Error] Timestamp: 2025-09-27T14:04:42+00:00
[Error] Method: GET
[Error] URL: /v1/tokens/buckets/:bucketId/files/:fileId
[Error] Type: Ahc\Jwt\JWTException
[Error] Message: Invalid maxAge: Should be greater than 0
[Error] File: /usr/src/code/vendor/adhocore/jwt/src/ValidatesJWT.php
[Error] Line: 42
[Error] Timestamp: 2025-09-27T14:04:42+00:00
[Error] Method: GET
[Error] URL: /v1/tokens/buckets/:bucketId/files/:fileId
[Error] Type: Ahc\Jwt\JWTException
[Error] Message: Invalid maxAge: Should be greater than 0
[Error] File: /usr/src/code/vendor/adhocore/jwt/src/ValidatesJWT.php
[Error] Line: 42

Browser Console:

TypeScript
GET https://appwrite.vezept.de/v1/tokens/buckets/68d4e29500081045f8bb/files/68d7ed2b000211cfe158 500 (Internal Server Error)
POST https://plausible.io/api/event net::ERR_BLOCKED_BY_CLIENT

However, everything works fine within my Angular app. I just became this warning in docker logs: [2025-09-27 14:13:59 *55.38] WARNING Context::build_header() (ERRNO 7105): You have set 'Transfer-Encoding', 'Content-Length' will be ignored

TL;DR
Developers can't view storage file details in Appwrite Console after setting tokens using the function createFileToken due to an "Invalid Argument Server Error." The Docker logs show a JWTException error related to maxAge not being set correctly. This issue does not affect the Angular app's functionality. A warning in Docker logs mentions 'Transfer-Encoding' affecting 'Content-Length.' **Solution:** Investigate and correct the maxAge parameter setting for the JWT token creation function to resolve the Invalid Argument Server Error when viewing storage file details in the Appwrite Console.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more