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

Cuprite crashes on network request? #149

Closed
uanwar88 opened this issue Mar 5, 2021 · 7 comments
Closed

Cuprite crashes on network request? #149

uanwar88 opened this issue Mar 5, 2021 · 7 comments

Comments

@uanwar88
Copy link

uanwar88 commented Mar 5, 2021

It looks like cuprite is crashing inexplicably while running tests. Specifically, it crashes when being directed to a new page when a Submit form button is clicked.

Here's the log:

     3.236692000000403 {"method":"Network.responseReceived","params":{"requestId":"A9757D685ACFB9228510E721D39DE27F","loaderId":"A9757D685ACFB9228510E721D39DE27F","timestamp":8425.870848,"type":"Document","response":{"url":"http://127.0.0.1:3001/orders/1","status":200,"statusText":"OK","headers":{"X-Frame-Options":"SAMEORIGIN","X-XSS-Protection":"1; mode=block","X-Content-Type-Options":"nosniff","X-Download-Options":"noopen","X-Permitted-Cross-Domain-Policies":"none","Referrer-Policy":"strict-origin-when-cross-origin","Link":"</packs-test/css/main_styles-e2ed6e73.css>; rel=preload; as=style; nopush,</packs-test/css/print-68ae4014.css>; rel=preload; as=style; nopush,</packs-test/js/application-bd45d4178a2e4fddacb8.js>; rel=preload; as=script; nopush","Content-Type":"text/html; charset=utf-8","ETag":"W/\"b84569bc78977c7f5dbb3ef8e29b24bf\"","Cache-Control":"max-age=0, private, must-revalidate","Set-Cookie":"_[removed]_operations_session=SuyCWDFSQyuSPXnK6k%2BGeTDjRTpjKY%2BaFqVHzPYP2pahzlTF2Qc4ZCpIBPPNlka22jZeAZdse8Ea55dahJZ99YZ3PuTrh%2FHbfebKW8yrLQvk5DfVcZ1khvQ8okQeMF6WSgVxGmWU9q3yLhOgUMma33Ux8XbkdjbGe2ggMPmdC%2B%2FGCRRDYrwh%2FwI6NBhk5fhQLgOBFdnwTmhKvgEs0YT0XXXehhBLLZhDEajjuRZr0uiVTgZci30xdLCPtlj4fst24oaP3TCWotdWXLd27jxpJIJU6Sjm8xtxmSgoEbmGHN4b--tQsTBdlHiK4BKDjT--D9o%2FIhv3POX9ggOGh8Ix7Q%3D%3D; path=/; HttpOnly; SameSite=Lax","X-Request-Id":"a83096d8-16e0-4d38-93e0-f6b84b0c28bf","X-Runtime":"0.901051","Transfer-Encoding":"chunked"},"headersText":"HTTP/1.1 200 OK\r\nX-Frame-Options: SAMEORIGIN\r\nX-XSS-Protection: 1; mode=block\r\nX-Content-Type-Options: nosniff\r\nX-Download-Options: noopen\r\nX-Permitted-Cross-Domain-Policies: none\r\nReferrer-Policy: strict-origin-when-cross-origin\r\nLink: </packs-test/css/main_styles-e2ed6e73.css>; rel=preload; as=style; nopush,</packs-test/css/print-68ae4014.css>; rel=preload; as=style; nopush,</packs-test/js/application-bd45d4178a2e4fddacb8.js>; rel=preload; as=script; nopush\r\nContent-Type: text/html; charset=utf-8\r\nETag: W/\"b84569bc78977c7f5dbb3ef8e29b24bf\"\r\nCache-Control: max-age=0, private, must-revalidate\r\nSet-Cookie: _[removed]_operations_session=SuyCWDFSQyuSPXnK6k%2BGeTDjRTpjKY%2BaFqVHzPYP2pahzlTF2Qc4ZCpIBPPNlka22jZeAZdse8Ea55dahJZ99YZ3PuTrh%2FHbfebKW8yrLQvk5DfVcZ1khvQ8okQeMF6WSgVxGmWU9q3yLhOgUMma33Ux8XbkdjbGe2ggMPmdC%2B%2FGCRRDYrwh%2FwI6NBhk5fhQLgOBFdnwTmhKvgEs0YT0XXXehhBLLZhDEajjuRZr0uiVTgZci30xdLCPtlj4fst24oaP3TCWotdWXLd27jxpJIJU6Sjm8xtxmSgoEbmGHN4b--tQsTBdlHiK4BKDjT--D9o%2FIhv3POX9ggOGh8Ix7Q%3D%3D; path=/; HttpOnly; SameSite=Lax\r\nX-Request-Id: a83096d8-16e0-4d38-93e0-f6b84b0c28bf\r\nX-Runtime: 0.901051\r\nTransfer-Encoding: chunked\r\n\r\n","mimeType":"text/html","requestHeaders":{"Host":"127.0.0.1:3001","Connection":"keep-alive","Cache-Control":"max-age=0","Upgrade-Insecure-Requests":"1","User-Agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/88.0.4324.182 Safari/537.36","Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9","Sec-Fetch-Site":"same-origin","Sec-Fetch-Mode":"navigate","Sec-Fetch-User":"?1","Sec-Fetch-Dest":"document","Referer":"http://127.0.0.1:3001/orders/1/art_job/edit","Accept-Encoding":"gzip, deflate, br","Cookie":"_[removed]_operations_session=Qs8J7yZYssw6vw8jZOGi%2F1cmwD8yMoQjv8V%2F9r48ZLUF%2FgwcoCiYndF%2FQgKZQ6%2BrkLuTZFViITxM5FIc3JZk95Ak5wME6wO2POTfYNNKbNICQyNsVBQDZCpYLesisV86YkuneWVtf17RjdHy8TTnk5Xg%2FrHuRMn%2BZxxG2PULtrbGYOJFshw01Ybm%2Ft0gopAFqpkEJy9v4L%2Bvoo%2F3nfedLabIfPftF9hcgyQ3PQufastkqQV%2BVBJUbeV1Yrn%2FqttvUVYBr%2B0RABKGd7VjNelu%2Ff6ScIlSvIqR%2FvOvxyTF%2BcYZ5oJ6u4BTLBvU1COlokloNOYdmryAURW2x%2Bnozo4QVPnJKnEaeLtbu8jhLecasQz345KTQSJ%2B9FPKxu32rErchYg4praZTU5bkAstjzdwkmDaetsj%2Bg8iogzPYmU%3D--BPo%2FwEjd8yqPAOuH--vlX2EaMGgNDQ%2FTisNgNwmw%3D%3D"},"requestHeadersText":"GET /orders/1 HTTP/1.1\r\nHost: 127.0.0.1:3001\r\nConnection: keep-alive\r\nCache-Control: max-age=0\r\nUpgrade-Insecure-Requests: 1\r\nUser-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/88.0.4324.182 Safari/537.36\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9\r\nSec-Fetch-Site: same-origin\r\nSec-Fetch-Mode: navigate\r\nSec-Fetch-User: ?1\r\nSec-Fetch-Dest: document\r\nReferer: http://127.0.0.1:3001/orders/1/art_job/edit\r\nAccept-Encoding: gzip, deflate, br\r\nCookie: _[removed]_operations_session=Qs8J7yZYssw6vw8jZOGi%2F1cmwD8yMoQjv8V%2F9r48ZLUF%2FgwcoCiYndF%2FQgKZQ6%2BrkLuTZFViITxM5FIc3JZk95Ak5wME6wO2POTfYNNKbNICQyNsVBQDZCpYLesisV86YkuneWVtf17RjdHy8TTnk5Xg%2FrHuRMn%2BZxxG2PULtrbGYOJFshw01Ybm%2Ft0gopAFqpkEJy9v4L%2Bvoo%2F3nfedLabIfPftF9hcgyQ3PQufastkqQV%2BVBJUbeV1Yrn%2FqttvUVYBr%2B0RABKGd7VjNelu%2Ff6ScIlSvIqR%2FvOvxyTF%2BcYZ5oJ6u4BTLBvU1COlokloNOYdmryAURW2x%2Bnozo4QVPnJKnEaeLtbu8jhLecasQz345KTQSJ%2B9FPKxu32rErchYg4praZTU5bkAstjzdwkmDaetsj%2Bg8iogzPYmU%3D--BPo%2FwEjd8yqPAOuH--vlX2EaMGgNDQ%2FTisNgNwmw%3D%3D\r\n","connectionReused":true,"connectionId":29,"remoteIPAddress":"127.0.0.1","remotePort":3001,"fromDiskCache":false,"fromServiceWorker":false,"fromPrefetchCache":false,"encodedDataLength":1138,"timing":{"requestTime":8424.965857,"proxyStart":-1,"proxyEnd":-1,"dnsStart":-1,"dnsEnd":-1,"connectStart":-1,"connectEnd":-1,"sslStart":-1,"sslEnd":-1,"workerStart":-1,"workerReady":-1,"workerFetchStart":-1,"workerRespondWithSettled":-1,"sendStart":0.135,"sendEnd":0.192,"pushStart":0,"pushEnd":0,"receiveHeadersEnd":902.791},"responseTime":1.614958854003281e+12,"protocol":"http/1.1","securityState":"secure"},"frameId":"D2EEA80F4D6BB15ED99FF600E9D2D69C"}}
     3.529651799999556 {"method":"Network.loadingFailed","params":{"requestId":"A9757D685ACFB9228510E721D39DE27F","timestamp":8426.163804,"type":"Document","errorText":"net::ERR_ABORTED","canceled":true}}
     3.542031400000269 {"method":"Inspector.targetCrashed","params":{}}
     3.542142700000113 {"method":"Target.targetCrashed","params":{"targetId":"D2EEA80F4D6BB15ED99FF600E9D2D69C","status":"crashed","errorCode":132}}

