[GH-ISSUE #150] Failed to create pastebins from terminal #89

Closed
opened 2026-02-27 10:15:40 +03:00 by kerem · 0 comments
Owner

Originally created by @mokurin000 on GitHub (Apr 5, 2025).
Original GitHub issue: https://github.com/matze/wastebin/issues/150

command:

echo hello world  |  jq -Rns '{text: inputs}' | curl curl -s -H 'Content-Type: application/json' --data-binary @- http://127.0.0.1:8088/api

response:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="generator" content="wastebin 3.0.0">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>wastebin</title>
    
        <link rel="stylesheet" href="/dark.8f7ea541e554e376.css" media="(prefers-color-scheme: dark)">
        <link rel="stylesheet" href="/light.bf6900ad4a931f0f.css" media="(prefers-color-scheme: light)">
    
    <link rel="stylesheet" href="/style.bde9f4f8deb0a80c.css">
    <link rel="icon" href="/favicon.ico" type="image/png">
    <script defer src="/base.33ffb81d78ba848e.js"></script>
    
  </head>
  <body>
    <div id="main-container">
      <header>
        <div class="nav-group">
          <div class="nav-item">
            <a href="/" class="nav-button" title="home" aria-label="home">
              <svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
                <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m4 12 8-8 8 8M6 10.5V19a1 1 0 0 0 1 1h3v-3a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v3h3a1 1 0 0 0 1-1v-8.5"/>
              </svg>
            </a>
          </div>
          
        </div>
        <div class="nav-group" id="nav-group-actions">
          
          
          <div class="nav-item" id="dark-switch">
            <a href="/theme?pref=dark" class="nav-button" title="switch to dark" aria-label="switch to dark">
              <svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
                <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 21a9 9 0 0 1-.5-17.986V3c-.354.966-.5 1.911-.5 3a9 9 0 0 0 9 9c.239 0 .254.018.488 0A9.004 9.004 0 0 1 12 21Z"/>
              </svg>
            </a>
          </div>
          <div class="nav-item" id="light-switch">
            <a href="/theme?pref=light" class="nav-button" title="switch to light" aria-label="switch to light">
              <svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
                <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 5V3m0 18v-2M7.05 7.05 5.636 5.636m12.728 12.728L16.95 16.95M5 12H3m18 0h-2M7.05 16.95l-1.414 1.414M18.364 5.636 16.95 7.05M16 12a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"/>
              </svg>
            </a>
          </div>
        </div>
      </header>
      <main>
        
  <div class="flex-center">
    <p>😢 wrong size</p>
    <p><a class="text-link" href="/">go back</a></p>
  </div>

      </main>
    </div>
    <div id="toast" class="toast hidden">
      Copied content
    </div>
  </body>
</html>

Server log:

> RUST_LOG=trace wastebin
2025-04-05T10:03:20.418915Z DEBUG wastebin::db: opening Memory
2025-04-05T10:03:20.419065Z DEBUG rusqlite_migration: some migrations defined (version: 7), try to migrate    
2025-04-05T10:03:20.419127Z DEBUG rusqlite_migration: some migrations to run, target: 7, current: 0    
2025-04-05T10:03:20.419132Z TRACE rusqlite_migration: start migration transaction    
2025-04-05T10:03:20.419145Z DEBUG rusqlite_migration: Running: CREATE TABLE entries(
    id INTEGER PRIMARY KEY,
    text TEXT NOT NULL,
    burn_after_reading INTEGER,
    expires TEXT
);
    
2025-04-05T10:03:20.419360Z DEBUG rusqlite_migration: Running: ALTER TABLE entries ADD COLUMN created_at TEXT;

UPDATE entries SET created_at=datetime('1970-01-01 00:00:00');
    
2025-04-05T10:03:20.419545Z DEBUG rusqlite_migration: Running: ALTER TABLE entries DROP COLUMN created_at;
ALTER TABLE entries ADD COLUMN uid INTEGER;

CREATE TABLE IF NOT EXISTS uids (
    id INTEGER PRIMARY KEY CHECK (id = 0),
    n INTEGER
);

INSERT OR IGNORE INTO uids (id, n) VALUES (0, 0);
    
2025-04-05T10:03:20.420068Z DEBUG rusqlite_migration: Running: ALTER TABLE entries ADD COLUMN data BLOB;
    
2025-04-05T10:03:20.420206Z DEBUG wastebin::db: compressing 0 rows
2025-04-05T10:03:20.420218Z DEBUG rusqlite_migration: Running: ALTER TABLE entries DROP COLUMN text;
    
2025-04-05T10:03:20.420520Z DEBUG rusqlite_migration: Running: ALTER TABLE entries ADD COLUMN nonce BLOB;
    
2025-04-05T10:03:20.420640Z DEBUG rusqlite_migration: Running: ALTER TABLE entries ADD COLUMN title TEXT;
    
2025-04-05T10:03:20.420758Z TRACE rusqlite_migration: set user version to: 7    
2025-04-05T10:03:20.420780Z TRACE rusqlite_migration: committed migration transaction    
2025-04-05T10:03:20.420784Z  INFO rusqlite_migration: Database migrated to version 7    
2025-04-05T10:03:20.420787Z DEBUG wastebin: serving on 0.0.0.0:8088
2025-04-05T10:03:20.420790Z DEBUG wastebin: caching 128 paste highlights
2025-04-05T10:03:20.420793Z DEBUG wastebin: restricting maximum body size to 1048576 bytes
2025-04-05T10:03:20.420795Z DEBUG wastebin: enforcing a http timeout of 5s
2025-04-05T10:03:24.916959Z TRACE axum::serve: connection 127.0.0.1:38556 accepted
2025-04-05T10:03:24.917165Z DEBUG request{method=POST uri=/api version=HTTP/1.1}: tower_http::trace::on_request: started processing request
2025-04-05T10:03:24.917221Z DEBUG request{method=POST uri=/api version=HTTP/1.1}: tower_http::trace::on_response: finished processing request latency=0 ms status=400
2025-04-05T10:03:24.917533Z TRACE axum::serve: connection 127.0.0.1:38556 closed
Originally created by @mokurin000 on GitHub (Apr 5, 2025). Original GitHub issue: https://github.com/matze/wastebin/issues/150 command: ```bash echo hello world | jq -Rns '{text: inputs}' | curl curl -s -H 'Content-Type: application/json' --data-binary @- http://127.0.0.1:8088/api ``` response: ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="generator" content="wastebin 3.0.0"> <meta name="viewport" content="width=device-width,initial-scale=1"> <title>wastebin</title> <link rel="stylesheet" href="/dark.8f7ea541e554e376.css" media="(prefers-color-scheme: dark)"> <link rel="stylesheet" href="/light.bf6900ad4a931f0f.css" media="(prefers-color-scheme: light)"> <link rel="stylesheet" href="/style.bde9f4f8deb0a80c.css"> <link rel="icon" href="/favicon.ico" type="image/png"> <script defer src="/base.33ffb81d78ba848e.js"></script> </head> <body> <div id="main-container"> <header> <div class="nav-group"> <div class="nav-item"> <a href="/" class="nav-button" title="home" aria-label="home"> <svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"> <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m4 12 8-8 8 8M6 10.5V19a1 1 0 0 0 1 1h3v-3a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v3h3a1 1 0 0 0 1-1v-8.5"/> </svg> </a> </div> </div> <div class="nav-group" id="nav-group-actions"> <div class="nav-item" id="dark-switch"> <a href="/theme?pref=dark" class="nav-button" title="switch to dark" aria-label="switch to dark"> <svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"> <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 21a9 9 0 0 1-.5-17.986V3c-.354.966-.5 1.911-.5 3a9 9 0 0 0 9 9c.239 0 .254.018.488 0A9.004 9.004 0 0 1 12 21Z"/> </svg> </a> </div> <div class="nav-item" id="light-switch"> <a href="/theme?pref=light" class="nav-button" title="switch to light" aria-label="switch to light"> <svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"> <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 5V3m0 18v-2M7.05 7.05 5.636 5.636m12.728 12.728L16.95 16.95M5 12H3m18 0h-2M7.05 16.95l-1.414 1.414M18.364 5.636 16.95 7.05M16 12a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"/> </svg> </a> </div> </div> </header> <main> <div class="flex-center"> <p>😢 wrong size</p> <p><a class="text-link" href="/">go back</a></p> </div> </main> </div> <div id="toast" class="toast hidden"> Copied content </div> </body> </html> ``` Server log: ```text > RUST_LOG=trace wastebin 2025-04-05T10:03:20.418915Z DEBUG wastebin::db: opening Memory 2025-04-05T10:03:20.419065Z DEBUG rusqlite_migration: some migrations defined (version: 7), try to migrate 2025-04-05T10:03:20.419127Z DEBUG rusqlite_migration: some migrations to run, target: 7, current: 0 2025-04-05T10:03:20.419132Z TRACE rusqlite_migration: start migration transaction 2025-04-05T10:03:20.419145Z DEBUG rusqlite_migration: Running: CREATE TABLE entries( id INTEGER PRIMARY KEY, text TEXT NOT NULL, burn_after_reading INTEGER, expires TEXT ); 2025-04-05T10:03:20.419360Z DEBUG rusqlite_migration: Running: ALTER TABLE entries ADD COLUMN created_at TEXT; UPDATE entries SET created_at=datetime('1970-01-01 00:00:00'); 2025-04-05T10:03:20.419545Z DEBUG rusqlite_migration: Running: ALTER TABLE entries DROP COLUMN created_at; ALTER TABLE entries ADD COLUMN uid INTEGER; CREATE TABLE IF NOT EXISTS uids ( id INTEGER PRIMARY KEY CHECK (id = 0), n INTEGER ); INSERT OR IGNORE INTO uids (id, n) VALUES (0, 0); 2025-04-05T10:03:20.420068Z DEBUG rusqlite_migration: Running: ALTER TABLE entries ADD COLUMN data BLOB; 2025-04-05T10:03:20.420206Z DEBUG wastebin::db: compressing 0 rows 2025-04-05T10:03:20.420218Z DEBUG rusqlite_migration: Running: ALTER TABLE entries DROP COLUMN text; 2025-04-05T10:03:20.420520Z DEBUG rusqlite_migration: Running: ALTER TABLE entries ADD COLUMN nonce BLOB; 2025-04-05T10:03:20.420640Z DEBUG rusqlite_migration: Running: ALTER TABLE entries ADD COLUMN title TEXT; 2025-04-05T10:03:20.420758Z TRACE rusqlite_migration: set user version to: 7 2025-04-05T10:03:20.420780Z TRACE rusqlite_migration: committed migration transaction 2025-04-05T10:03:20.420784Z INFO rusqlite_migration: Database migrated to version 7 2025-04-05T10:03:20.420787Z DEBUG wastebin: serving on 0.0.0.0:8088 2025-04-05T10:03:20.420790Z DEBUG wastebin: caching 128 paste highlights 2025-04-05T10:03:20.420793Z DEBUG wastebin: restricting maximum body size to 1048576 bytes 2025-04-05T10:03:20.420795Z DEBUG wastebin: enforcing a http timeout of 5s 2025-04-05T10:03:24.916959Z TRACE axum::serve: connection 127.0.0.1:38556 accepted 2025-04-05T10:03:24.917165Z DEBUG request{method=POST uri=/api version=HTTP/1.1}: tower_http::trace::on_request: started processing request 2025-04-05T10:03:24.917221Z DEBUG request{method=POST uri=/api version=HTTP/1.1}: tower_http::trace::on_response: finished processing request latency=0 ms status=400 2025-04-05T10:03:24.917533Z TRACE axum::serve: connection 127.0.0.1:38556 closed ```
kerem closed this issue 2026-02-27 10:15:40 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/wastebin-matze#89
No description provided.