You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thanks for providing nhost/hasura-storage and support! I'm kind of lost with this error though. I have upgraded from nhost/hasura-storage:0.3.6 (everything was working fine) to v0.6.1 and now I'm getting 403's when uploading files.
I have allowed roles "user" and "editor" to select the new field "metadata" and there is an ENV var "S3_ENDPOINT" as mentioned in the release notes. It was there all along.
This is the request I'm doing -- there is nothing particularly interesting about it, it has worked with v0.3.6:
The TOKEN is valid, that's the same I'm using for Hasura.
With nhost/hasura-storage:0.6.1 response is a HTTP status 403:
{"error":{"message":"you are not authorized"}}
Container log shows this:
time="2024-10-07T19:15:45Z" level=error msg="call completed with some errors"
client_ip=10.0.0.2 errors="[problem processing request: problem initializing file
metadata: {\"networkErrors\":null,\"graphqlErrors\":[{\"message\":\"variable 'object'
is declared as 'files_insert_input!', but used where 'storage_files_insert_input!'
is expected\",\"extensions\":{\"code\":\"validation-failed\",\"path\":
\"$.selectionSet.insertFile.args.object\"}}]}]" latency_time=16.546408ms method=POST
status_code=403 url=/v1/files
The file is not persisted in table "files" and the request does not even get passed through to S3/Minio.
I have manually tried to issue the mutation in Hasura as follows:
mutationInsertFile($object: files_insert_input!) {
insertFile(object: $object) {
id
}
}
I'm getting the same error ("variable 'object' is declared as 'files_insert_input!', but used where 'storage_files_insert_input!' is expected").
When I change files_insert_input to storage_files_insert_input it is working however, the record gets persisted.
Now, my question is why InitializeFile is using files_insert_input instead of storage_files_insert_input and what can I do to make it work? Thanks in advance!
The text was updated successfully, but these errors were encountered:
Hello,
thanks for your message. It is using files_insert_input because that's the type name the service expects and that always expected. My guess is you modified the metadata in hasura and changed something that hasura-storage doesn't understand. Most likely by configuring the prefix "storage" to the schema. Otherwise, please, provide a minimal docker-compose file that reproduces the issue so we can take a look.
Hi, thanks for providing nhost/hasura-storage and support! I'm kind of lost with this error though. I have upgraded from nhost/hasura-storage:0.3.6 (everything was working fine) to v0.6.1 and now I'm getting 403's when uploading files.
I have allowed roles "user" and "editor" to select the new field "metadata" and there is an ENV var "S3_ENDPOINT" as mentioned in the release notes. It was there all along.
This is the request I'm doing -- there is nothing particularly interesting about it, it has worked with v0.3.6:
The TOKEN is valid, that's the same I'm using for Hasura.
With nhost/hasura-storage:0.6.1 response is a HTTP status 403:
Container log shows this:
The file is not persisted in table "files" and the request does not even get passed through to S3/Minio.
I have manually tried to issue the mutation in Hasura as follows:
Query variables:
I'm getting the same error ("variable 'object' is declared as 'files_insert_input!', but used where 'storage_files_insert_input!' is expected").
When I change
files_insert_input
tostorage_files_insert_input
it is working however, the record gets persisted.Now, my question is why InitializeFile is using
files_insert_input
instead ofstorage_files_insert_input
and what can I do to make it work? Thanks in advance!The text was updated successfully, but these errors were encountered: