All Google Related Node Error: dummy.stack.replace is not a function (Self-hosted n8n)

Hi everyone,
I’m encountering a recurring issue with the Google Sheets node in my self-hosted n8n setup.
:puzzle_piece: Issue Summary
While executing Google Sheets-related nodes, I intermittently receive the following error:
dummy.stack.replace is not a function
:gear: Environment Details
n8n version: 2.15.0 (Self-hosted on Hostinger VPS)
Node type: n8n-nodes-base.googleSheets
Node version: 4.2 (also tested newer version 4.7)
Execution mode: Manual + workflow execution
Authentication: Google OAuth2
:red_exclamation_mark: Error Details
Error: dummy.stack.replace is not a function
Other info:
Stack trace:
[ {}, {}, {}, {}, {}, {}, {}, {}, {} ]
:repeat_button: Behavior Observed
Error occurs during execution of Google Sheets nodes
Happens across multiple Google operations
Restarting VPS sometimes temporarily resolves it
Reconnecting credentials also temporarily fixes it
Issue eventually reappears
:test_tube: What I’ve Tried
Restarted VPS (Hostinger)
Reconnected Google credentials
Tested with updated node version
Verified basic configuration of Google Sheets node
Retried workflows multiple times
:pushpin: Additional Notes
Issue seems inconsistent (not always reproducible)
Stack trace appears empty ({} objects), which may indicate internal error handling issue
Possibly related to malformed input or node bug in current version
:red_question_mark: Questions
Is this a known issue with Google Sheets node or n8n core?
Could this be related to input data formatting or expression handling?
Is upgrading n8n version likely to resolve this?
Any recommended debugging steps for deeper inspection?
:folded_hands: Any help or insights would be greatly appreciated!
Thanks in advance :rocket:

1 Like

Hi @DINAKAR_S, this dummy.stack.replace is not a function error is a known issue that typically appears when there’s a serialization problem with the error object inside n8n’s internal error handling layer - it’s not related to your data or credentials directly.

A few things worth checking:

  1. Node version conflict: n8n 2.15.0 has specific Node.js version requirements. Make sure you’re running Node 18.x (LTS) and not Node 20/22. Run node --version on your VPS to confirm.

  2. Docker image issue: If you’re using Docker, try pulling the latest image for your version explicitly (docker pull n8nio/n8n:2.15.0 or just update to the latest stable). Sometimes a corrupted layer causes this intermittently.

  3. Update n8n: This specific error has been patched in newer versions. I’d recommend upgrading to at least n8n 2.17+ if possible. The intermittent nature suggests a race condition in error handling that was fixed in later releases.

  4. Temporary workaround: Since reconnecting credentials temporarily fixes it, this confirms it’s an OAuth token refresh issue interacting with a buggy error handler. You can add a scheduled workflow to refresh/test credentials periodically as a stopgap.

Let me know which approach works - happy to dig deeper if none of these resolve it.

dummy.stack.replace is not a function · Issue #28055 · n8n-io/n8n