fix: skip nodeinfo upsert when we recieve defaults from the node#3796
Merged
jamesarich merged 1 commit intoNov 24, 2025
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3796 +/- ##
========================================
- Coverage 0.56% 0.56% -0.01%
========================================
Files 381 381
Lines 21738 21747 +9
Branches 2683 2687 +4
========================================
Hits 122 122
- Misses 21596 21605 +9
Partials 20 20 ☔ View full report in Codecov by Sentry. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root Cause
The firmware has a limited node database size that varies by hardware:
When the firmware's nodeDB fills up and needs to add a new node, it evicts the oldest non-favorite node. When the evicted node is later re-encountered, the firmware creates a fresh entry with default placeholder values (memset to zero except node number):
The bug was in MeshService.kt:installNodeInfo() - it unconditionally overwrote the app's stored node information whenever the firmware sent NodeInfo with user data, even when that data was just firmware's default placeholder. This caused users to see nodes lose their real names and revert to generic "Meshtastic XXXX" names after the firmware's nodeDB cycled through enough nodes.
Fix
Modified installNodeInfo() to detect when firmware sends placeholder data by checking both:
When both conditions are true AND the app has existing valid user data, we preserve all existing user information instead of overwriting it with the placeholder.
This ensures:
Draft because it'll take a bit for my nodedb to repopulate to confirm, but after reading firmwawre/app I'm 99.9% sure this will fix