Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileSystemOperationDocumentStorage fails at SaveInternalAsync when persisting query #7631

Open
sciocoder opened this issue Oct 20, 2024 · 0 comments

Comments

@sciocoder
Copy link

the issue was already reported #4139 and has not been resolved, it is also present in the current version 14.

{
    "errors": [
        {
            "message": "Unexpected Execution Error",
            "extensions": {
                "message": "Cannot access a closed file.",
                "stackTrace": "   at System.IO.FileStream.FlushAsync(CancellationToken cancellationToken)\n   at HotChocolate.PersistedOperations.FileSystem.FileSystemOperationDocumentStorage.SaveInternalAsync(String filePath, IOperationDocument document, CancellationToken cancellationToken)\n   at HotChocolate.PersistedOperations.FileSystem.FileSystemOperationDocumentStorage.SaveInternalAsync(String filePath, IOperationDocument document, CancellationToken cancellationToken)\n   at HotChocolate.Execution.Pipeline.WritePersistedOperationMiddleware.InvokeAsync(IRequestContext context)\n   at HotChocolate.Execution.Pipeline.ReadPersistedOperationMiddleware.InvokeAsync(IRequestContext context)\n   at HotChocolate.Execution.Pipeline.DocumentCacheMiddleware.InvokeAsync(IRequestContext context)\n   at HotChocolate.Execution.Pipeline.TimeoutMiddleware.InvokeAsync(IRequestContext context)\n   at HotChocolate.Execution.Pipeline.ExceptionMiddleware.InvokeAsync(IRequestContext context)"
            }
        }
    ]
}

when IOperationDocument is of type OperationDocument the stream after document.WriteToAsync is disposed here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants