Direct method invocation fails with device Not found but works from Azure portal
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 25/100
Línea de trabajo
Comienza con azure-iot-hub/samples/iothub_registry_manager_method_sample.py y compara su configuración de backend con el entorno azure-iot-hub 2.6.0 indicado. Después inspecciona azure-iot-device/samples/async-hub-scenarios/receive_direct_method.py y reproduce la llamada al método directo contra la configuración del dispositivo indicada. Se considera terminado cuando las llamadas del sample y del módulo IoTHubRegistryManager ya no devuelvan HTTP 404 y el dispositivo reciba el método.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
I have been trying to get the code sample for Direct Method invocation from the samples. I am trying to use this sample for my backend code.
My IOT device is an x64 Virtual Machine on Azure connected to IoT hub using the symmetric keys method in the official documentation. The main.py in the IoT edge module is this code sample from the the repository. The IoT device is running azure-iot-device version 2.9.0 and azure-core 1.20.1. The logs from edgeAgent and edgeHub do not report any connection errors on the IoT device.
I have already seen an older version of the sample working but now I have been trying to get the direct method call sample working, but always get an error:
msrest.exceptions.HttpOperationError: Operation returned an invalid status code 'Not Found'
But, when I try to trigger the direct method from the Azure Portal, it works completely fine and I get the response from the registered method shown on the response section on the portal. It also works from VS Code.
I am using the "iothubowner" Connection string for the direct method invocation (backend code) and the calling machine is a local laptop with a conda environment with azure-iot-hub version 2.6.0 installed. Any module related calls with the IoTHubRegistryManager object (created with iothubowner connection string inside the sample) returns the same error.
On the IoT device side, all connections are okay and the device connection is not showing any errors.
I hope I have provided all the required information and it is completely surprising for me that the code sample that was working until recently does not work anymore. I really appreciate the support.
- Lenguaje dominante
- Python
- Estrellas
- 18
- Forks
- 24
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Azure/azure-iot-hub-python
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
Azure/azure-iot-hub-python#15 · 1 comentario ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Azure/azure-iot-hub-python#14 · 14 comentarios · 13 reacciones ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
Azure/azure-iot-hub-python#13 · 2 comentarios · 1 reacción ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
-
Available exceptions?Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
Todos los issues de Azure/azure-iot-hub-python
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
google-agentic-commerce/AP2#388 ·
-
area:codegen backend:cuda backend:hip bug direction:input
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
CrossGL/crosstl#3061 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
rlaope/oh-my-hermes#2304 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
mochan-tk/agentic-dev-kit-for-codex#64 ·
Los mantenedores suelen responder en 1 día
-
Windows ARM memory-leakAbiertobug docs performance
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
Los mantenedores suelen responder en 3 días