"Internal error occured" with Google Plus login integration

I am trying to integrate Google plus Login into my application in accordance with the instructions given at the following link: https://developers.google.com/+/quickstart/android#install-sdk

I fully comply with all instructions. And when I run the sample application on the real device presented in android-sdk and click on the signin button, it displays a Toast message that An internal error occurred

What am I doing wrong?

+42
android google-plus
Apr 02 '13 at 11:27
source share
20 answers

This can happen if you did not sign the client ID in the API console project or if you did not copy the wrong key value from keytool. This is done in the steps of the quick start guide in steps 7, 8, 9, and 10.

+31
Apr 02 '13 at 11:33
source share

I have this problem and even after creating 10 different client IDs with different SHA and package name, this will not work ... until I find out that you have to fill out the Consent screen .

According to the Google Developers console -

A consent screen will be displayed to users whenever you request access to their personal data using your customer ID.

Consent screen

+86
Mar 19 '14 at 12:18
source share

I solved the problem by removing .setScopes("PLUS_LOGIN") in PlusClient.Builder.

+16
Oct 17 '13 at 9:19
source share

I received this error message error in an Android app:

 An internal error occurred 

Summary:

Assuming you made a mistake by setting up negotiations between your android application and the Android API server giving you access. Most likely, this is due to the fact that you are not adding the correct package name or correcting the SHA1 fingerprint. I followed these steps to purge the wrong configuration and do everything right.

Steps to fix:

  • Go to google api console and log in: https://code.google.com/apis/console

  • Click the API Access tab.

  • Click the "Create another customer ID" button.

  • Select: "Installed application."

  • Select: Android switch.

  • Enter the name of the Android application package that displays the above error. You can find it at the top of the PlusSampleActivity.java code PlusSampleActivity.java . For me, this is com.google.android.gms.samples.plus

  • Get your SHA1 fingerprint value:

    but. Use the command keytool -list -v -keystore /home/el/.android/debug.keystore . Enter the password, if you never set it, the default password is "android".

    b. The SHA1 fingerprint is displayed on the screen, copy it.

  • Paste the above value into the field "Fingerprint of subscription certificate (SHA1):".

  • Click the "Create Customer ID" button.

  • Launch the Android app, click "Sign In".

You will now be presented with the "Sign in to the Google+ SDK with Google."

+10
Sep 12 '13 at 17:30
source share

In my case, the solution was to actually set the email address on the consent screen. Firstly, I was a little reluctant to choose my personal address, and for some strange reason, you can save the form without this part of the data without errors. After checking what others suggested, as soon as I set my email address on this form, it started working.

+4
Feb 10 '14 at 11:34
source share

I was looking for how to fix this during the day with full research without luck, in the end I was able to solve this problem using the following approach.

Before I start resolving this (at least as I worked for me), I must say that everything on the documentation is correct, and you do not need to change any lines of code or so. This seems like a bug in the cloud https://cloud.google.com/console

First, make sure you get the correct SHA1 and the name of your project, as described in the docs https://developers.google.com/+/quickstart/android

Now this error, as I noticed (at least for me), was that in my cloud console the project that I created was a long time ago with the old interface, and a few months ago I switched to the new GUI. When you get a new look at the cloud console, you will notice that new projects have an automatically generated project id such as atlantean-ares-331 , and old projects have a long integer value as the project id that is not visible. Therefore, if your project was created with the old GUI, and you just created a new client identifier for OAuth for this project, you will receive Toast "Internal Error" when trying to log in with Google.

How to fix

  • Go to the console with the clouds.
  • Create a new project, I would suggest a name like oldprojectname-Gplus
  • In the API section, enable the Google+ API
  • Make sure that none of your projects has the same package name on the OAuth Client Identifier as the one you will use otherwise, you will receive Error This client ID is globally unique and is already in use (you will have to delete the old OAuth client identifier with the same package name that you will use now).

  • Go to your credentials. Create a new client identifier for OAuth.

Installed Application

Android

Enter the name of your project and your SHA1

Done

+3
Jan 18 '14 at 15:50
source share

My solution to the problem was as follows.

I did everything I recommended, and there were no typos regarding the package name and SHA1 key. I also tried to remove the key and then add it again, but that did not help.

Which helped to remove the key and create a new project ( https://code.google.com/apis/console ), and then create the client ID (with package + sha1) again there. After that (5 seconds) everything worked on my Android device.

+2
Dec 20 '13 at 15:30
source share

This issue is related to permissions from the api console.

if you use the permission associated with SCOPE_PLUS_LOGIN, in the api console you must create two keys: one for the OAuth client ID and the other for the api public key.

+1
May 19 '14 at 5:40
source share

In my case, the problem was that I changed the name of the application package and did not update in the dev console.

+1
Mar 20 '15 at 10:52
source share

For me it was that I tried to use my production key when installing it using my debug key. Make sure you are using the correct SHA1 from the right keystore.

0
Dec 04 '13 at 15:58
source share

I turned around to Google IO 2013 and changed the initialization of PlusClient, then it works.

 public static final String AUTH_SCOPES[] = { Scopes.PLUS_LOGIN, "https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/developerssite" }; mPlusClient = new PlusClient.Builder(this, this, this) .setScopes(AUTH_SCOPES) .build(); 
0
Dec 12 '13 at 3:13
source share

Thanks Thano for the solution "Now this error, as I noticed (at least for me), was that in my cloud console the project that I created was long ago with the old interface, and a few months ago I switched to the new GUI As soon as you get a new view of the cloud console, you will notice that new projects have an autogenerated project identifier like this atlantean-ares-331, while old projects have a long integer value as a project identifier that is not displayed. Therefore, if your project was created with the old GUI, and you just created a new client identifier for OAuth for this project, you will get Toast "Internal Error" when trying to log in with Google.

0
Mar 04 '14 at 18:55
source share

Re-creating the project in the Google Console worked for me after several other attempts:

For some reason, my project did not have a project identifier (old console / new console?).

As Thano (above) suggested, I created a completely new project, created client identifiers, ... and then worked. Thanks for the advice!

0
Mar 05 '14 at 5:14
source share

Remember to use the built-in debug storage for testing. I had everything that worked correctly, but I installed my SHA1 production fingerprint in the repository in the Credentials in the Developer Console, which made it not work.

0
Jun 10 '14 at
source share

If you encounter this error when trying to run a sample application or "copy the project that you created on another machine that worked successfully in this case and gives such a pop-up error on another computer where you are trying to start, you can follow the method below and it will help.

If you are creating a testing / debugging application, then

1. Create a new SHA1 if you copy the project and run it on another computer for the package name and path provided for the keystore.

2. Change the ClientId in the developers console for the new SHA1 generated and run it on the new computer where you copied the project and tried to start it.

0
Aug 25 '14 at 9:46
source share

Something is often ignored - this is the name of the package. I want to clarify step 6 of Eric Leszczynski above (I cannot comment there): the required package is not an action package, but rather a package of your application manifest.

You can get the correct value from the root element of AndroidManifest.xml:

 <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.ntk.darkmoor" android:versionCode="1" android:versionName="1.0" > 

In this example, define "com.ntk.darkmoor" when creating the client ID

0
Dec 13 '14 at 16:15
source share

I had the same problem when I used SHA1 for debug.keystore for debugging and then exported my application, forgetting to create SHA1 for the keystore that I used to export my application.

0
Jul 12 '15 at 17:25
source share

It works for me when I connect the device and install apk from Android Studio. But now it works for me when I create .apk and install it from dropbox.

-one
Sep 13 '14 at 8:48
source share

I looked through all the answers provided here and others. In my case, the problem was also SHA-1. The reason I got the wrong SHA-1 is because my certtool export cert command.

I used to

 C:\Users\mysuername\.android SHA 1 signature keytool -exportcert -alias androiddebugkey -keystore "keystorepath" -list -v 

The problem was in the androiddebugkey variable. Here you must specify the name of the key that you use to sign the application.

 C:\Users\mysuername\.android SHA 1 signature keytool -exportcert -alias mykeyname -keystore "keystorepath" -list -v 

Hope this helps someone!

-one
Dec 08 '14 at 20:11
source share

To add to this long list of reasons, my problem was that I got the debugkey from the jks file, and not from the application.

Its always something small.

-one
Sep 02 '15 at 12:36
source share



All Articles