0

Devise is acting weird for the first time each day when a User tries to create a new User in our project. This is the server log from the exact moment the user clicks on the confirm link:

Started GET "/users/confirmation?confirmation_token=3F367iMzUm5y3ohbkykM" for 199.116.169.254 at 2014-07-22 15:34:29 +0000
Processing by Devise::ConfirmationsController#show as */*
  Parameters: {"confirmation_token"=>"3F367iMzUm5y3ohbkykM"}
Redirected to http://qa.nearshoreconnect.com/users/sign_in
Completed 302 Found in 228ms (ActiveRecord: 2.2ms)
Started GET "/users/sign_in" for 199.116.169.254 at 2014-07-22 15:34:29 +0000
Processing by Devise::SessionsController#new as */*
  Rendered layouts/_errors.html.erb (0.1ms)
  Rendered devise/sessions/new.html.erb within layouts/application (6.1ms)
  Rendered layouts/_shim.html.erb (0.4ms)
  Rendered layouts/_search_box.html.erb (1.2ms)
  Rendered layouts/_header_internet.html.erb (9.6ms)
  Rendered layouts/_footer_internet.html.erb (1.4ms)
Completed 200 OK in 29ms (Views: 27.5ms | ActiveRecord: 0.0ms | Solr: 0.0ms)
Started GET "/users/confirmation?confirmation_token=3F367iMzUm5y3ohbkykM" for 201.234.55.21 at 2014-07-22 15:34:30 +0000
Processing by Devise::ConfirmationsController#show as HTML
  Parameters: {"confirmation_token"=>"3F367iMzUm5y3ohbkykM"}
  Rendered layouts/_errors.html.erb (0.7ms)
  Rendered devise/confirmations/new.html.erb within layouts/application (3.9ms)
  Rendered layouts/_shim.html.erb (0.4ms)
  Rendered layouts/_search_box.html.erb (1.0ms)
  Rendered layouts/_header_internet.html.erb (2.6ms)
  Rendered layouts/_footer_internet.html.erb (1.3ms)
Completed 200 OK in 18ms (Views: 14.1ms | ActiveRecord: 0.3ms | Solr: 0.0ms)
Started GET "/assets/font.css" for 201.234.55.21 at 2014-07-22 15:34:30 +0000
Served asset /font.css - 304 Not Modified (0ms)

The validation token is checked twice. I'm overriding the confirm function in my User model. Is that the problem? The code:

  def confirm!
    super
    send_welcome_mail
  end
wurde
  • 2,487
  • 2
  • 20
  • 39
Flezcano
  • 1,647
  • 5
  • 22
  • 39
  • 1
    The 2 requests appear to originate from 2 different IPs: `199.116.169.254` vs `201.234.55.21`. Any thoughts on that? – pdobb Jul 22 '14 at 16:02
  • Oh, that is weird, well is the same user. In fact that user is our tester. He works from an office. Also I got the log from days ago, which I got after doing the same test with the same user, and the ip's are the same. Could you explain that? – Flezcano Jul 22 '14 at 16:19
  • 1
    I can't explain it :( – pdobb Jul 22 '14 at 17:23
  • Did you solve this? I note that the first `GET "/users/confirmation?...` request resulted in a redirect (302) to `/users/sign_in` and the second didn't. Apart from the different IPs discussed in previous comments, the first GET/redirect/GET requests are `as */*` and the third request (the second `GET "/users/confirmation?...` request) is `as HTML` which seems a bit of a strange difference. Are both these requests definitely coming from a single click on a confirmation link? – Tim Aug 16 '14 at 21:59

0 Answers0