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.

Google sign in error

See original GitHub issue

I have been trying to enable social logins for my website, facebook works fine but google sign in is giving me the below error:

java.lang.NullPointerException
    at org.mamute.auth.GoogleAPI.getSignupInfo(GoogleAPI.java:28)
    at org.mamute.controllers.LoginMethodManager.merge(LoginMethodManager.java:34)
    at org.mamute.controllers.GoogleAuthController.signUpViaGoogle(GoogleAuthController.java:31)
    at org.mamute.controllers.GoogleAuthController$Proxy$_$$_WeldClientProxy.signUpViaGoogle(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor221.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at net.vidageek.mirror.provider.java.PureJavaMethodReflectionProvider.invoke(PureJavaMethodReflectionProvider.java:38)
    at net.vidageek.mirror.invoke.MethodHandlerByMethod.withArgs(MethodHandlerByMethod.java:54)
    at br.com.caelum.vraptor.observer.ExecuteMethod.execute(ExecuteMethod.java:87)
    at br.com.caelum.vraptor.actioncache.events.CachedExecuteMethod.access$001(CachedExecuteMethod.java:24)
    at br.com.caelum.vraptor.actioncache.events.CachedExecuteMethod$1.run(CachedExecuteMethod.java:44)
    at br.com.caelum.vraptor.actioncache.events.ExecuteIfNoCache.execute(ExecuteIfNoCache.java:32)
    at br.com.caelum.vraptor.actioncache.events.CachedExecuteMethod.execute(CachedExecuteMethod.java:41)
    at sun.reflect.GeneratedMethodAccessor127.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:90)
    at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:271)
    at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:258)
    at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:237)
    at org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:174)
    at org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:170)
    at org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:124)
    at org.jboss.weld.event.EventImpl.fire(EventImpl.java:84)
    at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:78)
    at org.mamute.providers.GlobalInterceptor.intercept(GlobalInterceptor.java:28)
    at org.mamute.providers.GlobalInterceptor$Proxy$_$$_WeldClientProxy.intercept(Unknown Source)
    at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:58)
    at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83)
    at org.mamute.interceptors.InternalErrorInterceptor.intercept(InternalErrorInterceptor.java:37)
    at org.mamute.interceptors.InternalErrorInterceptor$Proxy$_$$_WeldClientProxy.intercept(Unknown Source)
    at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:58)
    at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83)
    at org.mamute.interceptors.RulesInterceptor.intercept(RulesInterceptor.java:49)
    at org.mamute.interceptors.RulesInterceptor$Proxy$_$$_WeldClientProxy.intercept(Unknown Source)
    at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:58)
    at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83)
    at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:60)
    at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83)
    at org.mamute.interceptors.RedirectCommitInterceptor.intercept(RedirectCommitInterceptor.java:39)
    at org.mamute.interceptors.RedirectCommitInterceptor$Proxy$_$$_WeldClientProxy.intercept(Unknown Source)
    at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:58)
    at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83)
    at br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor.intercept(ExceptionHandlerInterceptor.java:75)
    at br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor$Proxy$_$$_WeldClientProxy.intercept(Unknown Source)
    at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:58)
    at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83)
    at br.com.caelum.vraptor.core.DefaultInterceptorStack$Proxy$_$$_WeldClientProxy.next(Unknown Source)
    at br.com.caelum.vraptor.interceptor.DefaultSimpleInterceptorStack.next(DefaultSimpleInterceptorStack.java:49)
    at br.com.caelum.vraptor.interceptor.DefaultSimpleInterceptorStack$Proxy$_$$_WeldClientProxy.next(Unknown Source)
    at org.mamute.providers.TransactionInterceptor.intercept(TransactionInterceptor.java:42)
    at org.mamute.providers.TransactionInterceptor$Proxy$_$$_WeldClientProxy.intercept(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor124.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at net.vidageek.mirror.provider.java.PureJavaMethodReflectionProvider.invoke(PureJavaMethodReflectionProvider.java:38)
    at net.vidageek.mirror.invoke.MethodHandlerByMethod.withArgs(MethodHandlerByMethod.java:54)
    at br.com.caelum.vraptor.interceptor.StepInvoker.invokeMethod(StepInvoker.java:49)
    at br.com.caelum.vraptor.interceptor.StepInvoker.tryToInvoke(StepInvoker.java:40)
    at br.com.caelum.vraptor.interceptor.StepInvoker$Proxy$_$$_WeldClientProxy.tryToInvoke(Unknown Source)
    at br.com.caelum.vraptor.interceptor.InterceptorExecutor.executeAround(InterceptorExecutor.java:75)
    at br.com.caelum.vraptor.interceptor.InterceptorExecutor$Proxy$_$$_WeldClientProxy.executeAround(Unknown Source)
    at br.com.caelum.vraptor.interceptor.AspectStyleInterceptorHandler.execute(AspectStyleInterceptorHandler.java:85)
    at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83)
    at br.com.caelum.vraptor.core.DefaultInterceptorStack$Proxy$_$$_WeldClientProxy.next(Unknown Source)
    at br.com.caelum.vraptor.interceptor.DefaultSimpleInterceptorStack.next(DefaultSimpleInterceptorStack.java:49)
    at br.com.caelum.vraptor.interceptor.DefaultSimpleInterceptorStack$Proxy$_$$_WeldClientProxy.next(Unknown Source)
    at br.com.caelum.vraptor.simplemail.AsyncMailerFlushInterceptor.intercept(AsyncMailerFlushInterceptor.java:33)
    at br.com.caelum.vraptor.simplemail.AsyncMailerFlushInterceptor$Proxy$_$$_WeldClientProxy.intercept(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor123.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at net.vidageek.mirror.provider.java.PureJavaMethodReflectionProvider.invoke(PureJavaMethodReflectionProvider.java:38)
    at net.vidageek.mirror.invoke.MethodHandlerByMethod.withArgs(MethodHandlerByMethod.java:54)
    at br.com.caelum.vraptor.interceptor.StepInvoker.invokeMethod(StepInvoker.java:49)
    at br.com.caelum.vraptor.interceptor.StepInvoker.tryToInvoke(StepInvoker.java:40)
    at br.com.caelum.vraptor.interceptor.StepInvoker$Proxy$_$$_WeldClientProxy.tryToInvoke(Unknown Source)
    at br.com.caelum.vraptor.interceptor.InterceptorExecutor.executeAround(InterceptorExecutor.java:75)
    at br.com.caelum.vraptor.interceptor.InterceptorExecutor$Proxy$_$$_WeldClientProxy.executeAround(Unknown Source)
    at br.com.caelum.vraptor.interceptor.AspectStyleInterceptorHandler.execute(AspectStyleInterceptorHandler.java:85)
    at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83)
    at org.mamute.interceptors.PimpMyControllerInterceptor.intercept(PimpMyControllerInterceptor.java:31)
    at org.mamute.interceptors.PimpMyControllerInterceptor$Proxy$_$$_WeldClientProxy.intercept(Unknown Source)
    at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:58)
    at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83)
    at org.mamute.interceptors.BlockedIpInterceptor.intercept(BlockedIpInterceptor.java:44)
    at org.mamute.interceptors.BlockedIpInterceptor$Proxy$_$$_WeldClientProxy.intercept(Unknown Source)
    at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:58)
    at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83)
    at br.com.caelum.brutauth.interceptors.BrutauthMapInterceptor.intercept(BrutauthMapInterceptor.java:36)
    at br.com.caelum.brutauth.interceptors.BrutauthMapInterceptor$Proxy$_$$_WeldClientProxy.intercept(Unknown Source)
    at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:58)
    at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83)
    at br.com.caelum.vraptor.interceptor.AspectStyleInterceptorHandler.execute(AspectStyleInterceptorHandler.java:88)
    at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83)
    at br.com.caelum.vraptor.interceptor.FlashInterceptor.intercept(FlashInterceptor.java:98)
    at br.com.caelum.vraptor.interceptor.FlashInterceptor$Proxy$_$$_WeldClientProxy.intercept(Unknown Source)
    at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:58)
    at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83)
    at br.com.caelum.vraptor.core.DefaultInterceptorStack.start(DefaultInterceptorStack.java:93)
    at br.com.caelum.vraptor.core.DefaultInterceptorStack$Proxy$_$$_WeldClientProxy.start(Unknown Source)
    at br.com.caelum.vraptor.observer.RequestHandlerObserver.handle(RequestHandlerObserver.java:93)
    at org.mamute.infra.locale.CustomRequestHandlerObserver.handle(CustomRequestHandlerObserver.java:42)
    at sun.reflect.GeneratedMethodAccessor91.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:90)
    at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:271)
    at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:258)
    at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:237)
    at org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:174)
    at org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:170)
    at org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:124)
    at org.jboss.weld.event.EventImpl.fire(EventImpl.java:84)
    at br.com.caelum.vraptor.VRaptor.doFilter(VRaptor.java:123)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1336)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:483)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:521)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:233)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:412)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
    at org.eclipse.jetty.server.Server.handle(Server.java:351)
    at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:451)
    at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:916)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:634)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
    at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:76)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:609)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:45)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
    at java.lang.Thread.run(Thread.java:745)

