Closed teohm closed 5 years ago
@teohm This is still in beta so it hasn't been fully tested on different CI setups however there is nothing specifically know that should stop it from working. If you can provide a way to reproduce your issue I'll be happy to look into it.
I'm experiencing this too with CircleCI
@baffers As mentioned in my previous answer -- if someone can provide a simple project that reproduces this behavior I'll be more than happy to take a look and figure out what's going wrong.
I totally understand, as soon as I wrote that comment I was like "they're going to want an example". it's kind of a weird week for me so if @teohm can't provide an example this week, I'll try to get one together next week
@baffers Sounds good -- one quick question, are you using the released gem or the master branch?
@twalpole master. Also, once I passed in headless: false
into the driver config my tests started running so I'm guessing there isn't a huge problem with Apparition, just my set up. I'm hitting some little bugs with other random things (eg, send_keys(:return)
blows up but send_keys(:enter)
works) but nothing that I can't work around.
@baffers Yeah - Looks like there's not currently a key definition for :return - so that would explain that. Please add issues for any other things you come across that don't behave correctly , and I'll get them fixed if possible.
FYI - there is :enter and :numpad_enter as two different options . - I've also added a :return alias for :enter which notifies the user that :return is deprecated - I assume you came from using capybara_webkit previously since it appears that's the only driver that supported using :return in the first place.
@teohm I had the same issue, it turns out these two options helped:
browser_options: {
'no-sandbox' => nil,
'disable-features' => 'VizDisplayCompositor'
},
the latter one found here
@skyeagle Thanks for that -- note you should also be able to pass that as
browser_options: [ :no_sandbox, disable_features: 'VizDisplayCompositor']
to reduce the need for all the nils (and strings vs symbols)
If anyone else can confirm whether or not those two options fix the issue for them, I'll go ahead and close this
@twalpole yes it did!
Great! - Closing this then.
@twalpole Just ran into this issue and the attempts listed above did not work for me. 😢
Here are the things I tried:
require 'capybara/apparition'
Capybara.register_driver :apparition do |app|
Capybara::Apparition::Driver.new(
app,
browser_options: {
'no-sandbox' => nil,
'disable-features' => 'VizDisplayCompositor'
}
)
end
Capybara.javascript_driver = :apparition
That didn't work.
Then I tried:
require 'capybara/apparition'
Capybara.register_driver :apparition do |app|
Capybara::Apparition::Driver.new(app, browser_options: [ :no_sandbox, disable_features: 'VizDisplayCompositor'])
end
Capybara.javascript_driver = :apparition
I get a timeout from Circle CI with this output:
bundle exec rspec --format progress $TEST_FILES
Requested historical based timing, but they are not present. Falling back to name based sorting
................................................Capybara starting Puma...
* Version 3.12.1 , codename: Llamas in Pajamas
* Min threads: 0, max threads: 4
* Listening on tcp://127.0.0.1:43099
Is there something I'm doing wrong?
I tried with both apparition v0.4.0 and apparition from master
Hey @etagwerker I'm sure if this will help but this is our config:
Capybara::Apparition::Driver.new(app, {
browser_logger: nil,
headless: true, # TO RUN A BROWSER LOCALLY, CHANGE TO FALSE
browser_options: [ :disable_gpu, :no_sandbox, disable_features: 'VizDisplayCompositor']
}
)
i was running to the same issue on gitlab/cicd and confirming here that options from @baffers helped. @twalpole I would add link to this issue from main README.md , it took me some time to come here
@twalpole :1st_place_medal: for this repo
Hi, can anyone confirm if this new driver runs properly on hosted CI such as CircleCI, TravisCI etc?
I'm just started to test it on CircleCI, my RSpec test suite just hang and timed out.