Is there any way to get more info on why it's crashing or cancelling the requesting?

@uanwar88
Copy link
Author

uanwar88 commented Mar 5, 2021

Maybe it's possible related to #140 ?

@uanwar88
Copy link
Author

uanwar88 commented Mar 5, 2021

{
   "params": {
      "requestId": "4871D34F407F90980BC83FC99E159CAA",
      "loaderId": "4871D34F407F90980BC83FC99E159CAA",
      "documentURL": "http://127.0.0.1:3001/orders/1",
      "request": {
         "url": "http://127.0.0.1:3001/orders/1",
         "method": "GET",
         "headers": {
            "Upgrade-Insecure-Requests": "1",
            "Origin": "http://127.0.0.1:3001",
            "Content-Type": "multipart/form-data; boundary=----WebKitFormBoundaryyn178cekapfVpT8U",
            "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/88.0.4324.182 Safari/537.36",
            "Referer": "http://127.0.0.1:3001/orders/1/art_jobs/1/edit"
         },
         "mixedContentType": "none",
         "initialPriority": "VeryHigh",
         "referrerPolicy": "strict-origin-when-cross-origin"
      },
      "timestamp": 16196.484,
      "wallTime": 1.61496666E9,
      "initiator": {
         "type": "other"
      },
      "redirectResponse": {
         "url": "http://127.0.0.1:3001/orders/1/art_jobs/1",
         "status": 302,
         "statusText": "Found",
         "headers": {
            "X-Frame-Options": "SAMEORIGIN",
            "X-XSS-Protection": "1; mode=block",
            "X-Content-Type-Options": "nosniff",
            "X-Download-Options": "noopen",
            "X-Permitted-Cross-Domain-Policies": "none",
            "Referrer-Policy": "strict-origin-when-cross-origin",
            "Location": "http://127.0.0.1:3001/orders/1",
            "Content-Type": "text/html; charset=utf-8",
            "Cache-Control": "no-cache",
            "Set-Cookie": "_[removed]_operations_session=C9nSQJSMgWmaTl7uX8EK9nJpSR1xU6Xp7XZ9QjmSIo2GV0S36I7qF0K%2FzVZsaedCI3%2BGxMb1UwcTaXA3rdZtwXLDmxTqCPEaGk702nqRmTferxL7H6%2F6pRnMYfM3IQ76AmNMZpkEZEAa9Y31lPMgyvsDohqbd%2FmTHHZNtPyhHSUMVJXdTK6dyc%2BiAU9yYoRJTP5v8zoYIyfcuzyGx8K6ZB%2FluwEd3inOSfNxTXAnIoYbsTHf%2BNALtIHBRuAf%2FFVtJ9p98NiodypKsyVQROvQsecgF5vcu5EGbhx9T8anIk3xA3C4mfW2Mk%2FTE%2F%2Fhya6VRTxqrpKLIaKhEHXVRHC%2F0xzkIGdQg0nwCAyK31R3G6z1FCcs8vqx2M7Ybo1n5CcOXoO%2B8ERPRSZkapb2KjnSB1Ee3SnmUk7ZLSutoUA%3D--p3dtnKHurDxlDNFX--T95JMMhYHT2v5IZgn0udlw%3D%3D; path=/; HttpOnly; SameSite=Lax",
            "X-Request-Id": "0f4faa98-7ec6-4a5e-9749-8daaaf860a99",
            "X-Runtime": "1.461777",
            "Transfer-Encoding": "chunked"
         },
         "headersText": "HTTP/1.1 302 FoundrnX-Frame-Options: SAMEORIGINrnX-XSS-Protection: 1; mode=blockrnX-Content-Type-Options: nosniffrnX-Download-Options: noopenrnX-Permitted-Cross-Domain-Policies: nonernReferrer-Policy: strict-origin-when-cross-originrnLocation: http://127.0.0.1:3001/orders/1rnContent-Type: text/html; charset=utf-8rnCache-Control: no-cachernSet-Cookie: _[removed]_operations_session=C9nSQJSMgWmaTl7uX8EK9nJpSR1xU6Xp7XZ9QjmSIo2GV0S36I7qF0K%2FzVZsaedCI3%2BGxMb1UwcTaXA3rdZtwXLDmxTqCPEaGk702nqRmTferxL7H6%2F6pRnMYfM3IQ76AmNMZpkEZEAa9Y31lPMgyvsDohqbd%2FmTHHZNtPyhHSUMVJXdTK6dyc%2BiAU9yYoRJTP5v8zoYIyfcuzyGx8K6ZB%2FluwEd3inOSfNxTXAnIoYbsTHf%2BNALtIHBRuAf%2FFVtJ9p98NiodypKsyVQROvQsecgF5vcu5EGbhx9T8anIk3xA3C4mfW2Mk%2FTE%2F%2Fhya6VRTxqrpKLIaKhEHXVRHC%2F0xzkIGdQg0nwCAyK31R3G6z1FCcs8vqx2M7Ybo1n5CcOXoO%2B8ERPRSZkapb2KjnSB1Ee3SnmUk7ZLSutoUA%3D--p3dtnKHurDxlDNFX--T95JMMhYHT2v5IZgn0udlw%3D%3D; path=/; HttpOnly; SameSite=LaxrnX-Request-Id: 0f4faa98-7ec6-4a5e-9749-8daaaf860a99rnX-Runtime: 1.461777rnTransfer-Encoding: chunkedrnrn",
         "mimeType": "text/html",
         "requestHeaders": {
            "Host": "127.0.0.1:3001",
            "Connection": "keep-alive",
            "Content-Length": "1606",
            "Cache-Control": "max-age=0",
            "Upgrade-Insecure-Requests": "1",
            "Origin": "http://127.0.0.1:3001",
            "Content-Type": "multipart/form-data; boundary=----WebKitFormBoundaryyn178cekapfVpT8U",
            "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/88.0.4324.182 Safari/537.36",
            "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
            "Sec-Fetch-Site": "same-origin",
            "Sec-Fetch-Mode": "navigate",
            "Sec-Fetch-User": "?1",
            "Sec-Fetch-Dest": "document",
            "Referer": "http://127.0.0.1:3001/orders/1/art_jobs/1/edit",
            "Accept-Encoding": "gzip, deflate, br",
            "Cookie": "_[removed]_operations_session=fZNeYCg70eTl8Vg4UOyJxpc4bGMMb%2BIoJnnFuAU%2F2Oc9v%2B4AMojfqs1%2BhwbuWZhXbwK0RY%2B7bPrRYxcPhIiTmtHeV25gOP5xjY7JXOosOHW%2FNDAKgJGTwVW6DSKJGe2VCIbB9v8GHPIjipFCLo2dJRhpYNk9cF5sTcpB2LtnY%2BfIXfc2xDi7KJS7GYiHepIu6vewT1pkAvKOpvwwAr0J3hMv560SYLZM34D4qYuarB09fB1ipGzJuxmASgvSKiw%2Fw%2FMyE%2F1WtN1Ju0tlbEo2b2vd9esw1LTNGEVV2hd0lbV%2F--8t1h6rFd844cuMp8--IPKK4DFIaBllSDGxeRfvAA%3D%3D"
         },
         "requestHeadersText": "POST /orders/1/art_jobs/1 HTTP/1.1rnHost: 127.0.0.1:3001rnConnection: keep-alivernContent-Length: 1606rnCache-Control: max-age=0rnUpgrade-Insecure-Requests: 1rnOrigin: http://127.0.0.1:3001rnContent-Type: multipart/form-data; boundary=----WebKitFormBoundaryyn178cekapfVpT8UrnUser-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/88.0.4324.182 Safari/537.36rnAccept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9rnSec-Fetch-Site: same-originrnSec-Fetch-Mode: navigaternSec-Fetch-User: ?1rnSec-Fetch-Dest: documentrnReferer: http://127.0.0.1:3001/orders/1/art_jobs/1/editrnAccept-Encoding: gzip, deflate, brrnCookie: _[removed]_operations_session=fZNeYCg70eTl8Vg4UOyJxpc4bGMMb%2BIoJnnFuAU%2F2Oc9v%2B4AMojfqs1%2BhwbuWZhXbwK0RY%2B7bPrRYxcPhIiTmtHeV25gOP5xjY7JXOosOHW%2FNDAKgJGTwVW6DSKJGe2VCIbB9v8GHPIjipFCLo2dJRhpYNk9cF5sTcpB2LtnY%2BfIXfc2xDi7KJS7GYiHepIu6vewT1pkAvKOpvwwAr0J3hMv560SYLZM34D4qYuarB09fB1ipGzJuxmASgvSKiw%2Fw%2FMyE%2F1WtN1Ju0tlbEo2b2vd9esw1LTNGEVV2hd0lbV%2F--8t1h6rFd844cuMp8--IPKK4DFIaBllSDGxeRfvAA%3D%3Drn",
         "connectionReused": true,
         "connectionId": 13,
         "remoteIPAddress": "127.0.0.1",
         "remotePort": 3001,
         "fromDiskCache": false,
         "fromServiceWorker": false,
         "fromPrefetchCache": false,
         "encodedDataLength": 1016,
         "timing": {
            "requestTime": 16195.019,
            "proxyStart": -1,
            "proxyEnd": -1,
            "dnsStart": -1,
            "dnsEnd": -1,
            "connectStart": -1,
            "connectEnd": -1,
            "sslStart": -1,
            "sslEnd": -1,
            "workerStart": -1,
            "workerReady": -1,
            "workerFetchStart": -1,
            "workerRespondWithSettled": -1,
            "sendStart": 0.164,
            "sendEnd": 0.234,
            "pushStart": 0,
            "pushEnd": 0,
            "receiveHeadersEnd": 1465.647
         },
         "responseTime": 1.61496669E12,
         "protocol": "http/1.1",
         "securityState": "secure"
      },
      "type": "Document",
      "frameId": "D46927EEB77B51F8F2281BAE19C34EB4",
      "hasUserGesture": true
   },
   "request": {
      "url": "http://127.0.0.1:3001/orders/1",
      "method": "GET",
      "headers": {
         "Upgrade-Insecure-Requests": "1",
         "Origin": "http://127.0.0.1:3001",
         "Content-Type": "multipart/form-data; boundary=----WebKitFormBoundaryyn178cekapfVpT8U",
         "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/88.0.4324.182 Safari/537.36",
         "Referer": "http://127.0.0.1:3001/orders/1/art_jobs/1/edit"
      },
      "mixedContentType": "none",
      "initialPriority": "VeryHigh",
      "referrerPolicy": "strict-origin-when-cross-origin"
   }
}

