Camera service snapshot failed

I have a flow in NodeRed which interact with a camera taking a snapshot and sending it to a Telegram channel while some condition are verified reading some binary sensor in HA.
It worked just till shit night but since then I got this error:

024-02-04 19:08:45.801 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547778280000] 
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/camera/", line 1009, in async_handle_snapshot_service
    else await camera.async_camera_image()
  File "/usr/src/homeassistant/homeassistant/components/generic/", line 219, in async_camera_image
    response = await async_client.get(
  File "/usr/local/lib/python3.11/site-packages/httpx/", line 1786, in get
    return await self.request(
  File "/usr/local/lib/python3.11/site-packages/httpx/", line 1559, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
  File "/usr/local/lib/python3.11/site-packages/httpx/", line 1646, in send
    response = await self._send_handling_auth(
  File "/usr/local/lib/python3.11/site-packages/httpx/", line 1674, in _send_handling_auth
    response = await self._send_handling_redirects(
  File "/usr/local/lib/python3.11/site-packages/httpx/", line 1711, in _send_handling_redirects
    response = await self._send_single_request(request)
  File "/usr/local/lib/python3.11/site-packages/httpx/", line 1748, in _send_single_request
    response = await transport.handle_async_request(request)
  File "/usr/local/lib/python3.11/site-packages/httpx/_transports/", line 371, in handle_async_request
    resp = await self._pool.handle_async_request(req)
  File "/usr/local/lib/python3.11/site-packages/httpcore/_async/", line 268, in handle_async_request
    raise exc
  File "/usr/local/lib/python3.11/site-packages/httpcore/_async/", line 251, in handle_async_request
    response = await connection.handle_async_request(request)
  File "/usr/local/lib/python3.11/site-packages/httpcore/_async/", line 76, in handle_async_request
    stream = await self._connect(request)
  File "/usr/local/lib/python3.11/site-packages/httpcore/_async/", line 124, in _connect
    stream = await self._network_backend.connect_tcp(**kwargs)
  File "/usr/local/lib/python3.11/site-packages/httpcore/_backends/", line 30, in connect_tcp
    return await self._backend.connect_tcp(
  File "/usr/local/lib/python3.11/site-packages/httpcore/_backends/", line 114, in connect_tcp
    stream: = await anyio.connect_tcp(
  File "/usr/local/lib/python3.11/site-packages/anyio/_core/", line 217, in connect_tcp
    async with create_task_group() as tg:
  File "/usr/local/lib/python3.11/site-packages/anyio/_backends/", line 668, in __aexit__
    raise cancelled_exc_while_waiting_tasks
  File "/usr/local/lib/python3.11/site-packages/anyio/_backends/", line 648, in __aexit__
    await asyncio.wait(self.cancel_scope._tasks)
  File "/usr/local/lib/python3.11/asyncio/", line 428, in wait
    return await _wait(fs, timeout, return_when, loop)
  File "/usr/local/lib/python3.11/asyncio/", line 535, in _wait
    await waiter
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/", line 238, in handle_call_service
    response = await
  File "/usr/src/homeassistant/homeassistant/", line 2149, in async_call
    response_data = await coro
  File "/usr/src/homeassistant/homeassistant/", line 2186, in _execute_service
    return await target(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/", line 272, in handle_service
    return await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/", line 882, in entity_service_call
    single_response = await _handle_entity_call(
  File "/usr/src/homeassistant/homeassistant/helpers/", line 952, in _handle_entity_call
    result = await task
  File "/usr/src/homeassistant/homeassistant/components/camera/", line 1005, in async_handle_snapshot_service
    async with asyncio.timeout(CAMERA_IMAGE_TIMEOUT):
  File "/usr/local/lib/python3.11/asyncio/", line 111, in __aexit__
    raise TimeoutError from exc_val

Nothing changed in my environment. The cam looks to work fine.
I don’t have any idea how to go on the the troubleshooting.
Please could you help me understanding what happened?

This is the node which fails in NodeRed:

        "id": "e34cd91ee5fcab10",
        "type": "api-call-service",
        "z": "45dd8798.2cfc88",
        "name": "",
        "server": "c6e21e6c.847e8",
        "version": 5,
        "debugenabled": false,
        "domain": "camera",
        "service": "snapshot",
        "areaId": [],
        "deviceId": [],
        "entityId": [
        "data": "{\"filename\":\"/media/snapshots/cucina_snapshot.jpg\"}",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 1130,
        "y": 2280,
        "wires": [
        "id": "c6e21e6c.847e8",
        "type": "server",
        "name": "Casa (local https)",
        "version": 5,
        "addon": false,
        "rejectUnauthorizedCerts": false,
        "ha_boolean": "y|yes|true|on|home|open",
        "connectionDelay": false,
        "cacheJson": true,
        "heartbeat": false,
        "heartbeatInterval": "30",
        "areaSelector": "friendlyName",
        "deviceSelector": "friendlyName",
        "entitySelector": "friendlyName",
        "statusSeparator": "at: ",
        "statusYear": "hidden",
        "statusMonth": "short",
        "statusDay": "numeric",
        "statusHourCycle": "h23",
        "statusTimeFormat": "h:m",
        "enableGlobalContextStore": true


I checked the configuration of the Generic Camera Integration.
If I cut and paste in the browser the URL configured in the filed Still Image URL I can see correctly a snapshot from the camera.

Have you tried creating a new generic camera with the still image URL? It previews the image during setup.

One subtle problem can be if the URL returns an html page with an image in it. The integration is looking for an actual image (jpeg,png,etc)

I don’t have idea about what happened.
Few weeks later the snapshot went back to work again.
I’m really frustrated not knowing what happened, but all’s well that ends well.