deep-foundation / deep-foundation/deepcase-app
AsyncFile not working
- Dominant language
- TypeScript
- Stars
- 10
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
- I drag&drop image to deepcase
- Click on AsyncFile, client handler for AsyncFile not working
- Open hasura console with default pass (port: 8080, pass: myadminsecretkey), I don't see any file:
- Try to load another one file (id: 990):
- Errors in browser console:
```
xhr.js:187
POST https://3006-deepfoundation-dev-cubg46ymmbg.ws-us97.gitpod.io/gql/file 404
next-dev.js:20 Error: Request failed with status code 404
at createError (createError.js:16:1)
at settle (settle.js:17:1)
at XMLHttpRequest.onloadend (xhr.js:54:1)
```
nhost/hasura-storage docker logs:
```
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
- using env: export GIN_MODE=release
- using code: gin.SetMode(gin.ReleaseMode)
[GIN-debug] GET /healthz --> github.com/nhost/hasura-storage/controller.(*Controller).Health-fm (4 handlers)
[GIN-debug] GET /v1/openapi.yaml --> github.com/nhost/hasura-storage/controller.(*Controller).OpenAPI-fm (4 handlers)
[GIN-debug] GET /v1/version --> github.com/nhost/hasura-storage/controller.(*Controller).Version-fm (4 handlers)
[GIN-debug] POST /v1/files --> github.com/nhost/hasura-storage/controller.(*Controller).UploadFile-fm (4 handlers)
[GIN-debug] POST /v1/files/ --> github.com/nhost/hasura-storage/controller.(*Controller).UploadFile-fm (4 handlers)
[GIN-debug] GET /v1/files/:id --> github.com/nhost/hasura-storage/controller.(*Controller).GetFile-fm (4 handlers)
[GIN-debug] HEAD /v1/files/:id --> github.com/nhost/hasura-storage/controller.(*Controller).GetFileInformation-fm (4 handlers)
[GIN-debug] PUT /v1/files/:id --> github.com/nhost/hasura-storage/controller.(*Controller).UpdateFile-fm (4 handlers)
[GIN-debug] DELETE /v1/files/:id --> github.com/nhost/hasura-storage/controller.(*Controller).DeleteFile-fm (4 handlers)
[GIN-debug] GET /v1/files/:id/presignedurl --> github.com/nhost/hasura-storage/controller.(*Controller).GetFilePresignedURL-fm (4 handlers)
[GIN-debug] GET /v1/files/:id/presignedurl/content --> github.com/nhost/hasura-storage/controller.(*Controller).GetFileWithPresignedURL-fm (4 handlers)
[GIN-debug] POST /v1/ops/list-orphans --> github.com/nhost/hasura-storage/controller.(*Controller).ListOrphans-fm (4 handlers)
[GIN-debug] POST /v1/ops/delete-orphans --> github.com/nhost/hasura-storage/controller.(*Controller).DeleteOrphans-fm (4 handlers)
[GIN-debug] POST /v1/ops/list-broken-metadata --> github.com/nhost/hasura-storage/controller.(*Controller).ListBrokenMetadata-fm (4 handlers)
[GIN-debug] POST /v1/ops/delete-broken-metadata --> github.com/nhost/hasura-storage/controller.(*Controller).DeleteBrokenMetadata-fm (4 handlers)
[GIN-debug] POST /v1/ops/list-not-uploaded --> github.com/nhost/hasura-storage/controller.(*Controller).ListNotUploaded-fm (4 handlers)
[GIN-debug] Listening and serving HTTP on :8000
time="2023-05-22T18:56:00Z" level=info msg="starting server"
problem reading : Config File "hasura-storage" Not Found in "[/]"
time="2023-05-23T06:58:19Z" level=info msg="storage version 0.2.3"
time="2023-05-23T06:58:19Z" level=debug msg=parameters bind=":8000" debug=true hasura-endpoint="http://host.docker.internal:8080/v1" hasura-metadata=true postgres-migrations=false s3-bucket=default s3-endpoint="http://host.docker.internal:9000" s3-region=no-region s3-root-folder=default trusted-proxies="[]"
time="2023-05-23T06:58:19Z" level=info msg="applying hasura metadata"
time="2023-05-23T06:58:20Z" level=error msg="problem applying hasura metadata: problem adding metadata for the buckets table: problem executing request: Post \"http://host.docker.internal:8080/v1/metadata\": read tcp 172.19.0.2:43482->172.17.0.1:8080: read: connection reset by peer"
problem reading : Config File "hasura-storage" Not Found in "[/]"
time="2023-05-23T06:58:21Z" level=info msg="storage version 0.2.3"
time="2023-05-23T06:58:21Z" level=debug msg=parameters bind=":8000" debug=true hasura-endpoint="http://host.docker.internal:8080/v1" hasura-metadata=true postgres-migrations=false s3-bucket=default s3-endpoint="http://host.docker.internal:9000" s3-region=no-region s3-root-folder=default trusted-proxies="[]"
time="2023-05-23T06:58:21Z" level=info msg="applying hasura metadata"
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
- using env: export GIN_MODE=release
- using code: gin.SetMode(gin.ReleaseMode)
[GIN-debug] GET /healthz --> github.com/nhost/hasura-storage/controller.(*Controller).Health-fm (4 handlers)
[GIN-debug] GET /v1/openapi.yaml --> github.com/nhost/hasura-storage/controller.(*Controller).OpenAPI-fm (4 handlers)
[GIN-debug] GET /v1/version --> github.com/nhost/hasura-storage/controller.(*Controller).Version-fm (4 handlers)
[GIN-debug] POST /v1/files --> github.com/nhost/hasura-storage/controller.(*Controller).UploadFile-fm (4 handlers)
[GIN-debug] POST /v1/files/ --> github.com/nhost/hasura-storage/controller.(*Controller).UploadFile-fm (4 handlers)
[GIN-debug] GET /v1/files/:id --> github.com/nhost/hasura-storage/controller.(*Controller).GetFile-fm (4 handlers)
[GIN-debug] HEAD /v1/files/:id --> github.com/nhost/hasura-storage/controller.(*Controller).GetFileInformation-fm (4 handlers)
[GIN-debug] PUT /v1/files/:id --> github.com/nhost/hasura-storage/controller.(*Controller).UpdateFile-fm (4 handlers)
[GIN-debug] DELETE /v1/files/:id --> github.com/nhost/hasura-storage/controller.(*Controller).DeleteFile-fm (4 handlers)
[GIN-debug] GET /v1/files/:id/presignedurl --> github.com/nhost/hasura-storage/controller.(*Controller).GetFilePresignedURL-fm (4 handlers)
[GIN-debug] GET /v1/files/:id/presignedurl/content --> github.com/nhost/hasura-storage/controller.(*Controller).GetFileWithPresignedURL-fm (4 handlers)
[GIN-debug] POST /v1/ops/list-orphans --> github.com/nhost/hasura-storage/controller.(*Controller).ListOrphans-fm (4 handlers)
[GIN-debug] POST /v1/ops/delete-orphans --> github.com/nhost/hasura-storage/controller.(*Controller).DeleteOrphans-fm (4 handlers)
[GIN-debug] POST /v1/ops/list-broken-metadata --> github.com/nhost/hasura-storage/controller.(*Controller).ListBrokenMetadata-fm (4 handlers)
[GIN-debug] POST /v1/ops/delete-broken-metadata --> github.com/nhost/hasura-storage/controller.(*Controller).DeleteBrokenMetadata-fm (4 handlers)
[GIN-debug] POST /v1/ops/list-not-uploaded --> github.com/nhost/hasura-storage/controller.(*Controller).ListNotUploaded-fm (4 handlers)
[GIN-debug] Listening and serving HTTP on :8000
time="2023-05-23T06:58:21Z" level=info msg="starting server"
```
minio/minio docker logs:
```
Status: 1 Online, 0 Offline.
S3-API: http://0.0.0.0:9000
Console: http://0.0.0.0:32765
Documentation: https://min.io/docs/minio/linux/index.html
Warning: The standard parity is set to 0. This can lead to data loss.
Exiting on signal: TERMINATED
MinIO Object Storage Server
Copyright: 2015-2023 MinIO, Inc.
License: GNU AGPLv3
Version: RELEASE.2023-05-18T00-05-36Z (go1.19.9 linux/amd64)
Status: 1 Online, 0 Offline.
S3-API: http://0.0.0.0:9000
Console: http://0.0.0.0:32765
Documentation: https://min.io/docs/minio/linux/index.html
Warning: The standard parity is set to 0. This can lead to data loss.
Exiting on signal: TERMINATED
MinIO Object Storage Server
Copyright: 2015-2023 MinIO, Inc.
License: GNU AGPLv3
Version: RELEASE.2023-05-18T00-05-36Z (go1.19.9 linux/amd64)
Status: 1 Online, 0 Offline.
S3-API: http://0.0.0.0:9000
Console: http://0.0.0.0:32765
Documentation: https://min.io/docs/minio/linux/index.html
Warning: The standard parity is set to 0. This can lead to data loss.
Exiting on signal: TERMINATED
MinIO Object Storage Server
Copyright: 2015-2023 MinIO, Inc.
License: GNU AGPLv3
Version: RELEASE.2023-05-18T00-05-36Z (go1.19.9 linux/amd64)
Status: 1 Online, 0 Offline.
S3-API: http://0.0.0.0:9000
Console: http://0.0.0.0:32765
Documentation: https://min.io/docs/minio/linux/index.html
Warning: The standard parity is set to 0. This can lead to data loss.
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the drag-and-drop flow and inspect the browser request to /gql/file alongside the hasura-storage Docker logs. Start with the client AsyncFile handler and the storage service configuration, then verify that uploading and loading a file create the expected storage record and no longer return 404.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, typescript
- Domain
- api, full-stack, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100