Any ideas? From the error, it seems the error is due to the mismatch in the response from Google and what mamute expects.

This is what my mamute.properties looks like (don’t worry these values aren’t exact):

google.client_id=4423s260-91bnouc55p2fl1m.apps.googleusercontent.com
google.redirect_uri=/sign-up/google/
google.client_secret=sG6SL0wrqDinEiO4

You can even see how it looks.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mgomezchcommented, Jan 18, 2017

We ran into this. Turns out the API was yielding thus:

{
  "domain": "usageLimits",
  "reason": "accessNotConfigured",
  "message": "Access Not Configured. Google+ API has not been used in project XXXX before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/plus/overview?project=XXXX then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
  "extendedHelp": "https://console.developers.google.com/apis/api/plus/overview?project=XXXX"
}

Note the API used for Google login is Google+, not Gmail. We solved this easily by activating the Google+ API as suggested in that error message.

To get that message, we added this to getSignupInfo, right after the first line:

if (true) {
    try {
        throw new Exception(jsonObject.toString());
    } catch (Exception e) {
        throw new RuntimeException(e);
    }
}

(the if (true) is required to prevent the rest of the function being considered dead code, and the silly try/catch/throw game avoids an error from throwing unchecked exceptions)

With that, the API error message showed up in standard output along with the traceback. This uninformative error message could be avoided with better error handling and better use of Optional in getSignupInfo.

0reactions
rampatracommented, Feb 16, 2018

Let me modify the code to see the actual error message as you said above.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't sign in to your Google Account
If you can't sign in to your Google Account in Gmail, Google Drive, Google Play, or elsewhere, select the issue that most closely...
Read more >
Troubleshooting | Authentication - Google Developers
Warning: The Google Sign-In JavaScript platform library for Web is deprecated, and unavailable for download after March 31, 2023.
Read more >
Google down? Realtime status, issues and outages
Real-time problems for Google. Is the server down? Login not working? Here you see what is going on.
Read more >
Resolve app installation errors in Google Play Store
Clear the Google Play Store cache · Open the Settings menu on your device. · Go to Apps or Application Manager. · Scroll...
Read more >
One account. All of Google. - Sign in - Google Accounts
One account. All of Google. Sign in with your Google Account. Enter your email. Find my account · Sign in with a different...
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