Bug 830136 - System Error message when confirming from email after register new account.
Summary: System Error message when confirming from email after register new account.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Website
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
: ---
Assignee: Keith Shaw
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-08 10:40 UTC by Yujie Zhang
Modified: 2015-05-15 01:11 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-25 18:27:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Yujie Zhang 2012-06-08 10:40:32 UTC
Description of problem:

After I registered a new account, I click the confirm link in email, but it will return "A system error has occured. If the problem persists, please contact Red Hat support." message. However, the account has actually been confirmed successfully for I can log in using the account and accept the term, so this is just about the wrong display of error message. For this will only effect the stage environment, so we set it low serverity.

Version-Release number of selected component (if applicable):

stg.openshift.redhat.com

How reproducible:always


Steps to Reproduce:
1.Go to openshift website
2.Register a new account
3.Confirm the url from email
  
Actual results:

It will return system error message.

Expected results:

The confirm process should be successful without error message.

Additional info:

Comment 1 Yujie Zhang 2012-06-11 03:06:15 UTC
Tested on devenv_1827, still has this issue.

Comment 2 Clayton Coleman 2012-06-11 04:24:07 UTC
Looks like a streamline bug.  Streamline is returning invalid_token when we pass the same token we were passing before.  

Checking captcha
Registration response {"emailAddress"=>"ccoleman+3", "email_verification_token"=>"9db3umGg293jKnCXT6LRiEjbetr5xktyAaJ5SgCm"}
  ESC[1mESC[33mStreamline call (765.3ms)ESC[0m ESC[1mESC[1mregisterESC[0m /wapps/streamline/registration.html [ response: ESC[1mESC[1m{"emailAddress"=>"ccoleman+3", "email_verification_token"=>"9db3umGg293jKnCXT6LRiEjbetr5xktyAaJ5SgCm"}ESC[0m, code: ESC[1mESC[1m200ESC[0m, args: ESC[1mESC[1m{"emailAddress"=>"ccoleman+3", "confirmationUrl"=>"https://ec2-23-20-107-39.compute-1.amazonaws.com/app/email_confirm", "secretKey"=>"c0ldW1n3", "promoCode"=>"", "password"=>"[FILTERED]", "passwordConfirmation"=>"[FILTERED]", "termsAccepted"=>"true"}ESC[0m ]
Confirmation URL: https://ec2-23-20-107-39.compute-1.amazonaws.com/app/email_confirm
Redirected to https://ec2-23-20-107-39.compute-1.amazonaws.com/app/account/complete
Completed 302 Found in 1135ms


Started GET "/app/account/complete" for 66.57.94.244 at Mon Jun 11 00:22:14 -0400 2012
[Barista] Compiling all scripts for barista
[Barista] Compiling all coffeescripts
[Barista] Copying all javascripts
  Processing by UserController#complete as HTML
Rendered layouts/_head.html.haml (223.1ms)
Rendered layouts/site/_stylesheets.html.haml (4.2ms)
Rendered layouts/simple/_header.html.haml (7.9ms)
Rendered layouts/site/_javascripts.html.haml (12.6ms)
Rendered user/create.html.haml within layouts/simple (273.4ms)
Completed 200 OK in 278ms (Views: 277.3ms)


Started GET "/app/email_confirm?key=9db3umGg293jKnCXT6LRiEjbetr5xktyAaJ5SgCm&emailAddress=ccoleman%2B3%40redhat.com" for 66.57.94.244 at Mon Jun 11 00:22:27 -0400 2012
[Barista] Compiling all scripts for barista
[Barista] Compiling all coffeescripts
[Barista] Copying all javascripts
  Processing by EmailConfirmController#confirm as HTML
  Parameters: {"emailAddress"=>"ccoleman+3", "key"=>"9db3umGg293jKnCXT6LRiEjbetr5xktyAaJ5SgCm"}
Confirmation response {"errors"=>["invalid_token"]}
  Ticket 
  ESC[1mESC[33mStreamline call (466.5ms)ESC[0m ESC[1mESC[1mconfirm_emailESC[0m /wapps/streamline/confirm.html [ response: ESC[1mESC[1m{"errors"=>["invalid_token"]}ESC[0m, code: ESC[1mESC[1m200ESC[0m, args: ESC[1mESC[1m{:key=>"9db3umGg293jKnCXT6LRiEjbetr5xktyAaJ5SgCm", :emailAddress=>"ccoleman+3"}
ESC[0m ]
Errors during confirmation baseA system error has occurred.  If the problem persists, please contact Red Hat support.

Comment 3 Clayton Coleman 2012-06-11 04:25:11 UTC
Keith, can you take a look at this?  This looks like a bug that has started occuring since the push to QA.

Comment 4 Keith Shaw 2012-06-15 14:41:35 UTC
A fix for this was released to the QA environment Yesterday.

Comment 5 Yujie Zhang 2012-06-18 06:11:17 UTC
(In reply to comment #4)
Not sure if the commit has finished, tested this issue on devenv_1850 and int.openshift.redhat.com, both still have this issue.

Comment 6 Keith Shaw 2012-06-19 15:01:38 UTC
This is fixed in the QA environment which I believe OpenShift uses as it's stg environment. This probably need to be verified in stg.openshift.redhat.com

Comment 7 Yujie Zhang 2012-06-20 02:32:15 UTC
(In reply to comment #6)
Tested this issue on int.openshift.redhat.com, still exists. I will test this issue on stage when it's ready, but please make sure it is fixed in case it will become a bloker on stage.

Comment 8 Keith Shaw 2012-06-20 13:55:15 UTC
Clayton, Do you have any idea what is going on here? This bug has been fixed in our QA environment.

Comment 9 Clayton Coleman 2012-06-20 14:31:24 UTC
I'll pull the int logs.

Comment 10 Clayton Coleman 2012-06-20 14:48:30 UTC
In the INT logs I'm seeing a few errors:

Started GET "/app/email_confirm?key=Orj1juaXgdD6666lkQj&emailAddress=mcao%2Bint11%40redhat.com" for 203
.114.244.88 at Tue Jun 19 23:06:04 -0400 2012
[Barista] Copying all javascripts
  Processing by EmailConfirmController#confirm as HTML
  Parameters: {"key"=>"Orj1juaXgdD6666lkQj", "emailAddress"=>"mcao+int11"}
  ESC[1mESC[33mStreamline call (558.5ms)ESC[0m ESC[1mESC[1mconfirm_emailESC[0m /wapps/streamline/confir
m.html [ code: ESC[1mESC[1m500ESC[0m, exception: ESC[1mESC[1mStandardErrorInvalid JSON string: '<html><
head><title>JBossWeb/2.0.0.GA_CP - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-ser
if;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:
white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;bac
kground-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background
-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-fa
mily:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {col
or : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The server encountered an internal error () that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.NullPointerException
        org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:583)
        org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
</pre></p><p><b>root cause</b> <pre>java.lang.NullPointerException
        com.redhat.www.streamline.controller.EmailConfirmationController.handleRequestInternal(EmailConfirmationController.java:94)

I'm also seeing a problem on our side that looks like a poorly handled exception:

Started GET "/app/email_confirm?key=KboPQwZcjKCf0O0MK7dGOvd2hHjpLKTxieJaEvUx&emailAddress=yujzhang%2Bui899%40redhat.com" for 203.114.244.88 at Tue Jun 19 22:29:07 -0400 2012
[Barista] Copying all javascripts
  Processing by EmailConfirmController#confirm as HTML
  Parameters: {"key"=>"KboPQwZcjKCf0O0MK7dGOvd2hHjpLKTxieJaEvUx", "emailAddress"=>"yujzhang+ui899"}
Confirmation response {"roles"=>["simple_authenticated"], "login"=>"yujzhang+ui899"}
  Ticket 0|f2gfJh9lbEPgXK1lZ0OEbza1q1QSosIpvMk
  ESC[1mESC[33mStreamline call (520.9ms)ESC[0m ESC[1mESC[1mconfirm_emailESC[0m /wapps/streamline/confirm.html [ code: ESC[1mESC[1m200ESC[0m, response: ESC[1mESC[1m{"roles"=>["simple_authenticated"], "login"=>"yujzhang+ui899"}ESC[0m, args: ESC[1mESC[1m{:key=>"KboPQwZcjKCf0O0MK7dGOvd2hHjpLKTxieJaEvUx", :emailAddress=>"yujzhang+ui899"}ESC[0m ]
Errors during confirmation baseA system error has occurred.  If the problem persists, please contact Red Hat support.

I'll follow up on the second exception, the first one is on your end Keith.

Comment 11 Clayton Coleman 2012-06-20 16:23:33 UTC
I pushed a fix to master to support Streamline returning either login or emailAddress.  Keith is following up on whether the return value from streamline changed via QA - if it did that's acceptable (login is better than emailAddress) because we now have code for both cases.

Comment 12 Yujie Zhang 2012-06-21 04:47:41 UTC
(In reply to comment #11)
Tested this issue on int.openshift.redhat.com and devenv_1860 today, this issue does not exist.


Note You need to log in before you can comment on or make changes to this bug.