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

Closed
sciocoder opened this issue Oct 20, 2024 · 4 comments · Fixed by #7657
Closed
Assignees
Labels
🐾 duplicate This issue or pull request already exists 🌶️ hot chocolate
Milestone

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

@michaelstaib michaelstaib added the 🐾 duplicate This issue or pull request already exists label Oct 22, 2024
@dcube9

This comment has been minimized.

@michaelstaib
Copy link
Member

This is now fixed and will be released with 14.1

@sciocoder
Copy link
Author

This is now fixed and will be released with 14.1

thanks!

@dcube9
Copy link

dcube9 commented Oct 30, 2024

Great !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐾 duplicate This issue or pull request already exists 🌶️ hot chocolate
Projects
None yet
4 participants