<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[🔍 Troubleshooting Index — Error Messages & Solutions [SEARCH HERE FIRST]]]></title><description><![CDATA[<h2>Troubleshooting Index</h2>
<p dir="auto">Search this page (Ctrl+F) for your error message before posting.</p>
<hr />
<h3>GrapesIDE &amp; Toolchain</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Error</th>
<th>Cause</th>
<th>Solution</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>A fatal error occurred: Failed to connect to ESP32</code></td>
<td>Board not in flash mode</td>
<td>Hold BOOT button while clicking Upload</td>
</tr>
<tr>
<td><code>No serial port found</code></td>
<td>Driver not installed</td>
<td>Install CH340 or CP2102 driver</td>
</tr>
<tr>
<td><code>Sketch too large</code></td>
<td>Binary exceeds flash</td>
<td>Change Partition Scheme to "No OTA (2MB)"</td>
</tr>
<tr>
<td><code>'x' was not declared in this scope</code></td>
<td>Missing #include or typo</td>
<td>Add the correct header file</td>
</tr>
<tr>
<td><code>implicit conversion loses integer precision</code></td>
<td>Type mismatch</td>
<td>Cast explicitly or fix variable type</td>
</tr>
<tr>
<td><code>warning: unused variable</code></td>
<td>Variable declared but never used</td>
<td>Remove or use the variable. Enable -Werror — this must be fixed</td>
</tr>
</tbody>
</table>
<hr />
<h3>ESP32 Hardware</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Error / Symptom</th>
<th>Cause</th>
<th>Solution</th>
</tr>
</thead>
<tbody>
<tr>
<td>ADC reads 0 or noise during WiFi</td>
<td>ADC2 conflicts with WiFi</td>
<td>Switch to ADC1 channels (GPIO32-39)</td>
</tr>
<tr>
<td>GPIO reads random values (floating)</td>
<td>No pull-up/pull-down</td>
<td>Add 10kΩ pull-up or enable internal pull-up</td>
</tr>
<tr>
<td>Device resets randomly</td>
<td>Brownout — supply voltage too low</td>
<td>Measure VCC under load. Use better USB cable/adapter</td>
</tr>
<tr>
<td>Serial output garbled</td>
<td>Wrong baud rate in monitor</td>
<td>Match Serial.begin() rate exactly</td>
</tr>
<tr>
<td>LED on but dim</td>
<td>GPIO current limit exceeded</td>
<td>Add current-limiting resistor</td>
</tr>
</tbody>
</table>
<hr />
<h3>FreeRTOS</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Error / Symptom</th>
<th>Cause</th>
<th>Solution</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>Guru Meditation Error: Core panic'd</code></td>
<td>Stack overflow, null deref, WDT</td>
<td>Decode with addr2line — see <a href="#">Block 2 Crash Lab</a></td>
</tr>
<tr>
<td><code>Task watchdog got triggered: taskName</code></td>
<td>Task running without vTaskDelay</td>
<td>Add vTaskDelay(pdMS_TO_TICKS(1)) in loop</td>
</tr>
<tr>
<td>Device freezes randomly</td>
<td>Deadlock between mutexes</td>
<td>Check mutex acquisition order — always same order across tasks</td>
</tr>
<tr>
<td><code>assert failed: queue.c</code></td>
<td>Queue full with no space</td>
<td>Increase queue size or consume faster</td>
</tr>
<tr>
<td>Device reboots every N seconds</td>
<td>WDT not being reset</td>
<td>Add esp_task_wdt_reset() or vTaskDelay in busy tasks</td>
</tr>
</tbody>
</table>
<hr />
<h3>MQTT &amp; Connectivity</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Error / Code</th>
<th>Cause</th>
<th>Solution</th>
</tr>
</thead>
<tbody>
<tr>
<td>PubSubClient state <code>-2</code> (CONNECT_FAILED)</td>
<td>Wrong credentials or broker down</td>
<td>Check username/password/token</td>
</tr>
<tr>
<td>PubSubClient state <code>-4</code> (TIMEOUT)</td>
<td>Wrong broker IP/port, firewall</td>
<td>Verify host, port 8883 for TLS</td>
</tr>
<tr>
<td>PubSubClient state <code>5</code> (UNAUTHORIZED)</td>
<td>ACL blocked the topic</td>
<td>Check topic matches your device_id exactly</td>
</tr>
<tr>
<td>TLS <code>certificate verify failed</code></td>
<td>Wrong CA cert or device clock wrong</td>
<td>Sync NTP before TLS connect</td>
</tr>
<tr>
<td>TLS <code>handshake timeout</code></td>
<td>Heap too low for TLS</td>
<td>Need &gt;50KB free heap — check esp_get_free_heap_size()</td>
</tr>
<tr>
<td>WiFi connects but MQTT fails</td>
<td>TLS port blocked by ISP/router</td>
<td>Try port 8083 (WS) or check firewall rules</td>
</tr>
<tr>
<td>Messages not arriving</td>
<td>QoS mismatch</td>
<td>Check publisher and subscriber QoS match</td>
</tr>
</tbody>
</table>
<hr />
<h3>GrapesIoT Platform</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Symptom</th>
<th>Cause</th>
<th>Solution</th>
</tr>
</thead>
<tbody>
<tr>
<td>Device shows offline in dashboard</td>
<td>LWT not configured or WiFi down</td>
<td>Check MQTT connection and LWT topic</td>
</tr>
<tr>
<td>OTA command sent but device ignores</td>
<td>Device not subscribed to /down/#</td>
<td>Check subscription in firmware</td>
</tr>
<tr>
<td>Dashboard shows old data</td>
<td>Retained message from previous session</td>
<td>Clear retained by publishing empty payload</td>
</tr>
<tr>
<td>Alarm not triggering</td>
<td>Wrong field path in rule config</td>
<td>Check dot-notation path matches payload key</td>
</tr>
</tbody>
</table>
<hr />
<h3>GrapesIDE Specific</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Issue</th>
<th>Solution</th>
</tr>
</thead>
<tbody>
<tr>
<td>Autocomplete not working</td>
<td>Restart IntelliSense: Ctrl+Shift+P → Reload Window</td>
</tr>
<tr>
<td>Board not detected on Mac</td>
<td>Allow USB accessories in System Settings → Privacy</td>
</tr>
<tr>
<td>Build slow</td>
<td>Exclude .pio folder from antivirus</td>
</tr>
</tbody>
</table>
<hr />
<p dir="auto"><em>Last updated by instructor. Post below if you have a new error+solution to add.</em></p>
]]></description><link>https://forum.grapesiot.com/topic/12/troubleshooting-index-error-messages-solutions-search-here-first</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Jul 2026 09:23:15 GMT</lastBuildDate><atom:link href="https://forum.grapesiot.com/topic/12.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 22 Jul 2026 06:23:31 GMT</pubDate><ttl>60</ttl></channel></rss>