One of my functions returns an ‘Unexpected end of file’ error.
Sometimes another function fails.
The code runs without errors when I run it locally but returns errors on pipedream.
I enabled the workflow to be seen by support.
See error:
Error - update(CONTACTS): at Function.AxiosError.from (file:///tmp/__pdg__/dist/code/fe04ba51797834b46b59382d58ec636cc75e90814f8900e2035a5ce2c414c84a/node_modules/.pnpm/axios@1.2.1/node_modules/axios/lib/core/AxiosError.js:89:14)
at BrotliDecompress.handleStreamError (file:///tmp/__pdg__/dist/code/fe04ba51797834b46b59382d58ec636cc75e90814f8900e2035a5ce2c414c84a/node_modules/.pnpm/axios@1.2.1/node_modules/axios/lib/adapters/http.js:489:29)
at BrotliDecompress.emit (events.js:412:35)
at null.emitErrorNT (internal/streams/destroy.js:106:8)
at null.emitErrorCloseNT (internal/streams/destroy.js:74:3)
at process.processTicksAndRejections (internal/process/task_queues.js:82:21)
{
code: 'Z_BUF_ERROR',
errno: -5,
message: 'unexpected end of file',
config: {
transitional: {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
},
Could you please share the content of your Node.js code step that’s producing this error?
Sounds like it could be a case of a missing bracket or other punctuation mark the interpreter is expecting, but we cannot help without the code itself.
I am having the same issue with axios. Does anyone know what might be the problem?
at Function.AxiosError.from (file:///tmp/pdg/dist/code/b6bd5df03ae7ffc615bf9198390ec034f118e77cd79b2a56056c86964649730f/node_modules/.pnpm/axios@1.2.1/node_modules/axios/lib/core/AxiosError.js:89:14)
at BrotliDecompress.handleStreamError (file:///tmp/pdg/dist/code/b6bd5df03ae7ffc615bf9198390ec034f118e77cd79b2a56056c86964649730f/node_modules/.pnpm/axios@1.2.1/node_modules/axios/lib/adapters/http.js:489:29)
at BrotliDecompress.emit (events.js:412:35)
at null.emitErrorNT (internal/streams/destroy.js:106:8)
at null.emitErrorCloseNT (internal/streams/destroy.js:74:3)
at process.processTicksAndRejections (internal/process/task_queues.js:82:21)
{
code: ‘Z_BUF_ERROR’,
errno: -5,
message: ‘unexpected end of file’,
config: {
transitional: {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
},
…
We can provide 1:1 private support for Teams customers over Slack. But for general debugging of workflows especially code steps, we ask that you provide the code content in our public forums so staff and community alike can provide assistance.
If you need to remove hard coded API keys, we encourage the use of Environment Variables to protect sensitive information.
// To use any npm package on Pipedream, just import it
import axios from "axios"
export default defineComponent({
async run({ steps, $ }) {
const url = process.env.DB_URL
const res = await axios.get(url);
return res
},
})
and this is the error I get.
Error
unexpected end of file
DETAILS
at Function.AxiosError.from (file:///tmp/__pdg__/dist/code/f72647f8405c14d4683694abe19862a4d625be4f7b57366cf5f583d6191bd482/node_modules/.pnpm/axios@1.2.1/node_modules/axios/lib/core/AxiosError.js:89:14)
at BrotliDecompress.handleStreamError (file:///tmp/__pdg__/dist/code/f72647f8405c14d4683694abe19862a4d625be4f7b57366cf5f583d6191bd482/node_modules/.pnpm/axios@1.2.1/node_modules/axios/lib/adapters/http.js:489:29)
at BrotliDecompress.emit (events.js:412:35)
at null.emitErrorNT (internal/streams/destroy.js:106:8)
at null.emitErrorCloseNT (internal/streams/destroy.js:74:3)
at process.processTicksAndRejections (internal/process/task_queues.js:82:21)