question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

processRequest never resolves

See original GitHub issue

Tried using apolloUploadExpress() but my requests were timing out.

Switched instead to directly calling processRequest() and now I see that that function never actually resolves. Thought maybe if I set all the max sizes to MAX_SAFE_INTEGER it would help, but apparently not.

try {
    req.body = await processRequest(req, {
        maxFieldSize: Number.MAX_SAFE_INTEGER,
        maxFileSize: Number.MAX_SAFE_INTEGER,
        maxFiles: Number.MAX_SAFE_INTEGER,
    });

    // Code never reached
    console.info("done");

    next();
} catch (err) {
    // Code never reached
    console.error(err);
}

I dumped some logs in the middleware.js code, for each of the busyboy events, and the only one that triggers is .on('finish'). Busyboy parser is initialised with following config:

{
    headers: {
        host: '192.168.100.237:4000',
        accept: '*/*',
        authorization: 'Bearer <some token>',
        api_key: '<some key>',
        'accept-encoding': 'gzip, deflate',
        'if-none-match': 'W/"3f8-yNZlH6jmDfpYMd2VxllbNZXCKkw"',
        'accept-language': 'en-us',
        'content-type': 'multipart/form-data; boundary=hSYbJ_sogzfSovLU3w7jIdppqkKLjjup1AsGtCsptszSxOLX38rD5wJ0tO1WcQ5UqeAlqu',
        'content-length': '21508',
        'user-agent': 'JIM/1 CFNetwork/897.15 Darwin/17.5.0',
        connection: 'keep-alive',
        os_version: 'ios'
    },
    limits: {
        fieldSize: 9007199254740991,
        fields: 2,
        fileSize: 9007199254740991,
        files: 9007199254740991
    }
}

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Slessicommented, May 8, 2018

Nope, that was my initial attempt.

0reactions
jaydensericcommented, May 13, 2018

Thanks for the update, glad you got it working 😅

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTTPHandler Processrequest() is not getting invoked from .cs ...
I am using HTTPHandler to upload files. And i'm using below code to call .ashx file and i set a breakpoint in handler...
Read more >
Unable to process request due to broken reference | Confluence
However, upgrading won't resolve drafts with broken references, so this can be resolved by creating a new page with the same content. Resolution....
Read more >
Resolving view state message authentication code (MAC) errors
Describes view state and how to resolve message authentication code (MAC) errors. ... ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean ...
Read more >
Fix IIS website hangs and slow loads - LeanSentry
Learn more about resolving hangs quickly with LeanSentry's automatic hang diagnostics. STEP 2: Diagnose the hang. Once you confirm the hang, the next...
Read more >
"Failed to process request" UI error when attempting to browse ...
The issue should be intermittent for a short time period and will self-resolve itself. The root cause is the same as reported at...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found