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

Opening account settings gives server error for newly created account via remote (federated/institutional/Shibboleth or OAuth or OIDC) login #9029

Closed
janvanmansum opened this issue Oct 6, 2022 · 5 comments · Fixed by #9030
Milestone

Comments

@janvanmansum
Copy link
Contributor

janvanmansum commented Oct 6, 2022

What steps does it take to reproduce the issue?

  • When does this issue occur?

    • The setting :ShowMuteOptions is set to true (crossed out by @pdurbin per comment below)
    • The user logs in with an external IdP and creates an account.
  • Which page(s) does it occurs on?

    • Notifications
    • Account Interformation
  • What happens?

    • An error message is displayed: "Internal Server Error - An unexpected error was encountered, no more information is available."

The server log contains the following stacktrace:

[#|2022-10-06T17:17:03.555+0200|WARNING|Payara 5.2022.3|javax.enterprise.web|_ThreadID=94;_ThreadName=http-thread-pool::jk-connector(4);_TimeMillis=1665069423555;_LevelValue=900;|
  StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
java.lang.NullPointerException
	at java.base/java.util.HashSet.<init>(HashSet.java:119)
	at edu.harvard.iq.dataverse.authorization.providers.builtin.DataverseUserPage.init(DataverseUserPage.java:177)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at com.sun.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:163)
	at com.sun.el.parser.AstValue.invoke(AstValue.java:261)
	at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:237)
	at org.jboss.weld.module.web.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40)
	at org.jboss.weld.module.web.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
	at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:65)
	at com.sun.faces.application.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:66)
	at com.sun.faces.application.ActionListenerImpl.getNavigationOutcome(ActionListenerImpl.java:82)
	at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:71)
	at javax.faces.component.UIViewAction.broadcast(UIViewAction.java:548)
	at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:847)
	at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1396)
	at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:58)
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:76)
	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
	at javax.faces.webapp.FacesServlet.executeLifecyle(FacesServlet.java:707)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:451)
	at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1637)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:331)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:211)
	at org.glassfish.tyrus.servlet.TyrusServletFilter.doFilter(TyrusServletFilter.java:282)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:253)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:211)
	at org.ocpsoft.rewrite.servlet.RewriteFilter.doFilter(RewriteFilter.java:226)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:253)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:211)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:757)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:577)
	at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:158)
	at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:372)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:239)
	at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:520)
	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:217)
	at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:182)
	at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:156)
	at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:201)
	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:95)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:260)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:177)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:109)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:88)
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:53)
	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:524)
	at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:89)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:94)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:33)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:114)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:569)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:549)
	at java.base/java.lang.Thread.run(Thread.java:829)

  • To whom does it occur (all users, curators, superusers)?

    • All users
  • What did you expect to happen?

    • Page should be displayed normally.

Which version of Dataverse are you using?

  • v5.11.1
  • v5.12

Any related open or closed issues to this bug report?

#7492

Screenshots:

image

@claudiodsf
Copy link
Contributor

Hello, we're having the same problem for accounts created via ORCiD.

When clicking on the notification link, the user gets an "Internal Server Error". The error disappears when the user confirms her email.

In our case, we didn't touch the option :ShowMuteOptions

Our Dataverse installation is 5.11.1

Here's the error log:

[2022-10-10T14:22:51.355+0200] [Payara 5.2022.3] [INFO] [] [edu.harvard.iq.dataverse.authorization.AuthenticationServiceBean] [tid: _ThreadID=75 _ThreadName=http-thread-pool::http-listener-1(3)] [timeMillis: 166
5404571355] [levelValue: 800] [[
  no user found using satriano@ipgp.fr]]

[2022-10-10T14:22:58.682+0200] [Payara 5.2022.3] [WARNING] [] [javax.enterprise.resource.webcontainer.jsf.lifecycle] [tid: _ThreadID=78 _ThreadName=http-thread-pool::http-listener-1(5)] [timeMillis: 1665404578682] [levelValue: 900] [[

  #{DataverseUserPage.init}: java.lang.NullPointerException
javax.faces.FacesException: #{DataverseUserPage.init}: java.lang.NullPointerException
        at com.sun.faces.application.ActionListenerImpl.getNavigationOutcome(ActionListenerImpl.java:96)
        at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:71)
        at javax.faces.component.UIViewAction.broadcast(UIViewAction.java:548)
        at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:847)
        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1396)
        at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:58)
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:76)
        at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
        at javax.faces.webapp.FacesServlet.executeLifecyle(FacesServlet.java:707)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:451)
        at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1637)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:331)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:211)
        at org.glassfish.tyrus.servlet.TyrusServletFilter.doFilter(TyrusServletFilter.java:282)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:253)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:211)
        at org.ocpsoft.rewrite.servlet.RewriteFilter.doFilter(RewriteFilter.java:226)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:253)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:211)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:757)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:577)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:158)
        at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:372)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:239)
        at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:520)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:217)
        at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:182)
        at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:156)
        at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:201)
        at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:95)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:260)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:177)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:109)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:88)
        at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:53)
        at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:524)
        at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:89)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:94)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:33)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:114)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:569)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:549)
        at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: javax.faces.el.EvaluationException: java.lang.NullPointerException
        at com.sun.faces.application.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:76)
        at com.sun.faces.application.ActionListenerImpl.getNavigationOutcome(ActionListenerImpl.java:82)
        ... 45 more
