Bug 830136 - System Error message when confirming from email after register new account.
System Error message when confirming from email after register new account.
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Website (Show other bugs)
2.x
Unspecified Unspecified
medium Severity high
: ---
: ---
Assigned To: Keith Shaw
libra bugs
: FutureFeature, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-08 06:40 EDT by Yujie Zhang
Modified: 2015-05-14 21:11 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-25 14:27:08 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Yujie Zhang 2012-06-08 06:40:32 EDT
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-10 23:06:15 EDT
Tested on devenv_1827, still has this issue.
Comment 2 Clayton Coleman 2012-06-11 00:24:07 EDT
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@redhat.com", "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@redhat.com", "email_verification_token"=>"9db3umGg293jKnCXT6LRiEjbetr5xktyAaJ5SgCm"}ESC[0m, code: ESC[1mESC[1m200ESC[0m, args: ESC[1mESC[1m{"emailAddress"=>"ccoleman+3@redhat.com", "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@redhat.com", "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@redhat.com"}
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 00:25:11 EDT
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 10:41:35 EDT
A fix for this was released to the QA environment Yesterday.
Comment 5 Yujie Zhang 2012-06-18 02:11:17 EDT
(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 11:01:38 EDT
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-19 22:32:15 EDT
(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 09:55:15 EDT
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 10:31:24 EDT
I'll pull the int logs.
Comment 10 Clayton Coleman 2012-06-20 10:48:30 EDT
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@redhat.com"}
  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@redhat.com"}
Confirmation response {"roles"=>["simple_authenticated"], "login"=>"yujzhang+ui899@redhat.com"}
  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@redhat.com"}ESC[0m, args: ESC[1mESC[1m{:key=>"KboPQwZcjKCf0O0MK7dGOvd2hHjpLKTxieJaEvUx", :emailAddress=>"yujzhang+ui899@redhat.com"}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 12:23:33 EDT
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 00:47:41 EDT
(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.