com.google.api.client.auth.oauth2.TokenResponseException: 401 Unauthorized

Google Groups | chri...@gmail.com (JIRA) | 5 months ago
  1. 0

    [JIRA] (JENKINS-36483) Unable to login with google-login plugin with 401 error

    Google Groups | 5 months ago | chri...@gmail.com (JIRA)
    com.google.api.client.auth.oauth2.TokenResponseException: 401 Unauthorized
  2. 0

    Attempting to use the plugin with no domain or specifying a domain, I see the following stack trace. com.google.api.client.auth.oauth2.TokenResponseException: 401 Unauthorized at com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:105) at com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:287) at com.google.api.client.auth.openidconnect.IdTokenResponse.execute(IdTokenResponse.java:120) at org.jenkinsci.plugins.googlelogin.GoogleOAuth2SecurityRealm$2.onSuccess(GoogleOAuth2SecurityRealm.java:173) at org.jenkinsci.plugins.googlelogin.OAuthSession.doFinishLogin(OAuthSession.java:99) at org.jenkinsci.plugins.googlelogin.GoogleOAuth2SecurityRealm.doFinishLogin(GoogleOAuth2SecurityRealm.java:225) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:324) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:167) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:100) at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:124) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876) at org.kohsuke.stapler.MetaClass$3.doDispatch(MetaClass.java:196) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649) at org.kohsuke.stapler.Stapler.service(Stapler.java:238) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:126) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:86) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:135) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249) at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30) 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.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) 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.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 winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

    Jenkins JIRA | 5 months ago | Christopher Eck
    com.google.api.client.auth.oauth2.TokenResponseException: 401 Unauthorized
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Google Drive - 401 error

    Stack Overflow | 5 months ago | Katelyn
    com.google.api.client.auth.oauth2.TokenResponseException: 401 Unauthorized

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.google.api.client.auth.oauth2.TokenResponseException

      401 Unauthorized

      at com.google.api.client.auth.oauth2.TokenResponseException.from()
    2. Google OAuth Client Library for Java
      IdTokenResponse.execute
      1. com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:105)
      2. com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:287)
      3. com.google.api.client.auth.openidconnect.IdTokenResponse.execute(IdTokenResponse.java:120)
      3 frames
    3. org.jenkinsci.plugins
      GoogleOAuth2SecurityRealm.doFinishLogin
      1. org.jenkinsci.plugins.googlelogin.GoogleOAuth2SecurityRealm$2.onSuccess(GoogleOAuth2SecurityRealm.java:173)
      2. org.jenkinsci.plugins.googlelogin.OAuthSession.doFinishLogin(OAuthSession.java:99)
      3. org.jenkinsci.plugins.googlelogin.GoogleOAuth2SecurityRealm.doFinishLogin(GoogleOAuth2SecurityRealm.java:225)
      3 frames
    4. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:606)
      4 frames
    5. Stapler
      Stapler.service
      1. org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:324)
      2. org.kohsuke.stapler.Function.bindAndInvoke(Function.java:167)
      3. org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:100)
      4. org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:124)
      5. org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      6. org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      7. org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      8. org.kohsuke.stapler.MetaClass$3.doDispatch(MetaClass.java:196)
      9. org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      10. org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      11. org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      12. org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
      13. org.kohsuke.stapler.Stapler.service(Stapler.java:238)
      13 frames
    6. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      1 frame
    7. Jetty
      ServletHandler$CachedChain.doFilter
      1. org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
      2. org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
      2 frames
    8. Hudson
      PluginServletFilter.doFilter
      1. hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
      2. hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:126)
      2 frames
    9. Jetty
      ServletHandler$CachedChain.doFilter
      1. org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      1 frame
    10. Hudson
      CrumbFilter.doFilter
      1. hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:86)
      1 frame
    11. Jetty
      ServletHandler$CachedChain.doFilter
      1. org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      1 frame
    12. Hudson
      ChainedServletFilter$1.doFilter
      1. hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      2. hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
      3. hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      3 frames
    13. jenkins.security
      ExceptionTranslationFilter.doFilter
      1. jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
      1 frame
    14. Hudson
      ChainedServletFilter$1.doFilter
      1. hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      1 frame
    15. Acegi Security Core
      AnonymousProcessingFilter.doFilter
      1. org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
      1 frame
    16. Hudson
      ChainedServletFilter$1.doFilter
      1. hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      1 frame
    17. Acegi Security Core
      RememberMeProcessingFilter.doFilter
      1. org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:135)
      1 frame
    18. Hudson
      ChainedServletFilter$1.doFilter
      1. hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      1 frame
    19. Acegi Security Core
      AbstractProcessingFilter.doFilter
      1. org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
      1 frame
    20. Hudson
      ChainedServletFilter$1.doFilter
      1. hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      1 frame
    21. jenkins.security
      BasicHeaderProcessor.doFilter
      1. jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
      1 frame
    22. Hudson
      ChainedServletFilter$1.doFilter
      1. hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      1 frame
    23. Acegi Security Core
      HttpSessionContextIntegrationFilter.doFilter
      1. org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
      1 frame
    24. Hudson
      HudsonFilter.doFilter
      1. hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
      2. hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      3. hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      4. hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
      4 frames
    25. Jetty
      ServletHandler$CachedChain.doFilter
      1. org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      1 frame
    26. Stapler
      CompressionFilter.doFilter
      1. org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
      1 frame
    27. Jetty
      ServletHandler$CachedChain.doFilter
      1. org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      1 frame
    28. Hudson
      CharacterEncodingFilter.doFilter
      1. hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
      1 frame
    29. Jetty
      ServletHandler$CachedChain.doFilter
      1. org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      1 frame
    30. Stapler
      DiagnosticThreadNameFilter.doFilter
      1. org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
      1 frame
    31. Jetty
      AbstractConnection$2.run
      1. org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      2. org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
      3. org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      4. org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553)
      5. org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
      6. org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
      7. org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
      8. org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      9. org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
      10. org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      11. org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      12. org.eclipse.jetty.server.Server.handle(Server.java:499)
      13. org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
      14. org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
      15. org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
      15 frames
    32. winstone
      BoundedExecutorService$1.run
      1. winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
      1 frame
    33. Java RT
      ThreadPoolExecutor$Worker.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      2 frames