Skip to content

SQLite Database Corrupt Error on new site #649

@claughinghouse

Description

@claughinghouse

Description

When deploying a new blank site I see this error when attempting to update any page on a site. Replicated with new site, D1 db, and bucket. Only occurs when editing a published page or post.

Steps to reproduce

  1. Create a new site using the Deploy to cloud button
  2. Create admin account and login
  3. Create a page or post
  4. Add Contents and click save
  5. Re-open post or page and edit any content
  6. Click publish
  7. Failed toast pops up with above log in the cloudflare logs.

Environment

EmDash - 0.4.0
Node 22
Cloudflare workers

Logs / error output

{ "message": "Content publish error: Error: D1_ERROR: database disk image is malformed: SQLITE_CORRUPT (extended: SQLITE_CORRUPT_VTAB)", "level": "error", "$workers": { "truncated": false, "event": { "request": { "url": "https://emdas.example.com/_emdash/api/content/pages/01KPGMSTHB085S85Z1ESJNPKZ0/publish", "method": "POST", "path": "/_emdash/api/content/pages/01KPGMSTHB085S85Z1ESJNPKZ0/publish" } }, "outcome": "ok", "scriptName": "example-com-emdash", "eventType": "fetch", "executionModel": "stateless", "scriptVersion": { "id": "2c05b7ee-8c16-46f4-84e7-97deb96e87d6" }, "requestId": "9ee4d9627fd4573a" }, "$metadata": { "id": "01KPGMT6SJA7PQTJ48600W6ZDH", "requestId": "9ee4d9627fd4573a", "trigger": "POST /_emdash/api/content/pages/01KPGMSTHB085S85Z1ESJNPKZ0/publish", "service": "example-com-emdash", "level": "error", "error": "Content publish error: Error: D1_ERROR: database disk image is malformed: SQLITE_CORRUPT (extended: SQLITE_CORRUPT_VTAB)", "message": "Content publish error: Error: D1_ERROR: database disk image is malformed: SQLITE_CORRUPT (extended: SQLITE_CORRUPT_VTAB)", "account": "483669ea821828435edea4557f0620ea", "type": "cf-worker", "fingerprint": "b64558f2c0cad7b5e17f30191a8fb5e3", "origin": "fetch", "messageTemplate": "Content publish error: Error: D1_ERROR: database disk image is malformed: SQLITE_CORRUPT (extended: SQLITE_CORRUPT_VTAB)", } }
{ "message": "POST https://emdash.example.com/_emdash/api/content/pages/01KPGMSTHB085S85Z1ESJNPKZ0/publish", "level": "error", "$workers": { "event": { "request": { "cf": { "requestHeaderNames": {}, "botManagement": { "detectionIds": {}, "corporateProxy": false, "verifiedBot": false, "jsDetection": { "passed": false, }, "staticResource": false, "score": 99, }, "isEUCountry": false, "tlsClientAuth": { "certRFC9440TooLarge": false, "certChainRFC9440TooLarge": false, "certPresented": "0", "certVerified": "NONE", "certRevoked": "0", "certIssuerDN": "", "certSubjectDN": "", "certIssuerDNRFC2253": "", "certSubjectDNRFC2253": "", "certIssuerDNLegacy": "", "certSubjectDNLegacy": "", "certSerial": "", "certIssuerSerial": "", "certSKI": "", "certIssuerSKI": "", "certFingerprintSHA1": "", "certFingerprintSHA256": "", "certNotBefore": "", "certNotAfter": "", "certRFC9440": "", "certChainRFC9440": "" }, "httpProtocol": "HTTP/3", "clientAcceptEncoding": "gzip, deflate, br", "requestPriority": "", "colo": "N/A", "asOrganization": "n/a", "country": "US", "city": "redacted", "continent": "NA", "region": "redacted", "regionCode": "NA", "timezone": "America/New_York", "longitude": "-redacted", "latitude": "redacted", "postalCode": "removed", "metroCode": "n/a", "tlsVersion": "TLSv1.3", "tlsCipher": "AEAD-AES256-GCM-SHA384", "tlsClientRandom": "wTqNGGU/lKt/OMu26rWBl38qL8YAE7UMyS1zVf78Xrw=", "tlsClientCiphersSha1": "Vvu1Wqm1r1OJOzu1ymEBLTp6Bxo=", "tlsClientExtensionsSha1": "5pSNXikPa/3pTynT+T6ETjQsEYQ=", "tlsClientExtensionsSha1Le": "otS3Q5sCQV2RmDJaBvTzr4DwJAc=", "tlsClientHelloLength": "1478", "verifiedBotCategory": "", "edgeRequestKeepAliveStatus": 1, "clientTcpRtt": 0, "clientQuicRtt": 26, "asn": n/a, "edgeL4": { "deliveryRate": 19336647, } }, "url": "https://emdash.example.com/_emdash/api/content/pages/01KPGMSTHB085S85Z1ESJNPKZ0/publish", "method": "POST", "headers": { "accept": "*/*", "accept-encoding": "gzip, br", "accept-language": "en-US,en;q=0.9", "cf-connecting-ip": "redacted", "cf-ipcountry": "US", "cf-ray": "9ee4d9627fd4573a", "cf-visitor": "{"scheme":"https"}", "connection": "Keep-Alive", "content-length": "0", "cookie": "REDACTED", "host": "emdash.example.com", "origin": "https://emdash.example.com", "priority": "u=3, i", "referer": "https://emdash.example.com/_emdash/admin/content/pages/01KPGMSTHB085S85Z1ESJNPKZ0", "sec-fetch-dest": "empty", "sec-fetch-mode": "cors", "sec-fetch-site": "same-origin", "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.4 Safari/605.1.15", "x-emdash-request": "1", "x-forwarded-proto": "https", "x-real-ip": "redacted" }, "path": "/_emdash/api/content/pages/01KPGMSTHB085S85Z1ESJNPKZ0/publish" }, "rayId": "9ee4d9627fd4573a", "response": { "status": 500, } }, "truncated": false, "scriptName": "example-com-emdash", "outcome": "ok", "eventType": "fetch", "executionModel": "stateless", "scriptVersion": { "id": "2c05b7ee-8c16-46f4-84e7-97deb96e87d6" }, "requestId": "9ee4d9627fd4573a", "cpuTimeMs": 9, "wallTimeMs": 448, }, "$metadata": { "id": "01KPGMT6MJ8HMS9QKBRRNCNWB3", "requestId": "9ee4d9627fd4573a", "trigger": "POST /_emdash/api/content/pages/01KPGMSTHB085S85Z1ESJNPKZ0/publish", "service": "example-com-emdash", "level": "error", "error": "POST https://emdash.example.com/_emdash/api/content/pages/01KPGMSTHB085S85Z1ESJNPKZ0/publish", "message": "POST https://emdash.example.com/_emdash/api/content/pages/01KPGMSTHB085S85Z1ESJNPKZ0/publish", "account": "483669ea821828435edea4557f0620ea", "type": "cf-worker-event", "fingerprint": "1a50c4deb71e224689a699e1a96190e5", "origin": "fetch", "messageTemplate": "POST https://emdash.example.com/_emdash/api/content/pages/01KPGMSTHB085S85Z1ESJNPKZ0/publish", } }

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions