question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Updated to Gerrit 2.13.1 - NullPointerException when trying to use Google OAuth

See original GitHub issue

I upgraded my Gerrit instance to 2.13.1 from 2.12.4.

After upgrading, OAuth (Google) is not working anymore. Here is the exception that I am receiving when trying to login:

[2016-09-23 21:20:16,968] [HTTP-92] ERROR com.google.gerrit.pgm.http.jetty.HiddenErrorHandler : Error in GET /oauth?state=xgYNogCwihbbktYmV-u67YupTcYruWithQL_xxL94zw&code=4/bzXBCiXF1Q62H-jNMHzFQuEbC0qOPL1h8-PfklyGbnk
java.lang.NullPointerException
        at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:212)
        at com.google.gerrit.server.auth.oauth.OAuthTokenCache.put(OAuthTokenCache.java:80)
        at com.google.gerrit.httpd.auth.oauth.OAuthSession.login(OAuthSession.java:105)
        at com.google.gerrit.httpd.auth.oauth.OAuthWebFilter.doFilter(OAuthWebFilter.java:109)
        at com.google.gwtexpui.server.CacheControlFilter.doFilter(CacheControlFilter.java:73)
        at com.google.gerrit.httpd.RunAsFilter.doFilter(RunAsFilter.java:122)
        at com.google.gerrit.httpd.RequestMetricsFilter.doFilter(RequestMetricsFilter.java:60)
        at com.google.gerrit.httpd.AllRequestFilter$FilterProxy$1.doFilter(AllRequestFilter.java:136)
        at com.google.gerrit.httpd.AllRequestFilter$FilterProxy.doFilter(AllRequestFilter.java:105)
        at com.google.gerrit.httpd.RequestContextFilter.doFilter(RequestContextFilter.java:75)
        at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:120)
        at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:135)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
        at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
        at org.eclipse.jetty.server.Server.handle(Server.java:499)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
        at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
        at java.lang.Thread.run(Thread.java:745)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
davidocommented, Sep 28, 2016

@westhusing I just uploaded an emergency fix with mentioned reverts here: https://github.com/davido/gerrit-oauth-provider/releases/tag/v2.13.1.

0reactions
ambakshicommented, Sep 29, 2016

@davido Thanks! That totally worked and I understand the underlying problem now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

releases/2.13.md - homepage - Git at Google
working. Gerrit 2.13 introduces a new secondary index for accounts, and this must be. indexed offline before starting Gerrit:.
Read more >
Gerrit server goes down when uploading code,then get an ...
Now when somebody access the status:open page or upload code to this git repo will get an error:500 Internal server error. I have...
Read more >
Gerrit Trigger - Jenkins
The reason for this functionality is that a user would want to update a list of what to trigger on outside of Jenkins....
Read more >
Null Pointer Exception after a MergeValidationListener throws ...
java.lang.NullPointerException at com.google.gerrit.server.git.CodeReviewCommit.notes(CodeReviewCommit.java:69) at com.google.gerrit.server.git.MergeOp.
Read more >
Gerrit 2.14 Release
Fix incorrect response from the 'Put Config' project REST API. The response returned after updating the configuration was generated using the configuration that ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found