end of file reached (EOFError)
Balamuruganvsb opened this issue · 15 comments
Facing "end of file reached (EOFError)" before launching the application when running the automation in Jenkins machine. But, it works fine in the local system.
- Appium version (or git revision) that exhibits the issue: 1.10.0
- Desktop OS/version used to run Appium: macOS High Sierra
- Node.js version (unless using Appium.app|exe): v11.5.0
- Mobile platform/version under test: iOS
- Real device or emulator/simulator: Simulator iPhone X 12.0
Appium logs link: Appium logs.docx
Please attach the log as gist
Moved the issue to ruby client.
Did this happen from a particular Ruby library version?
You called promote_appium_methods
. The loop used much memory, I guess.
What class would you call as the argument? (If you can, could you share your Ruby code?)
@KazuCocoa Yes. It happens from this Ruby library version (2.4.1).
def start_app(filename,device_name,device_udid,wdalocalport,localport)
caps_config = {
platformName: "iOS",
deviceName: device_name, #update device as per your need
app: (File.join(File.dirname(FILE), filename)),
bundleId: "XXXX", #Mention the bundleid of your application
automationName: "XCUITest",
xcodeOrgId: "849UP4BSN8",
xcodeSigningId: "iPhone Developer",
# Runner: "Distribute",
noReset: "false",
fullReset: "false",
showIOSLog: "true",
autoAcceptAlerts: "false",
showXcodeLog: "true",
useNewWDA: "false",
timeout: "50000",
newCommandTimeout: "",
udid: device_udid,
usePrebuiltWDA: "true",
shouldUseTestManagerForVisibilityDetection: "false",
shouldUseSingletonTestManager: "false",
waitForQuiescence: "false",
resetOnSessionStartOnly: "true",
clearSystemFiles: 'true',
preventWDAAttachments: 'true',
bootstrapPath: '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent',
agentPath: '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj',
wdaLocalPort: wdalocalport }
appium_lib_config = {port: localport}
$opts={ caps: caps_config, appium_lib: appium_lib_config}
setup
end
def setup
Appium::Driver.new($opts)
Appium.promote_appium_methods Object
$driver.start_driver
#Makes all appium_lib methods accessible from steps
#Starts appium driver before the tests begin
end
Thanks.
Can you launch below console in your environment? It is also call Appium.promote_appium_methods Object
. Would like to know if it happens in the console on your environment.
https://github.com/appium/ruby_console
e.g. after installing the gem, try: arc toml appium.txt
appium.txt has below text
[caps]
platformName = "iOS"
platformVersion = "12.0"
deviceName = "iPhone Simulator"
browserName = "safari"
[appium_lib]
server_url = "http://127.0.0.1:4723/wd/hub"
@Balamuruganvsb Hi, this issue EOFError, did you manage to resolve this issue? I'm having the same when I tried to run my tests in Bitrise
I could see method_missing
word in the attached log. One possibility is that is related to.
Could someone try with https://github.com/KazuCocoa/ruby_lib_core/tree/commentout-method-missing ? The branch has been commented out the method missing used in this library.
@Balamuruganvsb Hi, this issue EOFError, did you manage to resolve this issue? I'm having the same when I tried to run my tests in Bitrise
I'm having this issue in Bitrise as well.
Can you specify #845 (comment) and run it?
If it is the cause, I would like to re-struct the method missing
I met similar issue. This error was http client in ruby net module. If the error is similar, maybe this is not this ruby client layer...
EOFError: EOFError: end of file reached
/Users/kazu/.rbenv/versions/2.6.2/lib/ruby/2.6.0/net/protocol.rb:225:in `rbuf_fill'
/Users/kazu/.rbenv/versions/2.6.2/lib/ruby/2.6.0/net/protocol.rb:191:in `readuntil'
/Users/kazu/.rbenv/versions/2.6.2/lib/ruby/2.6.0/net/protocol.rb:201:in `readline'
/Users/kazu/.rbenv/versions/2.6.2/lib/ruby/2.6.0/net/http/response.rb:40:in `read_status_line'
/Users/kazu/.rbenv/versions/2.6.2/lib/ruby/2.6.0/net/http/response.rb:29:in `read_new'
/Users/kazu/.rbenv/versions/2.6.2/lib/ruby/2.6.0/net/http.rb:1509:in `block in transport_request'
/Users/kazu/.rbenv/versions/2.6.2/lib/ruby/2.6.0/net/http.rb:1506:in `catch'
/Users/kazu/.rbenv/versions/2.6.2/lib/ruby/2.6.0/net/http.rb:1506:in `transport_request'
/Users/kazu/.rbenv/versions/2.6.2/lib/ruby/2.6.0/net/http.rb:1479:in `request'
/Users/kazu/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/selenium-webdriver-3.141.5926/lib/selenium/webdriver/remote/http/default.rb:129:in `response_for'
/Users/kazu/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/selenium-webdriver-3.141.5926/lib/selenium/webdriver/remote/http/default.rb:82:in `request'
/Users/kazu/GitHub/ruby_lib_core/lib/appium_lib_core/common/base/http_default.rb:81:in `call'
/Users/kazu/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/selenium-webdriver-3.141.5926/lib/selenium/webdriver/remote/bridge.rb:167:in `execute'
/Users/kazu/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/selenium-webdriver-3.141.5926/lib/selenium/webdriver/remote/w3c/bridge.rb:567:in `execute'
/Users/kazu/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/selenium-webdriver-3.141.5926/lib/selenium/webdriver/remote/w3c/bridge.rb:363:in `send_actions'
/Users/kazu/GitHub/ruby_lib_core/lib/appium_lib_core/common/base/driver.rb:805:in `perform_actions'
/Users/kazu/GitHub/ruby_lib_core/test/functional/android/webdriver/w3c_actions_test.rb:174:in `test_multiple_actions'
Was it fixed somehow? Facing the same error with appium 1.15.1 and ruby 2.6.3
No.
If it happens because of method missing logic, https://github.com/KazuCocoa/ruby_lib_core/tree/commentout-method-missing might help.
But anyone tried this branch for now... (I have no environment it could reproduce)
Hi @KazuCocoa. I'm also seeing this issue. I've tried your branch but I still get the error:
Minitest::UnexpectedError: EOFError: end of file reached
/Users/jy/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/net/protocol.rb:225:in `rbuf_fill'
/Users/jy/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/net/protocol.rb:191:in `readuntil'
/Users/jy/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/net/protocol.rb:201:in `readline'
/Users/jy/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/net/http/response.rb:40:in `read_status_line'
/Users/jy/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/net/http/response.rb:29:in `read_new'
/Users/jy/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/net/http.rb:1509:in `block in transport_request'
/Users/jy/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/net/http.rb:1506:in `catch'
/Users/jy/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/net/http.rb:1506:in `transport_request'
/Users/jy/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/net/http.rb:1479:in `request'
/Users/jy/.rvm/gems/ruby-2.6.3/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/http/default.rb:129:in `response_for'
/Users/jy/.rvm/gems/ruby-2.6.3/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/http/default.rb:82:in `request'
/Users/jy/.rvm/gems/ruby-2.6.3/bundler/gems/ruby_lib_core-401da9f24e08/lib/appium_lib_core/common/base/http_default.rb:81:in `call'
/Users/jy/.rvm/gems/ruby-2.6.3/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/bridge.rb:167:in `execute'
/Users/jy/.rvm/gems/ruby-2.6.3/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/oss/bridge.rb:587:in `execute'
/Users/jy/.rvm/gems/ruby-2.6.3/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/oss/bridge.rb:328:in `click_element'
/Users/jy/.rvm/gems/ruby-2.6.3/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/common/element.rb:74:in `click'
/Users/jy/mobile-tests/tests/basic_test.rb:11:in `go_back_a_screen'
/Users/jy/mobile-tests/tests/basic_test.rb:65:in `test_manual_txn_form_load'
I'm happy to help debug - just let me know if there's anything I can do.