Caused by: java.lang.NullPointerException
        at java.base/java.util.HashSet.<init>(HashSet.java:119)
        at edu.harvard.iq.dataverse.authorization.providers.builtin.DataverseUserPage.init(DataverseUserPage.java:177)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at com.sun.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:163)
        at com.sun.el.parser.AstValue.invoke(AstValue.java:261)
        at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:237)
        at org.jboss.weld.module.web.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40)
        at org.jboss.weld.module.web.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
        at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:65)
        at com.sun.faces.application.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:66)
        ... 46 more
]]

@pdurbin
Copy link
Member

pdurbin commented Oct 12, 2022

@claudiodsf thanks for reporting this. The scenario you describe fits with what we're seeing.

We're discussing a couple potential fixes, both contributed by the community:

@pdurbin
Copy link
Member

pdurbin commented Oct 27, 2022

I just did a little testing with Shib and OAuth accounts. The bug is slightly different, which surprises me.

tl;dr - With Shib you see the error immediately after clicking "Create Account" but with OAuth you have to click "Notifications".

Shib

On https://demo.dataverse.org I had a colleague down the hall log in with his HarvardKey (Shibboleth) account.

After checking the box to accept terms and clicking "Create Account" he immediately saw an Internal Server Error. He didn't have to navigate anywhere, such as notifications.

Obviously, this is a poor first impression to leave a new user with!

He reloaded his browser and and error went away.

No screenshots. Please use your imagination. 😄

OAuth (GitHub)

Usually I use Shib to log into https://dataverse.harvard.edu but I just created a second account using GitHub (OAuth) to see if the bug is the same. Apparently it's slightly different. I didn't see an Internal Server Error after clicking "Create Account". When I clicked "Notifications" I saw Internal Server Error. (Still a terrible first impression.) I'll include some screenshots below.

Screen Shot 2022-10-27 at 2 14 35 PM
Screen Shot 2022-10-27 at 2 14 51 PM
Screen Shot 2022-10-27 at 2 15 24 PM
Screen Shot 2022-10-27 at 2 15 51 PM
Screen Shot 2022-10-27 at 2 15 58 PM
Screen Shot 2022-10-27 at 2 16 13 PM

@sergejzr
Copy link

sergejzr commented Oct 31, 2022

Hello, just to report that this issue (with shibboleth) happens regardless the value of ":ShowMuteOptions" in our case.
It remains after logging out/in, however, it disappears after restarting the browser.

The error appears at any of the pages:
dataverseuser.xhtml?selectTab=dataRelatedToMe
dataverseuser.xhtml?selectTab=notifications
dataverseuser.xhtml?selectTab=accountInfo
dataverseuser.xhtml?selectTab=apiTokenTab

@pdurbin
Copy link
Member

pdurbin commented Oct 31, 2022

@sergejzr yes, unfortunately, I think you're right.

@janvanmansum are you ok with me updating the title and description of this issue? :ShowMuteOptions is absent and therefore false by default. And yet on Harvard Dataverse, where the setting is absent, new remote users are still getting the 500 error and NullPointerException. I was hoping we could simply make :ShowMuteOptions false but like @sergejzr is saying, it won't help (it's already false for us). 😞

As a heads up, even thought this bug has been around since 5.11, we're planning to put out a patch release (5.12.1) instead of waiting for a larger, minor release (5.13), partially in response to this bug. Here's where we'll work on release notes:

@pdurbin pdurbin added this to the 5.12.1 milestone Oct 31, 2022
@pdurbin pdurbin changed the title Opening account settings gives server error for newly created account via federated login if ShowMuteOptions is on Opening account settings gives server error for newly created account via remote (federated/institutional/Shibboleth or OAuth or OIDC) login Nov 2, 2022
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

Successfully merging a pull request may close this issue.

4 participants