"Element not found" exception in Jenkins box while script passing in local - watir

Im trying to read the text from a popup and assert it.The element is defined as
div(:cta_description, :class => 'homepage-clicktoactiavte-description')
And the method as
def rewards_popup_description
return cta_description_element.when_present.text.gsub(/[^$,.A-Za-z0-9]/," ")
end
This script passes successfully while running in local, but fails with the following exception while running directly on Jenkins box which is another windows machine.
And the customer sees the overlay popup message "$10 reward activated"
features/step_definitions/Loyalty_steps.rb:7
timed out after 30 seconds, Element not present in 30 seconds (Watir::Wait::TimeoutError)
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/watir-6.12.0/lib/watir/wait.rb:49:in `until'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/watir-6.12.0/lib/watir/wait.rb:126:in `wait_until'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/page-object-2.2.4/lib/page-object/elements/element.rb:133:in `when_present'
D:/Jenkins/workspace/cog-checkout-loyalty-nightly-cuke-tests/cuke-tests/features/support/pages/Frontend/Cotton_On/Loyalty_Page.rb:14:in `rewards_popup_description'
D:/Jenkins/workspace/cog-checkout-loyalty-nightly-cuke-tests/cuke-tests/features/step_definitions/Loyalty_steps.rb:9:in `block (2 levels) in '
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/page-object-2.2.4/lib/page-object/page_factory.rb:75:in `on_page'
D:/Jenkins/workspace/cog-checkout-loyalty-nightly-cuke-tests/cuke-tests/features/step_definitions/Loyalty_steps.rb:8:in `block in '
C:/Ruby24-x64/bin/cucumber:23:in `load'
C:/Ruby24-x64/bin/cucumber:23:in `'
features/Loyalty-AU.feature:122:in `And the customer sees the overlay popup message "$10 reward activated"'
Both the machines have same version of following packages
page-object (2.2.4)
watir (6.12.0)
watir-scroll (0.2.0)
watir-webdriver (0.9.9)
Both the machines use same version of chromedriver as well
$ chromedriver.exe -v
ChromeDriver 2.41.578737 (49da6702b16031c40d63e5618de03a32ff6c197e)
C:\Program Files (x86)\Google\Chrome\Application>chromedriver.exe -v
ChromeDriver 2.41.578737 (49da6702b16031c40d63e5618de03a32ff6c197e)
Any idea what could be wrong?
Note:-
I ran the script directly from Jenkins box. Its a Windows Server 2016 edition.When the script runs I can see the popup appears and its stays for 10seconds(configured time) and then disappears. Then it fails complaining "Element no found".
The local is Windows 7 machine..

Related

Azure DevOps Publish to the App Store TestFlight track fails with exit code 1

We are trying to publish the IPA to App Store. but task is getting failed with error code 1.
2021-12-22T13:40:44.9828920Z ##[section]Starting: Publish to the App Store TestFlight track
2021-12-22T13:40:44.9841780Z ==============================================================================
2021-12-22T13:40:44.9842160Z Task : Apple App Store Release
2021-12-22T13:40:44.9842730Z Description : Release an app to TestFlight or the Apple App Store
2021-12-22T13:40:44.9843080Z Version : 1.189.0
2021-12-22T13:40:44.9843340Z Author : Microsoft Corporation
2021-12-22T13:40:44.9843860Z Help : More Information
2021-12-22T13:40:44.9844350Z ==============================================================================
2021-12-22T13:40:45.2032820Z [command]/usr/local/opt/ruby#2.7/bin/gem install fastlane
2021-12-22T13:41:12.7283020Z Successfully installed fastlane-2.199.0
2021-12-22T13:41:12.7285250Z Parsing documentation for fastlane-2.199.0
2021-12-22T13:41:12.7287270Z Installing ri documentation for fastlane-2.199.0
2021-12-22T13:41:12.7288910Z Done installing documentation for fastlane after 23 seconds
2021-12-22T13:41:12.7290200Z 1 gem installed
2021-12-22T13:41:12.7637580Z [command]/usr/local/opt/ruby#2.7/bin/gem update fastlane -i /Users/runner/.gem-cache
2021-12-22T13:41:15.6010280Z Updating installed gems
2021-12-22T13:41:15.6010960Z Nothing to update
2021-12-22T13:41:15.6330030Z [command]/usr/local/lib/ruby/gems/2.7.0/bin/fastlane pilot upload --api_key_path /Users/runner/work/_temp/api_key***.json -i /Users/runner/work/r1/a/_Calendar-Mobile-Build/Calendar-MobileApp/ExtractedFiles/in.store.calendar.ipa -a in.store.calendar --skip_submission true --skip_waiting_for_build_processing true -p 1596887926
2021-12-22T13:41:18.3757000Z [13:41:18]: �[33mGet started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile�[0m
2021-12-22T13:41:24.9984700Z [13:41:24]: Sending anonymous analytics information
2021-12-22T13:41:25.0084340Z [13:41:24]: Learn more at https://docs.fastlane.tools/#metrics
2021-12-22T13:41:25.0085930Z [13:41:24]: No personal or sensitive data is sent.
2021-12-22T13:41:25.0087420Z [13:41:24]: You can disable this by adding opt_out_usage at the top of your Fastfile
2021-12-22T13:41:25.0342540Z
2021-12-22T13:41:25.0347110Z Looking for related GitHub issues on fastlane/fastlane...
2021-12-22T13:41:25.0347960Z
2021-12-22T13:41:25.5644610Z ➡️ Pilot fails using environment variables on GitHub
2021-12-22T13:41:25.5646070Z https://github.com//issues/18655 [open] 11 💬
2021-12-22T13:41:25.5646810Z 2 weeks ago
2021-12-22T13:41:25.5647060Z
2021-12-22T13:41:25.5681000Z ➡️ Pilot and deliver fails with "string contains null byte"
2021-12-22T13:41:25.5682210Z https://github.com//issues/18312 [closed] 7 💬
2021-12-22T13:41:25.5685140Z 12 Jul 2021
2021-12-22T13:41:25.5685600Z
2021-12-22T13:41:25.5687110Z ➡️ Deliver step gets stuck while running Transporter
2021-12-22T13:41:25.5688670Z https://github.com//issues/19428 [closed] 0 💬
2021-12-22T13:41:25.5689470Z 2 weeks ago
2021-12-22T13:41:25.5689810Z
2021-12-22T13:41:25.5690920Z and 8 more at: https://github.com/fastlane/fastlane/search?q=string%20contains%20null%20byte&type=Issues&utf8=✓
2021-12-22T13:41:25.5691290Z
2021-12-22T13:41:25.5692440Z 🔗 You can ⌘ + double-click on links to open them directly in your browser.
2021-12-22T13:41:25.5693940Z /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.199.0/spaceship/lib/spaceship/connect_api/token.rb:71:in initialize': [!] string contains null byte (ArgumentError) 2021-12-22T13:41:25.5695490Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.199.0/spaceship/lib/spaceship/connect_api/token.rb:71:in new'
2021-12-22T13:41:25.5696930Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.199.0/spaceship/lib/spaceship/connect_api/token.rb:71:in create' 2021-12-22T13:41:25.5698560Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.199.0/spaceship/lib/spaceship/connect_api/token.rb:49:in from_json_file'
2021-12-22T13:41:25.5700740Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.199.0/spaceship/lib/spaceship/connect_api/token.rb:33:in from' 2021-12-22T13:41:25.5702140Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.199.0/pilot/lib/pilot/manager.rb:23:in login'
2021-12-22T13:41:25.5703520Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.199.0/pilot/lib/pilot/manager.rb:19:in start' 2021-12-22T13:41:25.5704920Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.199.0/pilot/lib/pilot/build_manager.rb:17:in upload'
2021-12-22T13:41:25.5706370Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.199.0/pilot/lib/pilot/commands_generator.rb:67:in block (2 levels) in run' 2021-12-22T13:41:25.5707770Z from /usr/local/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/command.rb:187:in call'
2021-12-22T13:41:25.5709110Z from /usr/local/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/command.rb:157:in run' 2021-12-22T13:41:25.5710430Z from /usr/local/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in run_active_command'
2021-12-22T13:41:25.5711890Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.199.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:117:in run!' 2021-12-22T13:41:25.5713720Z from /usr/local/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in run!'
2021-12-22T13:41:25.5715210Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.199.0/pilot/lib/pilot/commands_generator.rb:167:in run' 2021-12-22T13:41:25.5716630Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.199.0/pilot/lib/pilot/commands_generator.rb:19:in start'
2021-12-22T13:41:25.5718090Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.199.0/fastlane/lib/fastlane/cli_tools_distributor.rb:114:in take_off' 2021-12-22T13:41:25.5719490Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.199.0/bin/fastlane:23:in <top (required)>'
2021-12-22T13:41:25.5720740Z from /usr/local/lib/ruby/gems/2.7.0/bin/fastlane:25:in load' 2021-12-22T13:41:25.5721910Z from /usr/local/lib/ruby/gems/2.7.0/bin/fastlane:25:in
'
2021-12-22T13:41:25.5723370Z /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.199.0/spaceship/lib/spaceship/connect_api/token.rb:71:in initialize': string contains null byte (ArgumentError) 2021-12-22T13:41:25.5724890Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.199.0/spaceship/lib/spaceship/connect_api/token.rb:71:in new'
2021-12-22T13:41:25.5727030Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.199.0/spaceship/lib/spaceship/connect_api/token.rb:71:in create' 2021-12-22T13:41:25.5728480Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.199.0/spaceship/lib/spaceship/connect_api/token.rb:49:in from_json_file'
2021-12-22T13:41:25.5729920Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.199.0/spaceship/lib/spaceship/connect_api/token.rb:33:in from' 2021-12-22T13:41:25.5731260Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.199.0/pilot/lib/pilot/manager.rb:23:in login'
2021-12-22T13:41:25.5732610Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.199.0/pilot/lib/pilot/manager.rb:19:in start' 2021-12-22T13:41:25.5734180Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.199.0/pilot/lib/pilot/build_manager.rb:17:in upload'
2021-12-22T13:41:25.5735680Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.199.0/pilot/lib/pilot/commands_generator.rb:67:in block (2 levels) in run' 2021-12-22T13:41:25.5737030Z from /usr/local/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/command.rb:187:in call'
2021-12-22T13:41:25.5738370Z from /usr/local/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/command.rb:157:in run' 2021-12-22T13:41:25.5739750Z from /usr/local/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in run_active_command'
2021-12-22T13:41:25.5741190Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.199.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:117:in run!' 2021-12-22T13:41:25.5742590Z from /usr/local/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in run!'
2021-12-22T13:41:25.5744360Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.199.0/pilot/lib/pilot/commands_generator.rb:167:in run' 2021-12-22T13:41:25.5745800Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.199.0/pilot/lib/pilot/commands_generator.rb:19:in start'
2021-12-22T13:41:25.5747260Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.199.0/fastlane/lib/fastlane/cli_tools_distributor.rb:114:in take_off' 2021-12-22T13:41:25.5748660Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.199.0/bin/fastlane:23:in <top (required)>'
2021-12-22T13:41:25.5749910Z from /usr/local/lib/ruby/gems/2.7.0/bin/fastlane:25:in load' 2021-12-22T13:41:25.5751100Z from /usr/local/lib/ruby/gems/2.7.0/bin/fastlane:25:in '
2021-12-22T13:41:25.5788050Z ##[error]Error: The process '/usr/local/lib/ruby/gems/2.7.0/bin/fastlane' failed with exit code 1
2021-12-22T13:41:25.5806900Z ##[section]Finishing: Publish to the App Store TestFlight track
(nice if you could space the output.. :)
I was experiencing this issue in my pipeline. The culprit is
2021-12-22T13:41:25.5723370Z /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.199.0/spaceship/lib/spaceship/connect_api/token.rb:71:in initialize': string contains null byte (ArgumentError) 2021-12-22T13:41:25.5724890Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.199.0/spaceship/lib/spaceship/connect_api/token.rb:71:in new'
Fastlane requires the .p8 key file in your service connection to be base64 encoded to use in the AppStoreRelease#1 task.
The issue is described here: https://github.com/microsoft/app-store-vsts-extension/issues/219
Try updating your service connection Key Content with a base64 encoded key. You can use the tool https://www.base64encode.org/ to complete online

NWJS (Node Webkit) app is not responding on Linux systems when I use it with Web Workers

NWJS Version: v.0.32.1 (Tested on different 0.31 versions also and 0.32.beta)
Operating System: Linux only. Tested on Ubuntu 16.04 LTS x64 and Elementary OS 0.4.1 Loki x64
Expected behaviour
The program must respond.
Actual behaviour
The program not responding and if I break it (Ctrl + C) i seen in console that messages:
[14399:14410:0802/142733.750943:ERROR:broker_posix.cc(104)] Error sending sync broker message: Broken pipe (32)
[14399:14410:0802/142733.761023:ERROR:broker_posix.cc(104)] Error sending sync broker message: Broken pipe (32)
[14399:14409:0802/142733.761203:ERROR:broker_posix.cc(104)] Error sending sync broker message: Broken pipe (32)
[14399:14409:0802/142733.761402:ERROR:broker_posix.cc(104)] Error sending sync broker message: Broken pipe (32)
[14399:14409:0802/142733.761801:ERROR:broker_posix.cc(104)] Error sending sync broker message: Broken pipe (32)
[14399:14410:0802/142733.761896:ERROR:broker_posix.cc(104)] Error sending sync broker message: Broken pipe (32)
But if I'am using nwjs-builder-phoenix and running SDK - working correctly.
How to reproduce
Prepare
Download and extract fake data to parsing: https://github.com/trofivan/myq-jobs-archive-parser/releases/download/v0.1.0/fake-data-big.zip
git clone https://github.com/trofivan/myq-jobs-archive-parser.git
cd myq-jobs-archive-parser
npm i
Working correctly (only with nwjs-builder-phoenix SDK)
npm start
In the opened window click Select folder to parse
Select folder with fake data
Wait some time while data will have parsed.
Use filters
Close the program
Working not correctly
npm run build.dist
cd dist/myq-jobs-archive-parser-0.1.3-linux-x64/
./myq-jobs-archive-parser
Select folder to parse and waiting some time.
The program does not respond.
Close program (Ctrl + C or [x] on the window) and see console output:
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
[16012:16023:0802/145405.677499:ERROR:broker_posix.cc(104)] Error sending sync broker message: Broken pipe (32)
[16012:16023:0802/145405.678176:ERROR:broker_posix.cc(104)] Error sending sync broker message: Broken pipe (32)
[16012:16012:0802/145405.679403:ERROR:broker_posix.cc(104)] Error sending sync broker message: Broken pipe (32)
[16012:16012:0802/145405.679587:ERROR:command_buffer_proxy_impl.cc(100)] ContextResult::kFatalFailure: AllocateAndMapSharedMemory failed
killall exe - to stop the process
PS:
If download nwjs from the official website, working not correctly with SDK version also.
On Linux system program not responded when comes to the game Web Worker: https://github.com/trofivan/myq-jobs-archive-parser/blob/master/src/middlewares/fetchJobs.js
When program not responding I'm can not open Chrome dev tools and get more info.

Critical error while starting Eclipse (neon-3-linux-gtk-x86_64) for Java EE developer

First of all, I tried to run eclipse (eclipse-jee-neon-3-linux-gtk-x86_64) normally. Each time, it showed a splash screen for few seconds and disappers. Then I check with terminal. Running in the terminal with command ./eclipse prints the error messages. I have attached the full terminal output below.
nalin#nalin:/opt/eclipse-neon$ ./eclipse
org.eclipse.m2e.logback.configuration: The org.eclipse.m2e.logback.configuration bundle was activated before the state location was initialized. Will retry after the state location is initialized.
(Eclipse:5741): GLib-CRITICAL **: g_base64_encode_step: assertion 'in != NULL' failed
Job found still running after platform shutdown. Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.epp.internal.mpc.ui.wizards.MarketplaceDropAdapter$1
Any idea what's going on ?

Chrome or Firefox fails to start on selenium node machine if the node is started from a shell script at the startup

I have a shell script to register the node machine to hub at startup.
The script contains:
java -jar ~/selenium/selenium-server.jar -role node -hub http://HUB_IP:4444/grid/register -browser browserName="firefox",maxInstances=5,Platform="LINUX",applicationName="VM_NAME" -browser browserName="chrome",maxInstances=5,Platform="LINUX",applicationName="VM_NAME" -Dwebdriver.chrome.driver=~/selenium/chromedriver
The script starts fine in the startup and even the node gets registered to hub, but, when I start a job from Jenkins its gives below error in case of Firefox:
FAILED CONFIGURATION: #BeforeClass setup
org.openqa.selenium.WebDriverException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
Error: no display specified
When I start a job from Jenkins its gives below error in case of Chrome:
FAILED CONFIGURATION: #BeforeClass setup
org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited abnormally
(Driver info: chromedriver=2.20.353124 (035346203162d32c80f1dce587c8154a1efa0c3b),platform=Linux 3.13.0-68-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Note:
1. Using later version of chrome, firefox & Selenium jar files
2. When the script is run manually, everything works fine.
3. Start up batch file in windows works fine without any problem.

Watir command to attach browser window does not work in radrails ide

I use the radrails ide for running watir tests. I have the following command:
ie.link(:text, "Task").click
ie1=Watir::IE.attach(:title, 'Task')
Using the above command I get the error:
E:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-classic-3.0.0/lib/watir-classic/ie-class.rb:760:in `rescue in attach_browser_window': Unable to locate a window with title of Task (Watir::Exception::NoMatchingWindowFoundException)
from E:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-classic-3.0.0/lib/watir-classic/ie-class.rb:755:in `attach_browser_window'
from E:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-classic-3.0.0/lib/watir-classic/ie-class.rb:157:in `_attach_init'
from E:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-classic-3.0.0/lib/watir-classic/ie-class.rb:151:in `attach'
from file.rb:31:in `<main>'
The Ruby version is 1.9.3, ie 8, html code of the page I want to attach -
<a id="sdmenu141" class="nodeSel" onclick="javascript: dmenu.s(141);" target="_self" href="javascript:configuredWindowOpen('../ROU/Mterou004p0001Form.do?resetFilter_‌​‌​action=','_blank','regular');">Task</a>
after clicking on the link in the first line of code it opens new browser window.
Also today I got a new error:
E:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-classic-3.0.0/lib/watir-classic/ie-cla‌​ss.rb:374:in method_missing': (in OLE method navigate': )
(WIN32OLERuntimeError) OLE error code:800700AA in <Unknown> <No Description> HRESULT error code:0x80020009
Exception occurred. from E:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-classic-3.0.0/lib/watir-classic/ie-cla‌​ss.rb:374:in goto' from file.rb:7:in <main>'
Well, the error message says it all: Unable to locate a window with title of Task.
To resolve this issue use Watir Web Driver.

Resources