rubycdp / ferrum

Headless Chrome Ruby API
https://ferrum.rubycdp.com
MIT License
1.68k stars 119 forks source link

Hang/Timeout in dialog #430

Open vdbijl opened 6 months ago

vdbijl commented 6 months ago

I am not entirely sure if the problem/solution lies with Ferrum. My apologies if I should post it somewhere else. Maybe you can then point me in the right direction.

Context I am trying to test functionality in our Rails app that triggers a dialog. In out stack we use Capybara with Cuprite (and hence Ferrum). Most dialogs are handled fine, but we have one place that runs into a Timeout. Below I show the Ferrum debug logging for the case that works fine and the troubled one.

My hypothesis from the logs is that

Any ideas what's going on?

Happy case The happy case results in the following log

▶ 1.346698246023152 {"method":"Input.dispatchMouseEvent","params":{"x":712.5,"y":180.60000610351562,"type":"mouseReleased","button":"left","clickCount":1,"modifiers":0},"id":1046}                                                                                                                                 [448/1158]
    ◀ 1.350762588030193 {"method":"Page.javascriptDialogOpening","params":{"url":"http://localhost:9887/test_runs/4bba3c79-a9cd-40cc-a906-5e38e70d42c3/history","message":"Delete test run 2023-12-31 13:51:39","type":"confirm","hasBrowserHandler":true,"defaultPrompt":""}}

▶ 1.3513186380150728 {"method":"Page.handleJavaScriptDialog","params":{"accept":true,"promptText":""},"id":1047}                                              
    ◀ 1.3569170699920505 {"method":"Page.javascriptDialogClosed","params":{"result":true,"userInput":""}}                                                    
    ◀ 1.3571577630355023 {"id":1047,"result":{}}                                                                                                              
    ◀ 1.3631934060249478 {"id":1046,"result":{}}

Unhappy case The happy case results in the following log. You see the timestamp in the log jumping to 11.40s, when the timeout of 10s passes.

▶ 1.3913749270141125 {"method":"Input.dispatchMouseEvent","params":{"x":83.5999984741211,"y":72,"type":"mouseReleased","button":"left","clickCount":1,"modifiers":0},"id":1047}
    ◀ 1.397088714002166 {"method":"Page.frameStartedLoading","params":{"frameId":"069E2A9BCF419B6F13D630B4C16CC63C"}}
    ◀ 1.3990803529741243 {"method":"Target.targetInfoChanged","params":{"targetInfo":{"targetId":"069E2A9BCF419B6F13D630B4C16CC63C","type":"page","title":"Model - Test set - Project 1 - Axini Modeling Platform","url":"http://localhost:9887/models/8bac3cc7-e669-499b-9d75-5c3bde70126b","attached":true,"canAccessOpener":false,"browserContextId":"DB22313B46B113CCDDDC8754ACA2197B"}}}
    ◀ 1.3994059760007076 {"method":"Page.navigatedWithinDocument","params":{"frameId":"069E2A9BCF419B6F13D630B4C16CC63C","url":"http://localhost:9887/models/8bac3cc7-e669-499b-9d75-5c3bde70126b"}}
    ◀ 1.3994675800204277 {"method":"Page.frameStoppedLoading","params":{"frameId":"069E2A9BCF419B6F13D630B4C16CC63C"}}
    ◀ 1.399814321019221 {"method":"DOM.attributeModified","params":{"nodeId":5,"name":"class","value":""}}
    ◀ 1.4002596049685962 {"method":"Page.javascriptDialogOpening","params":{"url":"http://localhost:9887/models/8bac3cc7-e669-499b-9d75-5c3bde70126b","message":"The model has unsaved changes that will be lost. Close anyway?","type":"confirm","hasBrowserHandler":true,"defaultPrompt":""}}

▶ 1.4003709519747645 {"method":"DOM.getDocument","params":{"depth":0},"id":1048}

▶ 11.404536264017224 {"method":"Page.handleJavaScriptDialog","params":{"accept":true,"promptText":""},"id":1049}
    ◀ 11.404882233997341 {"method":"Page.javascriptDialogClosed","params":{"result":true,"userInput":""}}

And this results in the rspec failing:

Failures:

  1) Editing model parts editing model parts a signed in modeler can accept the alert when navigating away without saving, and then navigates away
     Failure/Error: find(tab).click

     Ferrum::TimeoutError:
       Timed out waiting for response. It's possible that this happened because something took a very long time (for example a page load was slow). If so, setting the :timeout option to a higher value might help.

     [Screenshot Image]: /home/vdbijl/git/products/tm-gui/dummy-application/tmp/screenshots/failures_r_spec_example_groups_editing_model_parts_editing_model_parts_a_signed_in_modeler_can_accept_the_alert_when_navigating_away_without_saving__and_then_navigates_away_911.png

     # /home/vdbijl/.rvm/gems/ruby-3.1.3@axini/gems/ferrum-0.14/lib/ferrum/browser/client.rb:46:in `command'
     # /home/vdbijl/.rvm/gems/ruby-3.1.3@axini/gems/ferrum-0.14/lib/ferrum/page.rb:269:in `command'
     # /home/vdbijl/.rvm/gems/ruby-3.1.3@axini/gems/ferrum-0.14/lib/ferrum/mouse.rb:145:in `mouse_event'
     # /home/vdbijl/.rvm/gems/ruby-3.1.3@axini/gems/ferrum-0.14/lib/ferrum/mouse.rb:104:in `block in up'
     # /home/vdbijl/.rvm/gems/ruby-3.1.3@axini/gems/ferrum-0.14/lib/ferrum/mouse.rb:104:in `up'
     # /home/vdbijl/.rvm/gems/ruby-3.1.3@axini/gems/ferrum-0.14/lib/ferrum/mouse.rb:63:in `click'
     # /home/vdbijl/.rvm/gems/ruby-3.1.3@axini/gems/ferrum-0.14/lib/ferrum/node.rb:81:in `click'
     # /home/vdbijl/.rvm/gems/ruby-3.1.3@axini/gems/cuprite-0.15/lib/capybara/cuprite/node.rb:236:in `prepare_and_click'
     # /home/vdbijl/.rvm/gems/ruby-3.1.3@axini/gems/cuprite-0.15/lib/capybara/cuprite/node.rb:147:in `click'
     # /home/vdbijl/.rvm/gems/ruby-3.1.3@axini/gems/capybara-3.39.2/lib/capybara/node/element.rb:172:in `block in click'
     # /home/vdbijl/.rvm/gems/ruby-3.1.3@axini/gems/capybara-3.39.2/lib/capybara/node/element.rb:608:in `block in perform_click_action'
     # /home/vdbijl/.rvm/gems/ruby-3.1.3@axini/gems/capybara-3.39.2/lib/capybara/node/base.rb:84:in `synchronize'
     # /home/vdbijl/.rvm/gems/ruby-3.1.3@axini/gems/capybara-3.39.2/lib/capybara/node/element.rb:608:in `perform_click_action'
     # /home/vdbijl/.rvm/gems/ruby-3.1.3@axini/gems/capybara-3.39.2/lib/capybara/node/element.rb:171:in `click'
     # ./spec/system/modeling/model_part_editing_spec.rb:215:in `block (5 levels) in <top (required)>'
     # /home/vdbijl/.rvm/gems/ruby-3.1.3@axini/gems/cuprite-0.15/lib/capybara/cuprite/driver.rb:346:in `accept_modal'
     # /home/vdbijl/.rvm/gems/ruby-3.1.3@axini/gems/capybara-3.39.2/lib/capybara/session.rb:849:in `accept_modal'
     # /home/vdbijl/.rvm/gems/ruby-3.1.3@axini/gems/capybara-3.39.2/lib/capybara/session.rb:669:in `accept_confirm'
     # /home/vdbijl/.rvm/gems/ruby-3.1.3@axini/gems/capybara-3.39.2/lib/capybara/dsl.rb:52:in `call'
     # /home/vdbijl/.rvm/gems/ruby-3.1.3@axini/gems/capybara-3.39.2/lib/capybara/dsl.rb:52:in `accept_confirm'
     # ./spec/system/modeling/model_part_editing_spec.rb:212:in `block (4 levels) in <top (required)>'
     # /home/vdbijl/.rvm/gems/ruby-3.1.3@axini/gems/webmock-3.19.1/lib/webmock/rspec.rb:39:in `block (2 levels) in <top (required)>'
     # /home/vdbijl/.rvm/gems/ruby-3.1.3@axini/gems/rspec-retry-0.6.2/lib/rspec/retry.rb:124:in `block in run'
     # /home/vdbijl/.rvm/gems/ruby-3.1.3@axini/gems/rspec-retry-0.6.2/lib/rspec/retry.rb:110:in `loop'
     # /home/vdbijl/.rvm/gems/ruby-3.1.3@axini/gems/rspec-retry-0.6.2/lib/rspec/retry.rb:110:in `run'
     # /home/vdbijl/.rvm/gems/ruby-3.1.3@axini/gems/rspec-retry-0.6.2/lib/rspec_ext/rspec_ext.rb:12:in `run_with_retry'
     # /home/vdbijl/.rvm/gems/ruby-3.1.3@axini/gems/rspec-retry-0.6.2/lib/rspec/retry.rb:37:in `block (2 levels) in setup'
route commented 6 months ago

Before clicking try to set sleep 3 for example, does it change anything?

vdbijl commented 6 months ago

It looks rather similar, but some things changed. I also noticed while playing with the several timeouts that if I increase the timeout option from the Ferrum constructor to 30s, the test-case passes. I will add the log info below.

with sleep 3 Test case fails

▶ 4.456546378030907 {"method":"Input.dispatchMouseEvent","params":{"x":83.5999984741211,"y":72,"type":"mouseReleased","button":"left","clickCount":1,"modifiers":0},"id":1047}
    ◀ 4.464133104018401 {"method":"Page.frameStartedLoading","params":{"frameId":"5B7BB11FE487610A10FD7253EEF1DF12"}}
    ◀ 4.466367090004496 {"method":"Target.targetInfoChanged","params":{"targetInfo":{"targetId":"5B7BB11FE487610A10FD7253EEF1DF12","type":"page","title":"Model - Test set - Project 1 - Axini Modeling Platform","url":"http://localhost:9887/models/79998aa9-daca-47dd-b888-ab42604fa321","attached":true,"canAccessOpener":false,"browserContextId":"B27D70E47F75D65B98A908CAF6C9673F"}}}
    ◀ 4.4670131640159525 {"method":"Page.navigatedWithinDocument","params":{"frameId":"5B7BB11FE487610A10FD7253EEF1DF12","url":"http://localhost:9887/models/79998aa9-daca-47dd-b888-ab42604fa321"}}
    ◀ 4.468240257992875 {"method":"Page.frameStoppedLoading","params":{"frameId":"5B7BB11FE487610A10FD7253EEF1DF12"}}
    ◀ 4.471780185005628 {"method":"DOM.attributeModified","params":{"nodeId":5,"name":"class","value":""}}
    ◀ 4.4725169879966415 {"method":"Page.javascriptDialogOpening","params":{"url":"http://localhost:9887/models/79998aa9-daca-47dd-b888-ab42604fa321","message":"The model has unsaved changes that will be lost. Close anyway?","type":"confirm","hasBrowserHandler":true,"defaultPrompt":""}}

▶ 4.472567011020146 {"method":"DOM.getDocument","params":{"depth":0},"id":1048}
    ◀ 4.478205105988309 {"method":"Network.responseReceivedExtraInfo","params":{"requestId":"402100.44","blockedCookies":[],"headers":{"Cache-Control":"max-age=0, private, must-revalidate","Content-Type":"application/json; charset=utf-8","ETag":"W/\"42099b4af021e53fd8fd4e056c2568d7\"","Referrer-Policy":"strict-origin-when-cross-origin","Set-Cookie":"_dummy_session=TTMeOPbq5WyGeKxrJC5n2y%2BdmQRuL%2BH%2BhRZxMFY%2B7eHK0BoCYTlqlmC3O7%2B0dRc7O3Z%2Bp0xscEKhkIT411MbD3RxInjXe2eTL4qODoOoNHl9kOhKck36JLZSApVNoV7UCvDfEVQ3yBiz7Ivz4f0NHE0IgVtgQ36622M4EW0dzsXCXlVAMlU1KfavI8ydQIfkyA3qdVpD9LVymZkimD5YJ%2BQQ8rjp5Cl7%2FlVLpCRf5nx37fg%2F%2BKt%2FfATAlwA7xC0MkTYdo2Wnc5ZUPI1Yb%2Bjb5MHn8WdZTQiz31r40XL57chCgoPOPouV7cDLv%2BuDz8g990JqwOG7yFCfMcpDDtkntJww2rvkcJDD6Jk7Q%2Fzr61oWGOwUzS0Z%2FsCI--rTppS5FLwDdCGoWO--OIv2D5joxywjvwpByYAVTQ%3D%3D; path=/; HttpOnly","Transfer-Encoding":"chunked","Vary":"Accept","X-Content-Type-Options":"nosniff","X-Download-Options":"noopen","X-Frame-Options":"SAMEORIGIN","X-Permitted-Cross-Domain-Policies":"none","X-Request-Id":"bfa83eb8-d456-429e-9dd1-66e4c18390e6","X-Runtime":"0.020706","X-XSS-Protection":"1; mode=block"},"resourceIPAddressSpace":"Local","statusCode":200,"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\nETag: W/\"42099b4af021e53fd8fd4e056c2568d7\"\r\nContent-Type: application/json; charset=utf-8\r\nVary: Accept\r\nCache-Control: max-age=0, private, must-revalidate\r\nSet-Cookie: _dummy_session=TTMeOPbq5WyGeKxrJC5n2y%2BdmQRuL%2BH%2BhRZxMFY%2B7eHK0BoCYTlqlmC3O7%2B0dRc7O3Z%2Bp0xscEKhkIT411MbD3RxInjXe2eTL4qODoOoNHl9kOhKck36JLZSApVNoV7UCvDfEVQ3yBiz7Ivz4f0NHE0IgVtgQ36622M4EW0dzsXCXlVAMlU1KfavI8ydQIfkyA3qdVpD9LVymZkimD5YJ%2BQQ8rjp5Cl7%2FlVLpCRf5nx37fg%2F%2BKt%2FfATAlwA7xC0MkTYdo2Wnc5ZUPI1Yb%2Bjb5MHn8WdZTQiz31r40XL57chCgoPOPouV7cDLv%2BuDz8g990JqwOG7yFCfMcpDDtkntJww2rvkcJDD6Jk7Q%2Fzr61oWGOwUzS0Z%2FsCI--rTppS5FLwDdCGoWO--OIv2D5joxywjvwpByYAVTQ%3D%3D; path=/; HttpOnly\r\nX-Request-Id: bfa83eb8-d456-429e-9dd1-66e4c18390e6\r\nX-Runtime: 0.020706\r\nTransfer-Encoding: chunked\r\n\r\n","cookiePartitionKey":"http://localhost","cookiePartitionKeyOpaque":false}}

▶ 14.460793908045162 {"method":"Page.captureScreenshot","params":{"format":"png"},"id":1049}

▶ 14.473936660040636 {"method":"Page.handleJavaScriptDialog","params":{"accept":true,"promptText":""},"id":1050}
    ◀ 14.50370554701658 {"method":"Page.javascriptDialogClosed","params":{"result":true,"userInput":""}}
    ◀ 14.505048070044722 {"id":1050,"result":{}}
    ◀ 14.509657504037023 {"method":"Network.requestWillBeSentExtraInfo","params":{"requestId":"402100.45","associatedCookies":[{"blockedReasons":[],"cookie":{"name":"_dummy_session","value":"TTMeOPbq5WyGeKxrJC5n2y%2BdmQRuL%2BH%2BhRZxMFY%2B7eHK0BoCYTlqlmC3O7%2B0dRc7O3Z%2Bp0xscEKhkIT411MbD3RxInjXe2eTL4qODoOoNHl9kOhKck36JLZSApVNoV7UCvDfEVQ3yBiz7Ivz4f0NHE0IgVtgQ36622M4EW0dzsXCXlVAMlU1KfavI8ydQIfkyA3qdVpD9LVymZkimD5YJ%2BQQ8rjp5Cl7%2FlVLpCRf5nx37fg%2F%2BKt%2FfATAlwA7xC0MkTYdo2Wnc5ZUPI1Yb%2Bjb5MHn8WdZTQiz31r40XL57chCgoPOPouV7cDLv%2BuDz8g990JqwOG7yFCfMcpDDtkntJww2rvkcJDD6Jk7Q%2Fzr61oWGOwUzS0Z%2FsCI--rTppS5FLwDdCGoWO--OIv2D5joxywjvwpByYAVTQ%3D%3D","domain":"localhost","path":"/","expires":-1,"size":468,"httpOnly":true,"secure":false,"session":true,"priority":"Medium","sameParty":false,"sourceScheme":"NonSecure","sourcePort":9887}}],"headers":{"Accept":"text/html, application/xhtml+xml","Accept-Encoding":"gzip, deflate, br","Accept-Language":"en-US,en;q=0.9","Connection":"keep-alive","Cookie":"_dummy_session=TTMeOPbq5WyGeKxrJC5n2y%2BdmQRuL%2BH%2BhRZxMFY%2B7eHK0BoCYTlqlmC3O7%2B0dRc7O3Z%2Bp0xscEKhkIT411MbD3RxInjXe2eTL4qODoOoNHl9kOhKck36JLZSApVNoV7UCvDfEVQ3yBiz7Ivz4f0NHE0IgVtgQ36622M4EW0dzsXCXlVAMlU1KfavI8ydQIfkyA3qdVpD9LVymZkimD5YJ%2BQQ8rjp5Cl7%2FlVLpCRf5nx37fg%2F%2BKt%2FfATAlwA7xC0MkTYdo2Wnc5ZUPI1Yb%2Bjb5MHn8WdZTQiz31r40XL57chCgoPOPouV7cDLv%2BuDz8g990JqwOG7yFCfMcpDDtkntJww2rvkcJDD6Jk7Q%2Fzr61oWGOwUzS0Z%2FsCI--rTppS5FLwDdCGoWO--OIv2D5joxywjvwpByYAVTQ%3D%3D","Host":"localhost:9887","Referer":"http://localhost:9887/models/79998aa9-daca-47dd-b888-ab42604fa321","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-origin","Turbolinks-Referrer":"http://localhost:9887/models/79998aa9-daca-47dd-b888-ab42604fa321","User-Agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","sec-ch-ua":"\"Not_A Brand\";v=\"8\", \"Chromium\";v=\"120\"","sec-ch-ua-mobile":"?0","sec-ch-ua-platform":"\"Linux\""},"connectTiming":{"requestTime":468614.692942},"clientSecurityState":{"initiatorIsSecureContext":true,"initiatorIPAddressSpace":"Local","privateNetworkRequestPolicy":"Allow"},"siteHasCookieInOtherPartition":false}}
    ◀ 14.510081403015647 {"id":1047,"result":{}}
    ◀ 14.515844985027798 {"method":"Target.targetInfoChanged","params":{"targetInfo":{"targetId":"5B7BB11FE487610A10FD7253EEF1DF12","type":"page","title":"Model - Test set - Project 1 - Axini Modeling Platform","url":"http://localhost:9887/models/79998aa9-daca-47dd-b888-ab42604fa321/edit?type=model","attached":true,"canAccessOpener":false,"browserContextId":"B27D70E47F75D65B98A908CAF6C9673F"}}}
    ◀ 14.516068266995717 {"method":"Page.frameStartedLoading","params":{"frameId":"5B7BB11FE487610A10FD7253EEF1DF12"}}
    ◀ 14.516418001032434 {"method":"Network.requestWillBeSent","params":{"requestId":"402100.45","loaderId":"C06100A70256FBCF1510CE44752C2870","documentURL":"http://localhost:9887/models/79998aa9-daca-47dd-b888-ab42604fa321","request":{"url":"http://localhost:9887/models/79998aa9-daca-47dd-b888-ab42604fa321/edit?type=model","method":"GET","headers":{"sec-ch-ua":"\"Not_A Brand\";v=\"8\", \"Chromium\";v=\"120\"","Accept":"text/html, application/xhtml+xml","Referer":"http://localhost:9887/models/79998aa9-daca-47dd-b888-ab42604fa321","Turbolinks-Referrer":"http://localhost:9887/models/79998aa9-daca-47dd-b888-ab42604fa321","sec-ch-ua-mobile":"?0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","sec-ch-ua-platform":"\"Linux\""},"mixedContentType":"none","initialPriority":"High","referrerPolicy":"strict-origin-when-cross-origin","isSameSite":true},"timestamp":468614.691813,"wallTime":1704126358.825868,"initiator":{"type":"script","stack":{"callFrames":[{"functionName":"r.send","scriptId":"7","url":"http://localhost:9887/assets/application-91bcbc476818ddcf719114bb836660c8fa3d2545c68d75c6d350a705661b7910.js","lineNumber":75639,"columnNumber":4266},{"functionName":"r.issueRequest","scriptId":"7","url":"http://localhost:9887/assets/application-91bcbc476818ddcf719114bb836660c8fa3d2545c68d75c6d350a705661b7910.js","lineNumber":75639,"columnNumber":26166},{"functionName":"r.visitStarted","scriptId":"7","url":"http://localhost:9887/assets/application-91bcbc476818ddcf719114bb836660c8fa3d2545c68d75c6d350a705661b7910.js","lineNumber":75639,"columnNumber":9458},{"functionName":"r.start","scriptId":"7","url":"http://localhost:9887/assets/application-91bcbc476818ddcf719114bb836660c8fa3d2545c68d75c6d350a705661b7910.js","lineNumber":75639,"columnNumber":25152},{"functionName":"r.startVisit","scriptId":"7","url":"http://localhost:9887/assets/application-91bcbc476818ddcf719114bb836660c8fa3d2545c68d75c6d350a705661b7910.js","lineNumber":75640,"columnNumber":3012},{"functionName":"r.startVisitToLocationWithAction","scriptId":"7","url":"http://localhost:9887/assets/application-91bcbc476818ddcf719114bb836660c8fa3d2545c68d75c6d350a705661b7910.js","lineNumber":75639,"columnNumber":31378},{"functionName":"r.visitProposedToLocationWithAction","scriptId":"7","url":"http://localhost:9887/assets/application-91bcbc476818ddcf719114bb836660c8fa3d2545c68d75c6d350a705661b7910.js","lineNumber":75639,"columnNumber":9375},{"functionName":"r.visit","scriptId":"7","url":"http://localhost:9887/assets/application-91bcbc476818ddcf719114bb836660c8fa3d2545c68d75c6d350a705661b7910.js","lineNumber":75639,"columnNumber":31180},{"functionName":"r.clickBubbled","scriptId":"7","url":"http://localhost:9887/assets/application-91bcbc476818ddcf719114bb836660c8fa3d2545c68d75c6d350a705661b7910.js","lineNumber":75640,"columnNumber":1614},{"functionName":"","scriptId":"7","url":"http://localhost:9887/assets/application-91bcbc476818ddcf719114bb836660c8fa3d2545c68d75c6d350a705661b7910.js","lineNumber":75639,"columnNumber":29990}]}},"redirectHasExtraInfo":false,"type":"XHR","frameId":"5B7BB11FE487610A10FD7253EEF1DF12","hasUserGesture":false}}
    ◀ 14.517286412010435 {"method":"Page.navigatedWithinDocument","params":{"frameId":"5B7BB11FE487610A10FD7253EEF1DF12","url":"http://localhost:9887/models/79998aa9-daca-47dd-b888-ab42604fa321/edit?type=model"}}
    ◀ 14.519817476044409 {"method":"Page.frameStoppedLoading","params":{"frameId":"5B7BB11FE487610A10FD7253EEF1DF12"}}
    ◀ 14.52361314400332 {"method":"Network.loadingFailed","params":{"requestId":"402100.44","timestamp":468614.694712,"type":"XHR","errorText":"net::ERR_ABORTED","canceled":true}}

With timeout: 30 Test-case passes

▶ 1.436226358055137 {"method":"Input.dispatchMouseEvent","params":{"x":83.5999984741211,"y":72,"type":"mousePressed","button":"left","clickCount":1,"modifiers":0},"id":1046}
    ◀ 1.4420718250330538 {"method":"Network.requestWillBeSent","params":{"requestId":"402952.20","loaderId":"A6ACD0603C4A247F649A55088457C7A0","documentURL":"http://localhost:9887/models/46e7968f-0039-4cf9-b20c-79828e9e445a","request":{"url":"http://localhost:9887/test_runs/update_test_run_queue?_=1704126778551","method":"GET","headers":{"sec-ch-ua":"\"Not_A Brand\";v=\"8\", \"Chromium\";v=\"120\"","Accept":"*/*","Referer":"http://localhost:9887/models/46e7968f-0039-4cf9-b20c-79828e9e445a","X-Requested-With":"XMLHttpRequest","sec-ch-ua-mobile":"?0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","sec-ch-ua-platform":"\"Linux\""},"mixedContentType":"none","initialPriority":"High","referrerPolicy":"strict-origin-when-cross-origin","isSameSite":true},"timestamp":469034.798017,"wallTime":1704126778.931825,"initiator":{"type":"script","stack":{"callFrames":[{"functionName":"send","scriptId":"7","url":"http://localhost:9887/assets/application-91bcbc476818ddcf719114bb836660c8fa3d2545c68d75c6d350a705661b7910.js","lineNumber":10134,"columnNumber":9},{"functionName":"ajax","scriptId":"7","url":"http://localhost:9887/assets/application-91bcbc476818ddcf719114bb836660c8fa3d2545c68d75c6d350a705661b7910.js","lineNumber":9715,"columnNumber":14},{"functionName":"window.ajax","scriptId":"7","url":"http://localhost:9887/assets/application-91bcbc476818ddcf719114bb836660c8fa3d2545c68d75c6d350a705661b7910.js","lineNumber":78049,"columnNumber":21},{"functionName":"","scriptId":"7","url":"http://localhost:9887/assets/application-91bcbc476818ddcf719114bb836660c8fa3d2545c68d75c6d350a705661b7910.js","lineNumber":78069,"columnNumber":30}]}},"redirectHasExtraInfo":false,"type":"XHR","frameId":"E157FBE795F366B992E5BF63E9B58A14","hasUserGesture":false}}
    ◀ 1.4480378450243734 {"method":"Network.requestWillBeSentExtraInfo","params":{"requestId":"402952.20","associatedCookies":[{"blockedReasons":[],"cookie":{"name":"_dummy_session","value":"6Eph9PoPLa0eOpzxdG9xOy%2BqC4XoZ2QBLKOtWHeEevvtlNJ9TKlcTbJe5uOo6wqN639ghdwpwckwqhWDseNkh2axonllTFvmwN0hPFlnBWo5NrHl1SJzQpi5fVG1CUrx%2BfrOtak%2FZ33GLV0geSIQjLsh18tOfUEwmsg1G20d670JgqQXIAxknPpBNZq9fh7DediDc0k2syvW9CWDwXuDfRGVFxNxEuo%2BSKKc6sg%2Bj0AWc28SCwB53ayA%2FNy9NyBoBrUAvymT7Cz8zyhkEhUHVh3BF6gpGhbC81tBHFQxD6Rmy73sH5OqiX9djzMNLTdG7sT5rtjNogGI7vgNGFd92nBSPUKWMQ%2BZpvzPEFfgNLBzNSeeufDEW7Su--a3q5zeaB7t8Y%2B2jQ--dO9%2Bdu9f72ZTJ5WvFgDROA%3D%3D","domain":"localhost","path":"/","expires":-1,"size":456,"httpOnly":true,"secure":false,"session":true,"priority":"Medium","sameParty":false,"sourceScheme":"NonSecure","sourcePort":9887}}],"headers":{"Accept":"*/*","Accept-Encoding":"gzip, deflate, br","Accept-Language":"en-US,en;q=0.9","Connection":"keep-alive","Cookie":"_dummy_session=6Eph9PoPLa0eOpzxdG9xOy%2BqC4XoZ2QBLKOtWHeEevvtlNJ9TKlcTbJe5uOo6wqN639ghdwpwckwqhWDseNkh2axonllTFvmwN0hPFlnBWo5NrHl1SJzQpi5fVG1CUrx%2BfrOtak%2FZ33GLV0geSIQjLsh18tOfUEwmsg1G20d670JgqQXIAxknPpBNZq9fh7DediDc0k2syvW9CWDwXuDfRGVFxNxEuo%2BSKKc6sg%2Bj0AWc28SCwB53ayA%2FNy9NyBoBrUAvymT7Cz8zyhkEhUHVh3BF6gpGhbC81tBHFQxD6Rmy73sH5OqiX9djzMNLTdG7sT5rtjNogGI7vgNGFd92nBSPUKWMQ%2BZpvzPEFfgNLBzNSeeufDEW7Su--a3q5zeaB7t8Y%2B2jQ--dO9%2Bdu9f72ZTJ5WvFgDROA%3D%3D","Host":"localhost:9887","Referer":"http://localhost:9887/models/46e7968f-0039-4cf9-b20c-79828e9e445a","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-origin","User-Agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","X-Requested-With":"XMLHttpRequest","sec-ch-ua":"\"Not_A Brand\";v=\"8\", \"Chromium\";v=\"120\"","sec-ch-ua-mobile":"?0","sec-ch-ua-platform":"\"Linux\""},"connectTiming":{"requestTime":469034.798816},"clientSecurityState":{"initiatorIsSecureContext":true,"initiatorIPAddressSpace":"Local","privateNetworkRequestPolicy":"Allow"},"siteHasCookieInOtherPartition":false}}
    ◀ 1.4481539950356819 {"id":1046,"result":{}}
    ◀ 1.4482276450144127 {"method":"DOM.attributeModified","params":{"nodeId":58,"name":"class","value":"CodeMirror cm-s-axini CodeMirror-wrap"}}

▶ 1.4511776830186136 {"method":"Input.dispatchMouseEvent","params":{"x":83.5999984741211,"y":72,"type":"mouseReleased","button":"left","clickCount":1,"modifiers":0},"id":1047}
    ◀ 1.4556623640237376 {"method":"Page.frameStartedLoading","params":{"frameId":"E157FBE795F366B992E5BF63E9B58A14"}}
    ◀ 1.4572338860016316 {"method":"Target.targetInfoChanged","params":{"targetInfo":{"targetId":"E157FBE795F366B992E5BF63E9B58A14","type":"page","title":"Model - Test set - Project 1 - Axini Modeling Platform","url":"http://localhost:9887/models/46e7968f-0039-4cf9-b20c-79828e9e445a","attached":true,"canAccessOpener":false,"browserContextId":"F92BFFF96A36ACE58495073BE3498F41"}}}
    ◀ 1.457556604000274 {"method":"Page.navigatedWithinDocument","params":{"frameId":"E157FBE795F366B992E5BF63E9B58A14","url":"http://localhost:9887/models/46e7968f-0039-4cf9-b20c-79828e9e445a"}}
    ◀ 1.4578606500290334 {"method":"Page.frameStoppedLoading","params":{"frameId":"E157FBE795F366B992E5BF63E9B58A14"}}
    ◀ 1.4579322870122269 {"method":"DOM.attributeModified","params":{"nodeId":5,"name":"class","value":""}}
    ◀ 1.4579650180530734 {"method":"Page.javascriptDialogOpening","params":{"url":"http://localhost:9887/models/46e7968f-0039-4cf9-b20c-79828e9e445a","message":"The model has unsaved changes that will be lost. Close anyway?","type":"confirm","hasBrowserHandler":true,"defaultPrompt":""}}

▶ 1.458459694054909 {"method":"DOM.getDocument","params":{"depth":0},"id":1048}
    ◀ 1.466957935015671 {"method":"Network.responseReceivedExtraInfo","params":{"requestId":"402952.20","blockedCookies":[],"headers":{"Cache-Control":"max-age=0, private, must-revalidate","Content-Type":"application/json; charset=utf-8","ETag":"W/\"42099b4af021e53fd8fd4e056c2568d7\"","Referrer-Policy":"strict-origin-when-cross-origin","Set-Cookie":"_dummy_session=8b%2FmGTcj%2BYq%2BbdzVWJfR5ohvwkc5TlZ%2FY3Yogh895PC0AYFiTJPPXtyFLwPBNCNJmUgiox2YsYTAnl1CIheKs%2FLTmOFT81X1tu%2BWGrHqr0C4iciGWQPwWPbrqqWED1u1im5Lyw%2BEgz60OwRMFNFNaTGJ7X6KvW9OhPa0xHw8rzLD3YrkF69GxA6GsLyYsvfe8hz9baOYZiWkDOVtCiAUwqhc7FnhFE83T5ZdzII7fwpcM3NkBB7q9Wz9B9ddQiBd4H8XDL%2BRVYgrYjdDEmU2MHymKhbvAh0T77C0Koflu4KKH8VDfAMYi1lJao5h3ifgmPmnlyTHLDlejfZ5oJMyiGBuVqWQggh2J9nL0edwKS9VlmURi6yGO9c0--QNE415HgoGLZy3Jw--aR6EIW6ke6%2BLTWTbGefv%2Bw%3D%3D; path=/; HttpOnly","Transfer-Encoding":"chunked","Vary":"Accept","X-Content-Type-Options":"nosniff","X-Download-Options":"noopen","X-Frame-Options":"SAMEORIGIN","X-Permitted-Cross-Domain-Policies":"none","X-Request-Id":"c206f20d-b2e7-46da-ab73-3b18f0ae6c91","X-Runtime":"0.017594","X-XSS-Protection":"1; mode=block"},"resourceIPAddressSpace":"Local","statusCode":200,"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\nETag: W/\"42099b4af021e53fd8fd4e056c2568d7\"\r\nContent-Type: application/json; charset=utf-8\r\nVary: Accept\r\nCache-Control: max-age=0, private, must-revalidate\r\nSet-Cookie: _dummy_session=8b%2FmGTcj%2BYq%2BbdzVWJfR5ohvwkc5TlZ%2FY3Yogh895PC0AYFiTJPPXtyFLwPBNCNJmUgiox2YsYTAnl1CIheKs%2FLTmOFT81X1tu%2BWGrHqr0C4iciGWQPwWPbrqqWED1u1im5Lyw%2BEgz60OwRMFNFNaTGJ7X6KvW9OhPa0xHw8rzLD3YrkF69GxA6GsLyYsvfe8hz9baOYZiWkDOVtCiAUwqhc7FnhFE83T5ZdzII7fwpcM3NkBB7q9Wz9B9ddQiBd4H8XDL%2BRVYgrYjdDEmU2MHymKhbvAh0T77C0Koflu4KKH8VDfAMYi1lJao5h3ifgmPmnlyTHLDlejfZ5oJMyiGBuVqWQggh2J9nL0edwKS9VlmURi6yGO9c0--QNE415HgoGLZy3Jw--aR6EIW6ke6%2BLTWTbGefv%2Bw%3D%3D; path=/; HttpOnly\r\nX-Request-Id: c206f20d-b2e7-46da-ab73-3b18f0ae6c91\r\nX-Runtime: 0.017594\r\nTransfer-Encoding: chunked\r\n\r\n","cookiePartitionKey":"http://localhost","cookiePartitionKeyOpaque":false}}

▶ 31.4601036470267 {"method":"Page.handleJavaScriptDialog","params":{"accept":true,"promptText":""},"id":1049}
    ◀ 31.461428387032356 {"method":"Page.javascriptDialogClosed","params":{"result":true,"userInput":""}}
    ◀ 31.462694475019816 {"id":1049,"result":{}}
    ◀ 31.46756532805739 {"method":"Page.frameStartedLoading","params":{"frameId":"E157FBE795F366B992E5BF63E9B58A14"}}
    ◀ 31.47434776800219 {"method":"Target.targetInfoChanged","params":{"targetInfo":{"targetId":"E157FBE795F366B992E5BF63E9B58A14","type":"page","title":"Model - Test set - Project 1 - Axini Modeling Platform","url":"http://localhost:9887/models/46e7968f-0039-4cf9-b20c-79828e9e445a/edit?type=model","attached":true,"canAccessOpener":false,"browserContextId":"F92BFFF96A36ACE58495073BE3498F41"}}}
    ◀ 31.47456994303502 {"id":1047,"result":{}}
    ◀ 31.47570336004719 {"method":"Network.requestWillBeSent","params":{"requestId":"402952.21","loaderId":"A6ACD0603C4A247F649A55088457C7A0","documentURL":"http://localhost:9887/models/46e7968f-0039-4cf9-b20c-79828e9e445a","request":{"url":"http://localhost:9887/models/46e7968f-0039-4cf9-b20c-79828e9e445a/edit?type=model","method":"GET","headers":{"sec-ch-ua":"\"Not_A Brand\";v=\"8\", \"Chromium\";v=\"120\"","Accept":"text/html, application/xhtml+xml","Referer":"http://localhost:9887/models/46e7968f-0039-4cf9-b20c-79828e9e445a","Turbolinks-Referrer":"http://localhost:9887/models/46e7968f-0039-4cf9-b20c-79828e9e445a","sec-ch-ua-mobile":"?0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","sec-ch-ua-platform":"\"Linux\""},"mixedContentType":"none","initialPriority":"High","referrerPolicy":"strict-origin-when-cross-origin","isSameSite":true},"timestamp":469064.82472,"wallTime":1704126808.958788,"initiator":{"type":"script","stack":{"callFrames":[{"functionName":"r.send","scriptId":"7","url":"http://localhost:9887/assets/application-91bcbc476818ddcf719114bb836660c8fa3d2545c68d75c6d350a705661b7910.js","lineNumber":75639,"columnNumber":4266},{"functionName":"r.issueRequest","scriptId":"7","url":"http://localhost:9887/assets/application-91bcbc476818ddcf719114bb836660c8fa3d2545c68d75c6d350a705661b7910.js","lineNumber":75639,"columnNumber":26166},{"functionName":"r.visitStarted","scriptId":"7","url":"http://localhost:9887/assets/application-91bcbc476818ddcf719114bb836660c8fa3d2545c68d75c6d350a705661b7910.js","lineNumber":75639,"columnNumber":9458},{"functionName":"r.start","scriptId":"7","url":"http://localhost:9887/assets/application-91bcbc476818ddcf719114bb836660c8fa3d2545c68d75c6d350a705661b7910.js","lineNumber":75639,"columnNumber":25152},{"functionName":"r.startVisit","scriptId":"7","url":"http://localhost:9887/assets/application-91bcbc476818ddcf719114bb836660c8fa3d2545c68d75c6d350a705661b7910.js","lineNumber":75640,"columnNumber":3012},{"functionName":"r.startVisitToLocationWithAction","scriptId":"7","url":"http://localhost:9887/assets/application-91bcbc476818ddcf719114bb836660c8fa3d2545c68d75c6d350a705661b7910.js","lineNumber":75639,"columnNumber":31378},{"functionName":"r.visitProposedToLocationWithAction","scriptId":"7","url":"http://localhost:9887/assets/application-91bcbc476818ddcf719114bb836660c8fa3d2545c68d75c6d350a705661b7910.js","lineNumber":75639,"columnNumber":9375},{"functionName":"r.visit","scriptId":"7","url":"http://localhost:9887/assets/application-91bcbc476818ddcf719114bb836660c8fa3d2545c68d75c6d350a705661b7910.js","lineNumber":75639,"columnNumber":31180},{"functionName":"r.clickBubbled","scriptId":"7","url":"http://localhost:9887/assets/application-91bcbc476818ddcf719114bb836660c8fa3d2545c68d75c6d350a705661b7910.js","lineNumber":75640,"columnNumber":1614},{"functionName":"","scriptId":"7","url":"http://localhost:9887/assets/application-91bcbc476818ddcf719114bb836660c8fa3d2545c68d75c6d350a705661b7910.js","lineNumber":75639,"columnNumber":29990}]}},"redirectHasExtraInfo":false,"type":"XHR","frameId":"E157FBE795F366B992E5BF63E9B58A14","hasUserGesture":false}}
    ◀ 31.476969489012845 {"method":"Page.navigatedWithinDocument","params":{"frameId":"E157FBE795F366B992E5BF63E9B58A14","url":"http://localhost:9887/models/46e7968f-0039-4cf9-b20c-79828e9e445a/edit?type=model"}}
    ◀ 31.48198573605623 {"method":"Page.frameStoppedLoading","params":{"frameId":"E157FBE795F366B992E5BF63E9B58A14"}}
route commented 6 months ago

Looks like a bug to me. Could you build a public example website to me and a test I could run?

vdbijl commented 6 months ago

Thanks for the quick reply, happy new year btw! I will discuss with some colleagues what we can make for you. Is it also ok to organize a pair programming session in which we give you temporary access to one of our demo environments (with the prepared test-case)?

route commented 6 months ago

@vdbijl happy new year! whatever makes sense, ideally I'd use a secret url and a reproducible test. You can email me both.

vdbijl commented 6 months ago

Small update. We're working on a small app to reproduce the problem. I think we can have it coming week. It looks like the problem is related to including JS code from Swagger (rswag-ui). I don't know if it's relevant, but maybe you have run into such a thing before? I'll write it down here in case others run into the same problem. I'll update you if we have more information.

route commented 6 months ago

No I didn't, usually when coming with reproducible test and isolating code it usually clicks where the problem lies.

route commented 6 months ago

I merged some interesting things in main branch. You might try and see the difference, it might show you the error or help to figure it out.

route commented 5 months ago

Please come back with some data or email me. Closing for now

vdbijl commented 6 days ago

Hi @route I've sent you a rails app to reproduce the problem. AFAICT it's indeed related to swagger.ui javascript code. If you disable it you'll see that the spec passes. To reproduce the problem run the spec: bundle exec rake spec

vdbijl commented 6 days ago

Gmail gives me some trouble sending you the code, please let me know if you did not receive it.

route commented 3 days ago

@vdbijl got it! I'll try to look into it before my vacation next week but please please bear with me if I don't