Azure / Azure/azure-functions-host
Intermittent `Cannot access a disposed object` when processing blob output binding
- Dominant language
- C#
- Stars
- 2k
- Forks
- 482
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 38
Description
Caught by azure-functions-python-worker tests
`function.json`:
```json
{
"scriptFile": "main.py",
"disabled": false,
"bindings": [
{
"authLevel": "anonymous",
"type": "httpTrigger",
"direction": "in",
"name": "req"
},
{
"type": "blob",
"direction": "out",
"name": "file",
"connection": "AzureWebJobsStorage",
"path": "python-worker-tests/test-bytes.txt"
},
{
"type": "http",
"direction": "out",
"name": "$return",
}
]
}
```
`main.py`:
```python
import azure.functions as azf
def main(req: azf.HttpRequest, file: azf.Out[str]) -> str:
file.set(req.get_body())
return 'OK'
```
Traceback:
```
Function.put_blob_bytes[0]
=> System.Collections.Generic.Dictionary`2[System.String,System.Object] =>
System.Collections.Generic.Dictionary`2[System.String,System.Object]
System.Private.CoreLib: Exception while executing function: Functions.put_blob_bytes.
Microsoft.Azure.WebJobs.Host: Error while handling parameter _binder after function returned:.
Microsoft.Azure.WebJobs.Host: Cannot access a disposed object.
```
Contributor guide
Assessment
This issue has not been assessed yet.