You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Update Check Timestamp Written Even When Version Fetch Failed #739
In checkForUpdates(), updateLastCheckTime() is called immediately after fetchLatestVersion() regardless of whether the fetch succeeded or returned null. When fetchLatestVersion() fails (e.g., offline, npm registry down), it returns null - but the "last checked" timestamp is still written to preferences. This causes the app to skip the next scheduled update check entirely, silently preventing users who were temporarily offline from ever
seeing an update notification.
Environment
OS: Any
Node version: Any
Nanocoder version: Latest
Provider: Any
Model: Any
Steps to Reproduce
Disconnect from the internet.
Launch Nanocoder (or trigger an update check).
Observe that preferences.lastUpdateCheck is updated despite the fetch failing.
Reconnect to the internet.
Wait for the next update check interval - no update notification appears
because the timestamp was already written.
Expected Behavior
The "last checked" timestamp should only be updated when a valid version string is successfully returned from the npm registry.
Actual Behavior
The timestamp is updated unconditionally, even when fetchLatestVersion() returns null due to a network error.
Logs/Screenshots
N/A
Additional Context
Fix: wrap updateLastCheckTime() in an if (latestVersion !== null) check.
Note: the existing catch block on line 176 already calls updateLastCheckTime() intentionally to prevent hammering on repeated crashes - that behavior is correct and should remain unchanged.
Note: This issue is intentionally kept small and is suitable for first-time contributors. If you're interested in working on it, please leave a comment below and ask to be assigned before opening a pull request.
I have searched existing issues to ensure this is not a duplicate
I can reproduce this issue consistently
This issue occurs with the latest version of nanocoder
Hi @akramcodez, I'd like to work on this, already done similar fix in this codebase before (#729) and this looks like a good next one for me. Could you assign it to me?
Activity
MsadafK commentedon Aug 1, 2026
Hi @akramcodez , I would like to work on this issue. Please assign it to me!
DeepamJha commentedon Aug 1, 2026
Hi @akramcodez, I'd like to work on this, already done similar fix in this codebase before (#729) and this looks like a good next one for me. Could you assign it to me?
akramcodez commentedon Aug 2, 2026
Hey @DeepamJha and @MsadafK, you both are already assigned to other issues. Could you please complete those first before taking on new ones? Thanks!
hiarun02 commentedon Aug 2, 2026
Hi @akramcodez, I'd like to work on this issue, assign it to me
RealBhupesh commentedon Aug 2, 2026
I would like to work on this issue. I will include a focused fix and regression coverage in a PR shortly.