[GH-ISSUE #3252] TypeError: Cannot read properties of null (reading 'forEach') logged every ~63s after upgrading from 1.18.x to 1.19.x #35766

Closed
opened 2026-06-18 20:59:51 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @mark25pi on GitHub (Jun 12, 2026).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/3252

Describe the Bug

After upgrading from 1.18.4 to 1.19.1, the following error appears in docker logs pangolin every ~63 seconds:
Failed to update database from config: TypeError: Cannot read properties of null (reading 'forEach')
The interval matches the Newt heartbeat period exactly. The UI and all tunnels remain fully functional — the error is non-critical but logs continuously and will bloat container logs over time.

Environment

OS Type & Version: Debian 12
Pangolin Version: 1.19.1
Edition (Community or Enterprise): Community
Gerbil Version: 1.4.1
Traefik Version: v3.5
Newt Version: 1.13.0
Client Version: N/A

To Reproduce

Have an existing Pangolin instance with resources created in 1.18.x
Upgrade to 1.19.x
Have any Newt client connected (Docker socket not required — Newt clients with no blueprint labels reproduce the issue)
Check docker logs pangolin — the error fires once per Newt heartbeat (~63 seconds) immediately and indefinitely

Expected Behavior

No error should be logged. The inline policy sync introduced in 1.19 should handle a NULL defaultResourcePolicyId gracefully for resources that were created in 1.18.x and have not yet had this field populated. Either skip the sync for those resources or initialise the field on first encounter rather than calling .forEach() on null.
For reference, the call chain traced through source: Newt heartbeat → applyNewtDockerBlueprint() → applyBlueprint() → updatePublicResources() → ensureInlinePolicy() / syncInlinePolicyAuth() / syncInlinePolicyRules() → .forEach() on null. The catch block in applyNewtDockerBlueprint.ts (~line 110) is where the error string is logged. The null value originates from the new 1.19 defaultResourcePolicyId column being NULL for all pre-existing resources.

Originally created by @mark25pi on GitHub (Jun 12, 2026). Original GitHub issue: https://github.com/fosrl/pangolin/issues/3252 ### Describe the Bug After upgrading from 1.18.4 to 1.19.1, the following error appears in docker logs pangolin every ~63 seconds: Failed to update database from config: TypeError: Cannot read properties of null (reading 'forEach') The interval matches the Newt heartbeat period exactly. The UI and all tunnels remain fully functional — the error is non-critical but logs continuously and will bloat container logs over time. ### Environment OS Type & Version: Debian 12 Pangolin Version: 1.19.1 Edition (Community or Enterprise): Community Gerbil Version: 1.4.1 Traefik Version: v3.5 Newt Version: 1.13.0 Client Version: N/A ### To Reproduce Have an existing Pangolin instance with resources created in 1.18.x Upgrade to 1.19.x Have any Newt client connected (Docker socket not required — Newt clients with no blueprint labels reproduce the issue) Check docker logs pangolin — the error fires once per Newt heartbeat (~63 seconds) immediately and indefinitely ### Expected Behavior No error should be logged. The inline policy sync introduced in 1.19 should handle a NULL defaultResourcePolicyId gracefully for resources that were created in 1.18.x and have not yet had this field populated. Either skip the sync for those resources or initialise the field on first encounter rather than calling .forEach() on null. For reference, the call chain traced through source: Newt heartbeat → applyNewtDockerBlueprint() → applyBlueprint() → updatePublicResources() → ensureInlinePolicy() / syncInlinePolicyAuth() / syncInlinePolicyRules() → .forEach() on null. The catch block in applyNewtDockerBlueprint.ts (~line 110) is where the error string is logged. The null value originates from the new 1.19 defaultResourcePolicyId column being NULL for all pre-existing resources.
Author
Owner

@oschwartz10612 commented on GitHub (Jun 12, 2026):

Hello could you attach a full snip of the logs when this occurs a couple of times? That would be helpful!

<!-- gh-comment-id:4693351048 --> @oschwartz10612 commented on GitHub (Jun 12, 2026): Hello could you attach a full snip of the logs when this occurs a couple of times? That would be helpful!
Author
Owner

@mark25pi commented on GitHub (Jun 13, 2026):

My issue is resolved with 1.19.2
Thank you

<!-- gh-comment-id:4697686902 --> @mark25pi commented on GitHub (Jun 13, 2026): My issue is resolved with 1.19.2 Thank you
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/pangolin#35766