@uanwar88
Copy link
Author

uanwar88 commented Mar 5, 2021

The crash occurs specifically after the redirect_to call in the #update action. I think "errorText":"net::ERR_ABORTED","canceled":true is the relevant bit from the error. For some reason Capybara/Cuprite is cancelling the request before it completes.

I've already set default_max_wait_time in Capybara, as well as timeout and process_timeout in the Cuprite config.

Any other ideas?

@route
Copy link
Member

route commented Mar 5, 2021

I don’t think it’s cuprite or capybara, you better look for chrome cdp bugs. Did you try to turn off blacklisting?

@uanwar88
Copy link
Author

uanwar88 commented Mar 5, 2021

Yes, tried with blacklisting disabled. No luck there. It's weird because you can see that the redirect occurs and completes successfully with status code 200. But then immediately after the redirect, the page crashes. So weird.

@route
Copy link
Member

route commented Mar 6, 2021

Can you try modifying that page after redirect? To triage the issue at least, maybe comment out some js

@uanwar88
Copy link
Author

uanwar88 commented Mar 6, 2021

Hello. Thanks for your feedback. I was able to fix this issue.

Didn't mention I was running WSL. Fixed it by creating a symlink to the Windows chrome.exe binary instead of using the Ubuntu google-chrome binary.

rm /usr/bin/google-chrome
ln -s /mnt/c/Program\ Files/Google/Chrome/Application/chrome.exe /usr/bin/google-chrome

@uanwar88 uanwar88 closed this as completed Mar 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants