Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to process browser request when downloading a PDF #62

Open
Dzeri96 opened this issue Jan 7, 2022 · 0 comments
Open

Unable to process browser request when downloading a PDF #62

Dzeri96 opened this issue Jan 7, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@Dzeri96
Copy link

Dzeri96 commented Jan 7, 2022

Describe the bug
I'm trying to download a PDF from https://www.mdpi.com/1996-1944/12/18/2995/pdf, but CloudProxy throws an error.

To Reproduce
Make the following request:

{
    'cmd': 'request.get',
    'url': 'https://www.mdpi.com/1996-1944/12/18/2995/pdf',
    'userAgent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0',
    'download': True
} # Python syntax

Expected behavior
A PDF is downloaded as a byte stream

Desktop (please complete the following information):

  • OS: Linux
  • Browser Any
  • Version 2.1.1

Additional context
This is the stack trace:

cloudproxy_1  | 2022-01-07T23:13:16.548Z INFO REQ-0 CloudProxy v2.1.1 listening on http://0.0.0.0:8191
cloudproxy_1  | 2022-01-07T23:13:24.087Z INFO REQ-1 Incoming request: POST /v1
cloudproxy_1  | 2022-01-07T23:13:24.089Z INFO REQ-1 Params: {"cmd":"request.get","url":"https://www.mdpi.com/1996-1944/12/18/2995/pdf","download":true}
cloudproxy_1  | 2022-01-07T23:13:24.090Z DEBUG REQ-1 Launching headless browser...
cloudproxy_1  | 2022-01-07T23:13:24.390Z DEBUG REQ-1 Adding custom headers: {}
cloudproxy_1  | 2022-01-07T23:13:24.390Z DEBUG REQ-1 { headers: [Function (anonymous)] }
cloudproxy_1  | 2022-01-07T23:13:24.397Z DEBUG REQ-1 Navigating to... https://www.mdpi.com/1996-1944/12/18/2995/pdf
cloudproxy_1  | 2022-01-07T23:13:24.407Z DEBUG REQ-1 {
cloudproxy_1  |   headers: {
cloudproxy_1  |     'upgrade-insecure-requests': '1',
cloudproxy_1  |     'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.113 Safari/537.36',
cloudproxy_1  |     'accept-language': 'en-US,en;q=0.9'
cloudproxy_1  |   }
cloudproxy_1  | }
cloudproxy_1  | 2022-01-07T23:13:25.506Z ERROR REQ-1 Error: net::ERR_ABORTED at https://www.mdpi.com/1996-1944/12/18/2995/pdf
cloudproxy_1  |     at navigate (/home/node/cloudproxy/node_modules/puppeteer/lib/FrameManager.js:95:23)
cloudproxy_1  |     at processTicksAndRejections (node:internal/process/task_queues:93:5)
cloudproxy_1  |     at async FrameManager.navigateFrame (/home/node/cloudproxy/node_modules/puppeteer/lib/FrameManager.js:70:21)
cloudproxy_1  |     at async Frame.goto (/home/node/cloudproxy/node_modules/puppeteer/lib/FrameManager.js:295:16)
cloudproxy_1  |     at async Page.goto (/home/node/cloudproxy/node_modules/puppeteer/lib/Page.js:485:16)
cloudproxy_1  |     at async resolveChallenge (/home/node/cloudproxy/dist/routes.js:71:20)
cloudproxy_1  |     at async browserRequest (/home/node/cloudproxy/dist/routes.js:285:22)
cloudproxy_1  |     at async request.get (/home/node/cloudproxy/dist/routes.js:325:9)
cloudproxy_1  |     at async Object.Router [as default] (/home/node/cloudproxy/dist/routes.js:346:16)
cloudproxy_1  |   -- ASYNC --
cloudproxy_1  |     at Frame.<anonymous> (/home/node/cloudproxy/node_modules/puppeteer/lib/helper.js:94:19)
cloudproxy_1  |     at Page.goto (/home/node/cloudproxy/node_modules/puppeteer/lib/Page.js:485:53)
cloudproxy_1  |     at Page.<anonymous> (/home/node/cloudproxy/node_modules/puppeteer/lib/helper.js:95:27)
cloudproxy_1  |     at resolveChallenge (/home/node/cloudproxy/dist/routes.js:71:31)
cloudproxy_1  |     at browserRequest (/home/node/cloudproxy/dist/routes.js:285:28)
cloudproxy_1  |     at processTicksAndRejections (node:internal/process/task_queues:93:5)
cloudproxy_1  |     at async request.get (/home/node/cloudproxy/dist/routes.js:325:9)
cloudproxy_1  |     at async Object.Router [as default] (/home/node/cloudproxy/dist/routes.js:346:16)
cloudproxy_1  | 2022-01-07T23:13:25.507Z ERROR REQ-1 Unable to process browser request
@Dzeri96 Dzeri96 added the bug Something isn't working label Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant