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

[grid] UI Liveview disconnect noVNC websocket when closing dialog #14598

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

VietND96
Copy link
Member

@VietND96 VietND96 commented Oct 14, 2024

User description

Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it

Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.

Description

Motivation and Context

Fixes #12358
When clicking Close button to close Liveview dialog of a session. noVNC websocket keeps transferring data in the background

Before
vnc-close

After
vnc-close-fixed

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

PR Type

Bug fix


Description

  • Added functionality to disconnect the noVNC WebSocket when the LiveView dialog is closed to prevent unnecessary data transfer.
  • Utilized useImperativeHandle and forwardRef in LiveView component to expose the disconnect method.
  • Updated RunningSessions component to use a reference to the LiveView component and ensure proper disconnection on dialog close.

Changes walkthrough 📝

Relevant files
Bug fix
LiveView.tsx
Implement WebSocket disconnection on dialog close               

javascript/grid-ui/src/components/LiveView/LiveView.tsx

  • Added useImperativeHandle and forwardRef to manage component
    references.
  • Implemented a disconnect function to handle WebSocket disconnection.
  • Ensured disconnect is called on dialog close and password dialog
    close.
  • +9/-3     
    RunningSessions.tsx
    Manage LiveView component reference for disconnection       

    javascript/grid-ui/src/components/RunningSessions/RunningSessions.tsx

  • Added useRef to manage LiveView component reference.
  • Implemented handleDialogClose to ensure WebSocket disconnection.
  • Updated dialog close button to use handleDialogClose.
  • +11/-2   

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    Copy link
    Contributor

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Error Handling
    The disconnect function doesn't handle potential errors that might occur during the disconnection process. Consider adding try-catch block or error handling mechanism.

    Null Check
    The handleDialogClose function assumes liveViewRef.current always exists. Consider adding a null check before calling disconnect().

    Copy link
    Contributor

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Score
    Best practice
    Implement a cleanup function in useEffect to ensure proper WebSocket disconnection on component unmount

    Consider using a cleanup function in the useEffect hook to ensure that the WebSocket
    connection is properly closed when the component unmounts. This can prevent
    potential memory leaks and ensure proper resource management.

    javascript/grid-ui/src/components/LiveView/LiveView.tsx [56-58]

     useEffect(() => {
       connect()
    +  return () => {
    +    disconnect()
    +  }
     }, [props.url])
    • Apply this suggestion
    Suggestion importance[1-10]: 9

    Why: The suggestion to add a cleanup function in the useEffect hook is highly relevant as it ensures that the WebSocket connection is properly closed when the component unmounts, preventing potential memory leaks and ensuring proper resource management.

    9
    Enhancement
    Add error handling to the disconnect function for improved robustness

    Consider adding error handling to the disconnect function to gracefully handle any
    potential errors that may occur during the disconnection process.

    javascript/grid-ui/src/components/LiveView/LiveView.tsx [45-50]

     const disconnect = () => {
       if (!rfb) {
         return
       }
    -  rfb.disconnect()
    -  setRfb(null)
    +  try {
    +    rfb.disconnect()
    +  } catch (error) {
    +    console.error('Error disconnecting WebSocket:', error)
    +  } finally {
    +    setRfb(null)
    +  }
     }
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    Why: Adding error handling to the disconnect function is a valuable enhancement that improves the robustness of the code by gracefully handling any potential errors during the disconnection process.

    8
    Use optional chaining for safer method invocation on potentially null references

    Consider using the optional chaining operator (?.) when calling the disconnect
    method on liveViewRef.current to avoid potential runtime errors if the ref is null
    or undefined.

    javascript/grid-ui/src/components/RunningSessions/RunningSessions.tsx [182-187]

     const handleDialogClose = () => {
    -  if (liveViewRef.current) {
    -    liveViewRef.current.disconnect()
    -  }
    +  liveViewRef.current?.disconnect()
       setRowLiveViewOpen('')
     }
    • Apply this suggestion
    Suggestion importance[1-10]: 7

    Why: The use of optional chaining is a good practice that enhances code safety by preventing runtime errors when accessing properties on potentially null or undefined objects.

    7

    💡 Need additional feedback ? start a PR chat

    Copy link
    Contributor

    qodo-merge-pro bot commented Oct 14, 2024

    CI Failure Feedback 🧐

    (Checks updated until commit 5295bea)

    Action: Ruby / Remote Tests (edge, windows) / Remote Tests (edge, windows)

    Failed stage: Run Bazel [❌]

    Failed test name: Selenium::WebDriver::Remote::Driver errors when not set

    Failure summary:

    The action failed because the test Selenium::WebDriver::Remote::Driver errors when not set did not
    pass. The specific issue was:

  • The test expected a Selenium::WebDriver::Error::WebDriverError to be raised with the message "You
    must enable downloads in order to work with downloadable files."
  • Instead, an Selenium::WebDriver::Error::UnknownError was raised, indicating that the downloads file
    system could not be found for the session id.

  • Relevant error logs:
    1:  ##[group]Operating System
    2:  Microsoft Windows Server 2022
    ...
    
    811:  �[32m[2,734 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/@[email protected]_796748879/node_modules/@mui/icons-material/Tungsten.d.ts, 48 B / 48 B; 148s disk-cache ... (4 actions, 1 running)
    812:  �[32m[2,734 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/@[email protected]_796748879/node_modules/@mui/icons-material/Twitter.js; 149s disk-cache ... (4 actions, 1 running)
    813:  �[32m[2,734 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/@[email protected]_796748879/node_modules/@mui/icons-material/UpcomingRounded.js; 150s disk-cache ... (4 actions, 1 running)
    814:  �[32m[2,734 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/@[email protected]_796748879/node_modules/@mui/icons-material/VerticalAlignBottomRounded.d.ts, 48 B / 48 B; 151s disk-cache ... (4 actions, 1 running)
    815:  �[32m[2,734 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/@[email protected]_796748879/node_modules/@mui/icons-material/ViewAgendaTwoTone.js; 152s disk-cache ... (4 actions, 1 running)
    816:  �[32m[2,734 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/@[email protected]_796748879/node_modules/@mui/icons-material/VignetteOutlined.d.ts; 153s disk-cache ... (4 actions, 1 running)
    817:  �[32m[2,734 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/@[email protected]_796748879/node_modules/@mui/icons-material/WalletOutlined.js; 154s disk-cache ... (4 actions, 1 running)
    818:  �[32m[2,734 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/@[email protected]_796748879/node_modules/@mui/icons-material/WbCloudySharp.d.ts; 155s disk-cache ... (4 actions, 1 running)
    819:  �[32m[2,734 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/@[email protected]_796748879/node_modules/@mui/icons-material/WifiTetheringErrorRoundedOutlined.d.ts; 157s disk-cache ... (4 actions, 1 running)
    ...
    
    865:  �[32m[2,959 / 3,139]�[0m Running bundle install (@bundle//:bundle); 15s local, disk-cache ... (3 actions, 2 running)
    866:  �[32m[2,979 / 3,139]�[0m Running bundle install (@bundle//:bundle); 17s local, disk-cache ... (3 actions running)
    867:  �[32m[3,010 / 3,139]�[0m Running bundle install (@bundle//:bundle); 18s local, disk-cache ... (2 actions running)
    868:  �[32m[3,011 / 3,139]�[0m Running bundle install (@bundle//:bundle); 20s local, disk-cache ... (2 actions, 1 running)
    869:  �[32m[3,012 / 3,139]�[0m Running bundle install (@bundle//:bundle); 21s local, disk-cache ... (2 actions, 1 running)
    870:  �[32m[3,012 / 3,139]�[0m Running bundle install (@bundle//:bundle); 22s local, disk-cache ... (2 actions running)
    871:  �[32m[3,013 / 3,139]�[0m Running bundle install (@bundle//:bundle); 24s local, disk-cache ... (2 actions, 1 running)
    872:  �[32mINFO: �[0mFrom Building java/src/org/openqa/selenium/remote/libapi-class.jar (71 source files):
    873:  java\src\org\openqa\selenium\remote\ErrorHandler.java:46: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    874:  private final ErrorCodes errorCodes;
    875:  ^
    876:  java\src\org\openqa\selenium\remote\ErrorHandler.java:60: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    877:  this.errorCodes = new ErrorCodes();
    878:  ^
    879:  java\src\org\openqa\selenium\remote\ErrorHandler.java:68: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    880:  public ErrorHandler(ErrorCodes codes, boolean includeServerErrors) {
    881:  ^
    882:  java\src\org\openqa\selenium\remote\Response.java:97: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    883:  ErrorCodes errorCodes = new ErrorCodes();
    884:  ^
    885:  java\src\org\openqa\selenium\remote\Response.java:97: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    886:  ErrorCodes errorCodes = new ErrorCodes();
    887:  ^
    888:  java\src\org\openqa\selenium\remote\ProtocolHandshake.java:181: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    889:  response.setStatus(ErrorCodes.SUCCESS);
    890:  ^
    891:  java\src\org\openqa\selenium\remote\ProtocolHandshake.java:182: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    892:  response.setState(ErrorCodes.SUCCESS_STRING);
    893:  ^
    894:  java\src\org\openqa\selenium\remote\W3CHandshakeResponse.java:53: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    895:  new ErrorCodes().toStatus((String) rawError, Optional.of(tuple.getStatusCode())));
    896:  ^
    897:  java\src\org\openqa\selenium\remote\W3CHandshakeResponse.java:56: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    898:  new ErrorCodes().getExceptionType((String) rawError);
    899:  ^
    900:  java\src\org\openqa\selenium\remote\codec\AbstractHttpResponseCodec.java:44: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    901:  private final ErrorCodes errorCodes = new ErrorCodes();
    902:  ^
    903:  java\src\org\openqa\selenium\remote\codec\AbstractHttpResponseCodec.java:44: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    904:  private final ErrorCodes errorCodes = new ErrorCodes();
    905:  ^
    906:  java\src\org\openqa\selenium\remote\codec\AbstractHttpResponseCodec.java:55: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    907:  int status = response.getStatus() == ErrorCodes.SUCCESS ? HTTP_OK : HTTP_INTERNAL_ERROR;
    908:  ^
    909:  java\src\org\openqa\selenium\remote\codec\AbstractHttpResponseCodec.java:101: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    910:  response.setStatus(ErrorCodes.UNKNOWN_COMMAND);
    911:  ^
    912:  java\src\org\openqa\selenium\remote\codec\AbstractHttpResponseCodec.java:103: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    913:  response.setStatus(ErrorCodes.UNHANDLED_ERROR);
    914:  ^
    915:  java\src\org\openqa\selenium\remote\codec\AbstractHttpResponseCodec.java:117: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    916:  response.setStatus(ErrorCodes.SUCCESS);
    917:  ^
    918:  java\src\org\openqa\selenium\remote\codec\AbstractHttpResponseCodec.java:118: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    919:  response.setState(errorCodes.toState(ErrorCodes.SUCCESS));
    920:  ^
    921:  java\src\org\openqa\selenium\remote\codec\AbstractHttpResponseCodec.java:124: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    922:  response.setState(errorCodes.toState(ErrorCodes.SUCCESS));
    923:  ^
    924:  java\src\org\openqa\selenium\remote\codec\w3c\W3CHttpResponseCodec.java:70: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    925:  private final ErrorCodes errorCodes = new ErrorCodes();
    926:  ^
    927:  java\src\org\openqa\selenium\remote\codec\w3c\W3CHttpResponseCodec.java:70: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    928:  private final ErrorCodes errorCodes = new ErrorCodes();
    929:  ^
    930:  java\src\org\openqa\selenium\remote\codec\w3c\W3CHttpResponseCodec.java:93: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    931:  response.setStatus(ErrorCodes.UNKNOWN_COMMAND);
    932:  ^
    933:  java\src\org\openqa\selenium\remote\codec\w3c\W3CHttpResponseCodec.java:98: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    934:  response.setStatus(ErrorCodes.UNHANDLED_ERROR);
    935:  ^
    936:  java\src\org\openqa\selenium\remote\codec\w3c\W3CHttpResponseCodec.java:145: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    937:  response.setStatus(ErrorCodes.SUCCESS);
    ...
    
    1066:  * `Zip::OutputStream`
    1067:  Please ensure that your Gemfiles and .gemspecs are suitably restrictive
    1068:  to avoid an unexpected breakage when 3.0 is released (e.g. ~> 2.3.0).
    1069:  See https://github.com/rubyzip/rubyzip for details. The Changelog also
    1070:  lists other enhancements and bugfixes that have been implemented since
    1071:  version 2.3.0.
    1072:  �[32m[3,138 / 3,139]�[0m Running bundle install (@bundle//:bundle); 500s local, disk-cache
    1073:  �[32m[3,139 / 3,139]�[0m checking cached actions
    1074:  �[32m[3,139 / 3,161]�[0m [Prepa] Testing //rb/spec/integration/selenium/webdriver:error-edge-remote ... (2 actions, 0 running)
    1075:  �[32m[3,139 / 3,163]�[0m [Prepa] Testing //rb/spec/integration/selenium/webdriver:action_builder-edge-remote ... (4 actions, 0 running)
    1076:  �[32m[3,139 / 3,163]�[0m Testing //rb/spec/integration/selenium/webdriver:error-edge-remote; 1s disk-cache ... (4 actions, 0 running)
    1077:  �[32m[3,139 / 3,163]�[0m Testing //rb/spec/integration/selenium/webdriver:error-edge-remote; 8s disk-cache ... (4 actions, 0 running)
    1078:  �[32m[3,139 / 3,163]�[0m Testing //rb/spec/integration/selenium/webdriver:error-edge-remote; 33s disk-cache ... (4 actions, 0 running)
    ...
    
    1132:  �[32m[3,150 / 3,163]�[0m 11 / 29 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/remote:driver-edge-remote; 168s local, disk-cache ... (4 actions, 2 running)
    1133:  �[32m[3,150 / 3,163]�[0m 11 / 29 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/remote:driver-edge-remote; 171s local, disk-cache ... (4 actions, 2 running)
    1134:  �[32m[3,150 / 3,163]�[0m 11 / 29 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/remote:driver-edge-remote; 174s local, disk-cache ... (4 actions, 2 running)
    1135:  �[32m[3,151 / 3,163]�[0m 12 / 29 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/remote:driver-edge-remote; 175s local, disk-cache ... (4 actions, 1 running)
    1136:  �[32m[3,151 / 3,163]�[0m 12 / 29 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/remote:driver-edge-remote; 186s local, disk-cache ... (4 actions, 1 running)
    1137:  �[32m[3,151 / 3,163]�[0m 12 / 29 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/remote:driver-edge-remote; 188s local, disk-cache ... (4 actions, 1 running)
    1138:  �[32m[3,151 / 3,163]�[0m 12 / 29 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/remote:driver-edge-remote; 202s local, disk-cache ... (4 actions, 2 running)
    1139:  �[31m�[1mFAIL: �[0m//rb/spec/integration/selenium/webdriver/remote:driver-edge-remote (see D:/_bazel/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/remote/driver-edge-remote/test.log)
    1140:  �[31m�[1mFAILED: �[0m//rb/spec/integration/selenium/webdriver/remote:driver-edge-remote (Summary)
    ...
    
    1155:  Selenium::WebDriver::Remote::Driver
    1156:  exposes session_id
    1157:  exposes remote status
    1158:  Request#[] is deprecated and will be removed in a future version of Rack. Please use request.params[] instead
    1159:  uses a default file detector
    1160:  lists downloads
    1161:  downloads a file
    1162:  deletes downloadable files
    1163:  errors when not set (FAILED - 1)
    1164:  Failures:
    1165:  1) Selenium::WebDriver::Remote::Driver errors when not set
    1166:  Failure/Error:
    1167:  expect {
    1168:  driver.downloadable_files
    1169:  }.to raise_exception(Error::WebDriverError,
    1170:  'You must enable downloads in order to work with downloadable files.')
    1171:  expected Selenium::WebDriver::Error::WebDriverError with "You must enable downloads in order to work with downloadable files.", got #<Selenium::WebDriver::Error::UnknownError: Cannot find downloads file system for session id: 3f77d86... os.arch: 'amd64', os.version: '10.0', java.version: '17.0.11'
    1172:  Driver info: driver.version: unknown> with backtrace:
    1173:  # ./rb/lib/selenium/webdriver/remote/response.rb:63:in `add_cause'
    1174:  # ./rb/lib/selenium/webdriver/remote/response.rb:41:in `error'
    ...
    
    1180:  # ./rb/lib/selenium/webdriver/remote/http/common.rb:67:in `call'
    1181:  # ./rb/lib/selenium/webdriver/remote/bridge.rb:685:in `execute'
    1182:  # ./rb/lib/selenium/webdriver/remote/features.rb:62:in `downloadable_files'
    1183:  # ./rb/lib/selenium/webdriver/common/driver_extensions/has_file_downloads.rb:27:in `downloadable_files'
    1184:  # ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:87:in `block (3 levels) in <module:Remote>'
    1185:  # ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:86:in `block (2 levels) in <module:Remote>'
    1186:  # ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:86:in `block (2 levels) in <module:Remote>'
    1187:  Finished in 21.21 seconds (files took 0.66266 seconds to load)
    1188:  7 examples, 1 failure
    1189:  Failed examples:
    1190:  rspec ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:84 # Selenium::WebDriver::Remote::Driver errors when not set
    ...
    
    1202:  Selenium::WebDriver::Remote::Driver
    1203:  exposes session_id
    1204:  exposes remote status
    1205:  Request#[] is deprecated and will be removed in a future version of Rack. Please use request.params[] instead
    1206:  uses a default file detector
    1207:  lists downloads
    1208:  downloads a file
    1209:  deletes downloadable files
    1210:  errors when not set (FAILED - 1)
    1211:  Failures:
    1212:  1) Selenium::WebDriver::Remote::Driver errors when not set
    1213:  Failure/Error:
    1214:  expect {
    1215:  driver.downloadable_files
    1216:  }.to raise_exception(Error::WebDriverError,
    1217:  'You must enable downloads in order to work with downloadable files.')
    1218:  expected Selenium::WebDriver::Error::WebDriverError with "You must enable downloads in order to work with downloadable files.", got #<Selenium::WebDriver::Error::UnknownError: Cannot find downloads file system for session id: 1c17ff0... os.arch: 'amd64', os.version: '10.0', java.version: '17.0.11'
    1219:  Driver info: driver.version: unknown> with backtrace:
    1220:  # ./rb/lib/selenium/webdriver/remote/response.rb:63:in `add_cause'
    1221:  # ./rb/lib/selenium/webdriver/remote/response.rb:41:in `error'
    ...
    
    1227:  # ./rb/lib/selenium/webdriver/remote/http/common.rb:67:in `call'
    1228:  # ./rb/lib/selenium/webdriver/remote/bridge.rb:685:in `execute'
    1229:  # ./rb/lib/selenium/webdriver/remote/features.rb:62:in `downloadable_files'
    1230:  # ./rb/lib/selenium/webdriver/common/driver_extensions/has_file_downloads.rb:27:in `downloadable_files'
    1231:  # ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:87:in `block (3 levels) in <module:Remote>'
    1232:  # ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:86:in `block (2 levels) in <module:Remote>'
    1233:  # ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:86:in `block (2 levels) in <module:Remote>'
    1234:  Finished in 21.04 seconds (files took 0.69833 seconds to load)
    1235:  7 examples, 1 failure
    1236:  Failed examples:
    1237:  rspec ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:84 # Selenium::WebDriver::Remote::Driver errors when not set
    ...
    
    1249:  Selenium::WebDriver::Remote::Driver
    1250:  exposes session_id
    1251:  exposes remote status
    1252:  Request#[] is deprecated and will be removed in a future version of Rack. Please use request.params[] instead
    1253:  uses a default file detector
    1254:  lists downloads
    1255:  downloads a file
    1256:  deletes downloadable files
    1257:  errors when not set (FAILED - 1)
    1258:  Failures:
    1259:  1) Selenium::WebDriver::Remote::Driver errors when not set
    1260:  Failure/Error:
    1261:  expect {
    1262:  driver.downloadable_files
    1263:  }.to raise_exception(Error::WebDriverError,
    1264:  'You must enable downloads in order to work with downloadable files.')
    1265:  expected Selenium::WebDriver::Error::WebDriverError with "You must enable downloads in order to work with downloadable files.", got #<Selenium::WebDriver::Error::UnknownError: Cannot find downloads file system for session id: 2a3cc8b... os.arch: 'amd64', os.version: '10.0', java.version: '17.0.11'
    1266:  Driver info: driver.version: unknown> with backtrace:
    1267:  # ./rb/lib/selenium/webdriver/remote/response.rb:63:in `add_cause'
    1268:  # ./rb/lib/selenium/webdriver/remote/response.rb:41:in `error'
    ...
    
    1274:  # ./rb/lib/selenium/webdriver/remote/http/common.rb:67:in `call'
    1275:  # ./rb/lib/selenium/webdriver/remote/bridge.rb:685:in `execute'
    1276:  # ./rb/lib/selenium/webdriver/remote/features.rb:62:in `downloadable_files'
    1277:  # ./rb/lib/selenium/webdriver/common/driver_extensions/has_file_downloads.rb:27:in `downloadable_files'
    1278:  # ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:87:in `block (3 levels) in <module:Remote>'
    1279:  # ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:86:in `block (2 levels) in <module:Remote>'
    1280:  # ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:86:in `block (2 levels) in <module:Remote>'
    1281:  Finished in 21.7 seconds (files took 0.67679 seconds to load)
    1282:  7 examples, 1 failure
    1283:  Failed examples:
    1284:  rspec ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:84 # Selenium::WebDriver::Remote::Driver errors when not set
    1285:  ================================================================================
    1286:  �[32m[3,152 / 3,163]�[0m 13 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/edge:profile-edge-remote; 32s ... (4 actions, 1 running)
    1287:  �[32m[3,152 / 3,163]�[0m 13 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/edge:profile-edge-remote; 42s ... (4 actions, 1 running)
    1288:  �[32m[3,152 / 3,163]�[0m 13 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/edge:profile-edge-remote; 46s ... (4 actions, 1 running)
    1289:  �[32m[3,152 / 3,163]�[0m 13 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:zipper-edge-remote; 39s ... (4 actions, 2 running)
    1290:  �[32m[3,153 / 3,163]�[0m 14 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:zipper-edge-remote; 40s ... (4 actions, 1 running)
    1291:  �[32m[3,153 / 3,163]�[0m 14 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:zipper-edge-remote; 50s ... (4 actions, 1 running)
    1292:  �[32m[3,153 / 3,163]�[0m 14 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:zipper-edge-remote; 52s ... (4 actions, 1 running)
    1293:  �[32m[3,153 / 3,163]�[0m 14 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/edge:driver-edge-remote; 24s ... (4 actions, 2 running)
    1294:  �[32m[3,154 / 3,163]�[0m 15 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/edge:driver-edge-remote; 25s ... (4 actions, 1 running)
    1295:  �[32m[3,154 / 3,163]�[0m 15 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/edge:driver-edge-remote; 36s ... (4 actions, 1 running)
    1296:  �[32m[3,154 / 3,163]�[0m 15 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/edge:driver-edge-remote; 38s ... (4 actions, 1 running)
    1297:  �[32m[3,154 / 3,163]�[0m 15 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/edge:options-edge-remote; 16s ... (4 actions, 2 running)
    1298:  �[32m[3,155 / 3,163]�[0m 16 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/edge:options-edge-remote; 18s ... (4 actions, 1 running)
    1299:  �[32m[3,155 / 3,163]�[0m 16 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/edge:options-edge-remote; 28s ... (4 actions, 1 running)
    1300:  �[32m[3,155 / 3,163]�[0m 16 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/edge:options-edge-remote; 30s ... (4 actions, 1 running)
    1301:  �[32m[3,155 / 3,163]�[0m 16 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:element-edge-remote; 35s ... (4 actions, 2 running)
    1302:  �[32m[3,156 / 3,163]�[0m 17 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:element-edge-remote; 36s ... (4 actions, 1 running)
    1303:  �[32m[3,156 / 3,163]�[0m 17 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:element-edge-remote; 47s ... (4 actions, 1 running)
    1304:  �[32m[3,156 / 3,163]�[0m 17 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:element-edge-remote; 50s ... (4 actions, 1 running)
    1305:  �[32m[3,156 / 3,163]�[0m 17 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:virtual_authenticator-edge-remote; 41s ... (4 actions, 2 running)
    1306:  �[32m[3,157 / 3,163]�[0m 18 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:virtual_authenticator-edge-remote; 42s ... (4 actions, 1 running)
    1307:  �[32m[3,157 / 3,163]�[0m 18 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:virtual_authenticator-edge-remote; 52s ... (4 actions, 1 running)
    1308:  �[32m[3,157 / 3,163]�[0m 18 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:virtual_authenticator-edge-remote; 55s ... (4 actions, 1 running)
    1309:  �[32m[3,157 / 3,163]�[0m 18 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/remote:element-edge-remote; 35s ... (4 actions, 2 running)
    1310:  �[32m[3,158 / 3,163]�[0m 19 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/remote:element-edge-remote; 36s ... (4 actions, 1 running)
    1311:  �[32m[3,158 / 3,163]�[0m 19 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/remote:element-edge-remote; 47s ... (4 actions, 1 running)
    1312:  �[32m[3,158 / 3,163]�[0m 19 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/remote:element-edge-remote; 50s ... (4 actions, 1 running)
    1313:  �[32m[3,158 / 3,163]�[0m 19 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:navigation-edge-remote; 32s ... (4 actions, 2 running)
    1314:  �[32m[3,159 / 3,163]�[0m 20 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:navigation-edge-remote; 33s ... (4 actions, 1 running)
    1315:  �[32m[3,159 / 3,163]�[0m 20 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:navigation-edge-remote; 44s ... (4 actions, 1 running)
    1316:  �[32m[3,159 / 3,163]�[0m 20 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:navigation-edge-remote; 46s ... (4 actions, 1 running)
    1317:  �[32m[3,159 / 3,163]�[0m 20 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:timeout-edge-remote; 19s ... (4 actions, 2 running)
    1318:  �[32m[3,160 / 3,163]�[0m 21 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:timeout-edge-remote; 20s ... (3 actions, 1 running)
    1319:  �[32m[3,160 / 3,163]�[0m 21 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:timeout-edge-remote; 30s ... (3 actions, 1 running)
    1320:  �[32m[3,160 / 3,163]�[0m 21 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:shadow_root-edge-remote; 18s ... (3 actions, 2 running)
    1321:  �[32m[3,161 / 3,163]�[0m 22 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:shadow_root-edge-remote; 20s ... (2 actions, 1 running)
    1322:  �[32m[3,161 / 3,163]�[0m 22 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:shadow_root-edge-remote; 30s ... (2 actions, 1 running)
    1323:  �[32m[3,161 / 3,163]�[0m 22 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:timeout-edge-remote; 23s local, disk-cache ... (2 actions running)
    1324:  �[32m[3,162 / 3,163]�[0m 23 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:shadow_root-edge-remote; 1s local, disk-cache
    1325:  �[32m[3,162 / 3,163]�[0m 23 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:shadow_root-edge-remote; 11s local, disk-cache
    1326:  �[32m[3,162 / 3,163]�[0m 23 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:shadow_root-edge-remote; 28s local, disk-cache
    1327:  �[32m[3,163 / 3,164]�[0m 24 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:script-edge-remote; 0s disk-cache
    1328:  �[32m[3,163 / 3,164]�[0m 24 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/bidi:script-edge-remote
    1329:  �[32m[3,163 / 3,164]�[0m 24 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:script-edge-remote; 1s local, disk-cache
    1330:  �[32m[3,163 / 3,164]�[0m 24 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:script-edge-remote; 14s local, disk-cache
    1331:  �[32m[3,164 / 3,165]�[0m 25 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:devtools-edge-remote; 1s disk-cache
    1332:  �[32m[3,164 / 3,165]�[0m 25 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:devtools-edge-remote
    1333:  �[32m[3,164 / 3,165]�[0m 25 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:devtools-edge-remote; 1s local, disk-cache
    1334:  �[32m[3,164 / 3,165]�[0m 25 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:devtools-edge-remote; 85s local, disk-cache
    1335:  �[32m[3,165 / 3,166]�[0m 26 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:browsing_context-edge-remote; 0s disk-cache
    1336:  �[32m[3,165 / 3,166]�[0m 26 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/bidi:browsing_context-edge-remote
    1337:  �[32m[3,165 / 3,166]�[0m 26 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:browsing_context-edge-remote; 1s local, disk-cache
    1338:  �[32m[3,165 / 3,166]�[0m 26 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:browsing_context-edge-remote; 14s local, disk-cache
    1339:  �[32m[3,166 / 3,167]�[0m 27 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:log_inspector-edge-remote; 0s disk-cache
    1340:  �[32m[3,166 / 3,167]�[0m 27 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/bidi:log_inspector-edge-remote
    1341:  �[32m[3,166 / 3,167]�[0m 27 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:log_inspector-edge-remote; 1s local, disk-cache
    1342:  �[32m[3,166 / 3,167]�[0m 27 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:log_inspector-edge-remote; 14s local, disk-cache
    1343:  �[32m[3,167 / 3,168]�[0m 28 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:bidi-edge-remote; 0s disk-cache
    1344:  �[32m[3,167 / 3,168]�[0m 28 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:bidi-edge-remote
    1345:  �[32m[3,167 / 3,168]�[0m 28 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:bidi-edge-remote; 1s local, disk-cache
    1346:  �[32m[3,167 / 3,168]�[0m 28 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:bidi-edge-remote; 14s local, disk-cache
    1347:  �[32mINFO: �[0mFound 29 test targets...
    1348:  �[32mINFO: �[0mElapsed time: 1641.160s, Critical Path: 790.32s
    1349:  �[32mINFO: �[0m2889 processes: 1450 disk cache hit, 1180 internal, 225 local, 34 worker.
    1350:  �[32mINFO: �[0mBuild completed, 1 test FAILED, 2889 total actions
    1351:  //rb/spec/integration/selenium/webdriver:action_builder-edge-remote      �[0m�[32mPASSED�[0m in 28.1s
    1352:  //rb/spec/integration/selenium/webdriver:bidi-edge-remote                �[0m�[32mPASSED�[0m in 14.5s
    1353:  //rb/spec/integration/selenium/webdriver:devtools-edge-remote            �[0m�[32mPASSED�[0m in 85.0s
    1354:  //rb/spec/integration/selenium/webdriver:driver-edge-remote              �[0m�[32mPASSED�[0m in 33.5s
    1355:  //rb/spec/integration/selenium/webdriver:element-edge-remote             �[0m�[32mPASSED�[0m in 29.4s
    1356:  //rb/spec/integration/selenium/webdriver:error-edge-remote               �[0m�[32mPASSED�[0m in 14.8s
    ...
    
    1371:  //rb/spec/integration/selenium/webdriver/bidi:browsing_context-edge-remote �[0m�[32mPASSED�[0m in 14.6s
    1372:  //rb/spec/integration/selenium/webdriver/bidi:log_inspector-edge-remote  �[0m�[32mPASSED�[0m in 14.6s
    1373:  //rb/spec/integration/selenium/webdriver/bidi:script-edge-remote         �[0m�[32mPASSED�[0m in 14.5s
    1374:  //rb/spec/integration/selenium/webdriver/edge:driver-edge-remote         �[0m�[32mPASSED�[0m in 33.7s
    1375:  //rb/spec/integration/selenium/webdriver/edge:options-edge-remote        �[0m�[32mPASSED�[0m in 21.7s
    1376:  //rb/spec/integration/selenium/webdriver/edge:profile-edge-remote        �[0m�[32mPASSED�[0m in 14.9s
    1377:  //rb/spec/integration/selenium/webdriver/edge:service-edge-remote        �[0m�[32mPASSED�[0m in 21.8s
    1378:  //rb/spec/integration/selenium/webdriver/remote:element-edge-remote      �[0m�[32mPASSED�[0m in 16.4s
    1379:  //rb/spec/integration/selenium/webdriver/remote:driver-edge-remote       �[0m�[31m�[1mFAILED�[0m in 3 out of 3 in 28.7s
    1380:  Stats over 3 runs: max = 28.7s, min = 28.2s, avg = 28.4s, dev = 0.2s
    1381:  D:/_bazel/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/remote/driver-edge-remote/test.log
    1382:  D:/_bazel/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/remote/driver-edge-remote/test_attempts/attempt_1.log
    1383:  D:/_bazel/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/remote/driver-edge-remote/test_attempts/attempt_2.log
    1384:  Executed 29 out of 29 tests: 28 tests pass and �[0m�[31m�[1m1 fails locally�[0m.
    1385:  There were tests whose specified size is too big. Use the --test_verbose_timeout_warnings command line option to see which ones these are.
    1386:  �[0m
    1387:  ##[error]Process completed with exit code 1.
    

    ✨ CI feedback usage guide:

    The CI feedback tool (/checks) automatically triggers when a PR has a failed check.
    The tool analyzes the failed checks and provides several feedbacks:

    • Failed stage
    • Failed test name
    • Failure summary
    • Relevant error logs

    In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:

    /checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}"
    

    where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.

    Configuration options

    • enable_auto_checks_feedback - if set to true, the tool will automatically provide feedback when a check is failed. Default is true.
    • excluded_checks_list - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.
    • enable_help_text - if set to true, the tool will provide a help message with the feedback. Default is true.
    • persistent_comment - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.
    • final_update_message - if persistent_comment is true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true.

    See more information about the checks tool in the docs.

    @VietND96 VietND96 merged commit a75cd4b into trunk Oct 15, 2024
    26 of 29 checks passed
    @VietND96 VietND96 deleted the ui-novnc-close-ws branch October 15, 2024 02:19
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    1 participant