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

Different results in production #508

Closed
JuanCaicedo opened this issue Jan 29, 2019 · 6 comments
Closed

Different results in production #508

JuanCaicedo opened this issue Jan 29, 2019 · 6 comments

Comments

@JuanCaicedo
Copy link

I've been seeing a problem with my builds in development that I'm not seeing in production 😀 Might be related to #485, but not sure

In development, I'm seeing this error ID known-issues already defined . I do not see the error in production. Note that I see the error in development even if I run a production build.

I'm fairly sure of how to fix this error, but right now what I would like to do is make sure that I have consistent results between development and production.

Is there something that could be swallowing this error in production? Are there any debugging tips you could recommend? Thank you!

@gjtorikian
Copy link
Owner

Hiya—would you be able to provide more information, such as, the full log output, or the directory of files that are producing the unexpected results?

@JuanCaicedo
Copy link
Author

Sure, here is a snippet from my dev build

$  bundle exec rake validate                                                                                                                                                 
Running ["HtmlCheck"] on ["./_site"] on *.html...                                    
                                                                                                                                                                                          
                                                                                                                                                                                          
Ran on 625 files!                                                                       
                                                        
                                                          
- ./_site/blog/page/6/index.html                                       
  *  ID overview already defined (line 716) 
... 
rake aborted!
HTML-Proofer found 69 failures!
/Users/juan/.rvm/gems/ruby-2.2.4/gems/html-proofer-3.0.5/lib/html-proofer/runner.rb:161:in `print_failed_tests'                                                                           
/Users/juan/.rvm/gems/ruby-2.2.4/gems/html-proofer-3.0.5/lib/html-proofer/runner.rb:43:in `run'                                                                                           
/Users/juan/code/td/circleci/circleci.com/Rakefile:147:in `block in <top (required)>'
/Users/juan/.rvm/gems/ruby-2.2.4/gems/bundler-1.17.1/lib/bundler/cli/exec.rb:74:in `load'
/Users/juan/.rvm/gems/ruby-2.2.4/gems/bundler-1.17.1/lib/bundler/cli/exec.rb:74:in `kernel_load'                                                                                          
/Users/juan/.rvm/gems/ruby-2.2.4/gems/bundler-1.17.1/lib/bundler/cli/exec.rb:28:in `run'
/Users/juan/.rvm/gems/ruby-2.2.4/gems/bundler-1.17.1/lib/bundler/cli.rb:463:in `exec'
/Users/juan/.rvm/gems/ruby-2.2.4/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'                                                                              
/Users/juan/.rvm/gems/ruby-2.2.4/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'                                                               
/Users/juan/.rvm/gems/ruby-2.2.4/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'                                                                                
/Users/juan/.rvm/gems/ruby-2.2.4/gems/bundler-1.17.1/lib/bundler/cli.rb:27:in `dispatch'
/Users/juan/.rvm/gems/ruby-2.2.4/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'                                                                              
/Users/juan/.rvm/gems/ruby-2.2.4/gems/bundler-1.17.1/lib/bundler/cli.rb:18:in `start'
/Users/juan/.rvm/gems/ruby-2.2.4/gems/bundler-1.17.1/exe/bundle:30:in `block in <top (required)>'                                                                                         
/Users/juan/.rvm/gems/ruby-2.2.4/gems/bundler-1.17.1/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'                                                                         
/Users/juan/.rvm/gems/ruby-2.2.4/gems/bundler-1.17.1/exe/bundle:22:in `<top (required)>'
/Users/juan/.rvm/gems/ruby-2.2.4/bin/bundle:23:in `load'
/Users/juan/.rvm/gems/ruby-2.2.4/bin/bundle:23:in `<main>'
/Users/juan/.rvm/gems/ruby-2.2.4/bin/ruby_executable_hooks:15:in `eval'
/Users/juan/.rvm/gems/ruby-2.2.4/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => validate
(See full trace by running task with --trace)

I didn't see much more useful information from including log_level: true, but I can include that if you want 👍

And in production

$ bundle exec rake validate
Running ["HtmlCheck"] on ["./_site"] on *.html... 
Ran on 625 files!


HTML-Proofer finished successfully.

@gjtorikian
Copy link
Owner

Hmm, two things:

  1. Am I correct in guessing that this run includes the check_html option? I can't find the already defined string anywhere in this lib, and that option always gives me grief by doing a lot of wacky things.
  2. If that's true, could I also see the text contents of _site/blog/page/6/index.html to verify whether or not there are two IDs called overview?

One possible discrepancy for this is that check_html relies on Nokogiri, so perhaps your dev and prod machines are running different Nokogiri versions. That might be a good debugging first step.

@JuanCaicedo
Copy link
Author

@gjtorikian Thanks for your responses!

  1. Yes, there are two IDs in that file 😀 I'm not trying fixing that error yet, I would first like for it to show up in my production build 😄

  2. Yes, we're running with check_html: true. I also suspected it could be Nokogiri so I ran this, which gave me the same value in production and in development. Perhaps this command is only reading from the gemfile though, and the actual version installed is different?

$ bundle show | grep nokogiri  
  * nokogiri (1.6.7.2)

@gjtorikian
Copy link
Owner

One thing that stands out is that Nokogiri, if possible, should be updated ASAP -- there have been a number of CVEs reported on anything below 1.8 as of late.

Otherwise, I'm sort of inclined to believe this is an environment issue. The error reporting is correct, and the error detection comes from a third-party library--that there's a discrepancy between two hosts is all a bit out of my control. 😿 What do you think?

@JuanCaicedo
Copy link
Author

I tried debugging this for a while, and had no luck ☹️ I also tried updating nokogiri up to 1.9.1 (couldn't go higher because of peer dependencies), but in still had the same problem.

However, I agree with you that this error probably isn't because of this tool, it must be something further down in the stack. Thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants