espressif / esp-insights

ESP Insights: A remote diagnostics/observability framework for connected devices
Apache License 2.0
101 stars 27 forks source link

Getting an Invalid Chip in Esp Insights Dashboard #34

Closed antoniuschan99 closed 9 months ago

antoniuschan99 commented 11 months ago

Hello, I am getting an 'Invalid Chip' error in the ESP Insights Web Portal under Nodes.

I have also tried idf.py -DIDF_TARGET=esp32 reconfigure but no luck. Using ESP-IDF 5.1.1 (stable)

I have these in sdkconfig:

CONFIG_IDF_TARGET_ARCH_XTENSA=y CONFIG_IDF_TARGET_ARCH="xtensa" CONFIG_IDF_TARGET="esp32" CONFIG_IDF_TARGET_ESP32=y

CONFIG_ESP_INSIGHTS_ENABLED=y CONFIG_ESP_INSIGHTS_COREDUMP_ENABLE=y

antoniuschan99 commented 11 months ago

Upon investigating looks like on initial call on this block of code, it registers the node but also gives the invalid chip error.

However, on the next call (eg. on reboot) the invalid chip error gets fixed and shows as ESP32. Project and Chip version also gets populated correctly.

char* sensor_pin = get_sensor_pin();

esp_insights_config_t config = { .log_type = ESP_DIAG_LOG_TYPE_ERROR | ESP_DIAG_LOG_TYPE_WARNING | ESP_DIAG_LOG_TYPE_EVENT, .node_id = sensor_pin, .auth_key = insights_auth_key_start, };

esp_err_t ret = esp_insights_init(&config);

vikramdattu commented 10 months ago

@antoniuschan99 thanks for reporting. We will try to reproduce the issue and fix it.

Do you always get this issue once the node is up? Or is it a random issue?

antoniuschan99 commented 10 months ago

always getting it. I haven't looked into it further as it isn't a showstopper. If you need more info let me know!

vikramdattu commented 10 months ago

Hi @antoniuschan99 thanks. As one of the very message after reboot OR on the first boot, sent by ESP-Insights is the boot time data which contains the chip_id.

BTW, can you please let me know if char* sensor_pin = get_sensor_pin(); yields an unique ID and is consistent across reboots?

Please send the node_id of the device as well. This will aid us targeting the issue.

vikramdattu commented 10 months ago

Hi @antoniuschan99 I am able to re-produce the behaviour.

Here is what I see: When node starts appearing on the dashboard, it shows the chip as Invalid Chip. This is just for few seconds and if you refresh the dashboard after, say 5 seconds, it'll show a valid chip.

This behaviour is because, the information is received by Insights' cloud in different message and it might take few seconds till it populates this information. This doesn't need the device to reboot in between, and I think you are mis-interpreting it as getting fixed after reboot.

To make sure, that you are seeing the same as the issue, can you please wait on Invalid chip page for few seconds and if the information changes after the page refresh? (without rebooting the device in between).

antoniuschan99 commented 10 months ago

ok just saw this. Will test and update you in next few days. thanks!

antoniuschan99 commented 9 months ago

I will close this issue for now!