Title: sqlite: process aborts when an SQLite error message exceeds the V8 string limit · Issue #66520 · nodejs/node · GitHub
Open Graph Title: sqlite: process aborts when an SQLite error message exceeds the V8 string limit · Issue #66520 · nodejs/node
X Title: sqlite: process aborts when an SQLite error message exceeds the V8 string limit · Issue #66520 · nodejs/node
Description: Version main Platform All Subsystem sqlite What steps will reproduce the bug? import { Database } from 'node:sqlite'; import { constants } from 'node:buffer'; const db = new Database(':memory:'); // '\u20ac' is 1 UTF-16 unit but 3 UTF-8 ...
Open Graph Description: Version main Platform All Subsystem sqlite What steps will reproduce the bug? import { Database } from 'node:sqlite'; import { constants } from 'node:buffer'; const db = new Database(':memory:'); /...
X Description: Version main Platform All Subsystem sqlite What steps will reproduce the bug? import { Database } from 'node:sqlite'; import { constants } from 'node:buffer'; const db = new Databas...
Opengraph URL: https://github.com/nodejs/node/issues/66520
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"sqlite: process aborts when an SQLite error message exceeds the V8 string limit","articleBody":"### Version\n\nmain\n\n### Platform\n\n```text\nAll\n```\n\n### Subsystem\n\nsqlite\n\n### What steps will reproduce the bug?\n\n```js\nimport { Database } from 'node:sqlite';\nimport { constants } from 'node:buffer';\n\nconst db = new Database(':memory:');\n// '\\u20ac' is 1 UTF-16 unit but 3 UTF-8 bytes.\nconst name = '\\u20ac'.repeat(Math.ceil(constants.MAX_STRING_LENGTH / 3) + 10);\ntry {\n db.prepare(`SELECT 1 FROM \"${name}\"`);\n} catch (err) {\n console.log(err.code, err.message.length);\n}\n```\n\n### How often does it reproduce? Is there a required condition?\n\nAlways\n\n### What is the expected behavior? Why is that the expected behavior?\n\n`prepare()` should throw a catchable error and not abort the process. With a 10-character name, the same code prints `ERR_SQLITE_ERROR 25`. [`ERR_SQLITE_ERROR`](https://nodejs.org/api/errors.html#err_sqlite_error) is documented as \"An error was returned from SQLite.\" If the message can't be represented as a JS string, the error should fall back to `ERR_STRING_TOO_LONG` or to an `ERR_SQLITE_ERROR` with a truncated message.\n\n\n### What do you see instead?\n\n```console\n#\n# Fatal error\n# Check failed: String::kMaxLength >= len.\n#\n#\n#\n#FailureMessage Object: 0x16ce74ca8\n----- Native stack trace -----\n```\n\n### Additional information\n\n_No response_","author":{"url":"https://github.com/trivikr","@type":"Person","name":"trivikr"},"datePublished":"2026-10-05T01:43:01Z","url":"https://github.com/nodejs/node/issues/66520"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6378cf96-9147-5d4a-440d-72a6e895f35d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B150:35D054:349B8F:442074:6AED1DC7 |
| html-safe-nonce | 1ad5ce32610a4c8245e1b9811fb80dcfd97639f8c5ecd2e4eb6063f80a688367 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMTUwOjM1RDA1NDozNDlCOEY6NDQyMDc0OjZBRUQxREM3IiwidmlzaXRvcl9pZCI6Ijg4MDgyNDk5MTE3NTMzODMzNjciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 50183de5333a3766d6c48f0cd658fa1767534394d5623cc14c2f24abee282909 |
| hovercard-subject-tag | issue:5705237977 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/66520/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6ee9676c2f568f4b00d0647839cf9839e87c753301bf25c1dba4c2756b6eb610/nodejs/node/issues/66520 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6ee9676c2f568f4b00d0647839cf9839e87c753301bf25c1dba4c2756b6eb610/nodejs/node/issues/66520 |
| og:image:alt | Version main Platform All Subsystem sqlite What steps will reproduce the bug? import { Database } from 'node:sqlite'; import { constants } from 'node:buffer'; const db = new Database(':memory:'); /... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | trivikr |
| hostname | github.com |
| expected-hostname | github.com |
| None | e3e0f7f63e50c6fe879198a93a0a023a648ecc0a5e9bc3b5e033ac57172237e6 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 707a24b346ac8a82878b9c084efaa38a997660cb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width