{"record":{"id":"68ee7b8dcf2946c6","repo":"xtekky/gpt4free","slug":"no-audio-chunks","errorCode":null,"errorMessage":"No audio chunks","messagePattern":"No audio chunks","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"g4f/Provider/audio/ElevenLabs.py","lineNumber":191,"sourceCode":"    let buf = '', chunks = [];\n    while (true) {{\n        const {{done, value}} = await reader.read();\n        if (done) break;\n        buf += dec.decode(value, {{stream: true}});\n        const lines = buf.split('\\\\n');\n        buf = lines.pop() || '';\n        for (const ln of lines) {{\n            const t = ln.trim();\n            if (!t) continue;\n            // Accept both plain NDJSON and SSE \"data:\" prefixed lines\n            const d = t.startsWith('data:') ? t.slice(5).trim() : t;\n            try {{\n                const p = JSON.parse(d);\n                if (p.audio_base64) chunks.push(p.audio_base64);\n            }} catch (e) {{}}\n        }}\n    }}\n    if (!chunks.length) throw new Error('No audio chunks');\n    return chunks;\n}})()\"\"\"\n","sourceCodeStart":173,"sourceCodeEnd":194,"githubUrl":"https://github.com/xtekky/gpt4free/blob/973504e1770928ed5fb82f43da528f441ad9ddc3/g4f/Provider/audio/ElevenLabs.py#L173-L194","documentation":"extractEmbedded walks the go:embed FS (embed/<os>/...) looking for a runtime zip for the current platform and found zero entries (or the walk itself failed). The binary was built without embedding a python runtime archive for this os/arch, typically because fetch-python.sh was never run before 'go build'.","triggerScenarios":"Running a binary built on a machine where embed/<os>/ contained no <os>-<arch>-embed-<ver>.zip (fetch-python.sh skipped or failed); cross-compiling to an os/arch whose archive was never fetched; the embed directive pattern not matching the fetched archive name.","commonSituations":"CI builds that skip the fetch step to save time; developers building from a fresh clone without reading the bootstrap docs; release binaries accidentally built before fetch-python.sh completed; platform matrix gaps (e.g. android or arm64 archive missing).","solutions":["Run fetch-python.sh for the target platform and rebuild the binary so embed/<os>/<archive>.zip is present at compile time","Verify the embedded FS layout: embed/<os>/<os>-<arch>-embed-<ver>.zip must exist and match the go:embed pattern used by embedRuntimeArchive","If the fetch script failed, fix its failure (network, checksum) first — this error is downstream of a missing file, not an independent bug","For cross-compilation, fetch the archive for GOOS/GOARCH you target, not the build host"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// at build/packaging time, assert the embed is populated:\n// go:embed embed/*/*.zip\n// then in CI: test -n \"$(ls embed/*/*.zip)\" || { echo 'run fetch-python.sh'; exit 1; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Make fetch-python.sh a mandatory CI step before go build and fail the pipeline when embed/<os>/ is empty","Add a unit test that walks the embed FS and asserts at least one archive exists per supported GOOS/GOARCH","Version-pin the fetched runtime so layout changes surface at build time, not runtime"],"tags":["build","embed","runtime","bootstrap"],"backgroundTag":null,"analyzedSha":"973504e1770928ed5fb82f43da528f441ad9ddc3","analyzedAt":"2026-08-14T23:45:32.408Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}