Closed arthurnn closed 9 years ago
Does this happen when run in your browser with /teaspoon
? You can access a stack trace from there. Have you followed the upgrade notes?
Does this happen when run in your browser with /teaspoon
Nop, on the browser it works just fine.
Have you followed the upgrade notes?
Have you followed the upgrade notes?
yep.
Phantom is a black box, which makes debugging issues like this difficult.
I see you're using thin on port 5000. Can you please provide any other details specific to how you're running teaspoon
CLI?
Worth trying: bundle open teaspoon
and put a debugger/pry after this line to pause the teaspoon CLI. Grab the URL it provides you and open that in your browser.
Can you please post the contents of your teaspoon_env.rb
file?
I dont work for Shopify anymore, so I dont have access to the file. @rafaelfranca can you help out here?
I upgraded teaspoon some weeks ago. Let me see if this issue still happen and I'll provide the file. @arthurnn thank you for the heads up.
Yeah, it still happen but only locally, not in the CI. Here is the content of the file:
# Set RAILS_ROOT and load the environment if it's not already loaded.
unless defined?(Rails)
ENV['RAILS_ENV']='test'
ENV["RAILS_ROOT"] = File.expand_path("../../", __FILE__)
require File.expand_path("../../config/environment", __FILE__)
end
# Load mocha, so we can use stubs on magic lamps
require 'mocha/setup'
Teaspoon.configure do |config|
config.mount_at = "/teaspoon"
config.root = nil
config.asset_paths = ["test/javascripts"]
config.fixture_paths = ["test/javascripts/fixtures"]
config.asset_manifest += [/^unit\//, /teaspoon/, /mocha/, /test_suite_polyfills/]
config.suite(:default) do |suite|
suite.expand_assets = false
suite.use_framework :mocha
suite.matcher = "{test/javascripts,app/assets}/**/*_test.{js,js.coffee,coffee}"
suite.helper = "test_helper"
suite.stylesheets = ["teaspoon"]
end
config.asset_manifest += Teaspoon::Suite.all.map { |suite| "#{suite.helper}.js" }
config.server_port=5000
config.coverage do |coverage|
coverage.ignore = [%r{/lib/ruby/gems/}, %r{/vendor/assets/}, %r{/support/}, %r{/(.+)_helper.}]
end
end
Ok. Now I know the reason of the error. Teaspoon starts the server with bind only in 127.0.0.1. This doesn't work for our case because we access our assets using the local CDN that don't use the loopback interface.
@mikepack would you accept a PR to configure the Rack server host so we can bind to 0.0.0.0
?
@rafaelfranca absolutely. The port
is configurable, so it should be pretty easy follow that pattern.
Yeah, my oversight -- haven't had that sort of setup before, but seems reasonable.
:+1: I'll work on it
upgrading from 0.9.1 to 1.0.2 gives this error:
I wish I could provide more info, but I am not sure how/where to get a stacktrace of the error, also not sure if there is a verbose mode or something that could give me more info to debug the problem.
thanks