Programing

오류 : 상태 {statusCode = DEVELOPER_ERROR, 해결 방법 = null}

lottogame 2020. 9. 17. 18:52
반응형

오류 : 상태 {statusCode = DEVELOPER_ERROR, 해결 방법 = null}


나는 gplus 로그인을 사용하고 있으며 onActivityResult에있을 때이 오류가 발생합니다 ....

@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    callbackManager.onActivityResult(requestCode, resultCode, data);
    client.onActivityResult(requestCode, resultCode, data);

    if (requestCode == 0) {
        GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);
        if (result.isSuccess()) {

            GoogleSignInAccount acct = result.getSignInAccount();
//                Log.d("Result","details"+ acct.getDisplayName() + acct.getEmail());

            mEmail = acct.getEmail();
            String mFullName = acct.getDisplayName();
            String mGoogleplusId = acct.getId();


            SocialUser user = new SocialUser();
            user.setType("googleplus");

            user.setEmail(mEmail);
            user.setFullname(mFullName);
            user.setId(mGoogleplusId + "");
            loginParams.put("email_id", mEmail);
            loginParams.put("googlePlusId", mGoogleplusId);
            loginParams.put("full_name", mFullName);
            loginParams.put("registrationType", "googleplus");
            SignUpService(user);


        } else {
            Toast.makeText(CustomerLogIn.this, "Unable to fetch data, Proceed manually", Toast.LENGTH_SHORT).show();
        }
    }
}

그리고 버튼 클릭시 gplus 로그인을 요청하고 있습니다. 클릭 버튼에서 다음 코드가 실행됩니다 ....

 GoogleSignInOptions googleSignInOptions = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
            .requestEmail()
            .build();
    mGoogleApiClient = new GoogleApiClient.Builder(CustomerLogIn.this)

            .addApi(Auth.GOOGLE_SIGN_IN_API, googleSignInOptions)
            .build();


    Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);
    startActivityForResult(signInIntent, 0);

그리고 나는이 오류를 geetng입니다 ...

Status{statusCode=DEVELOPER_ERROR, resolution=null}

이 줄에 ....

GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);

해결책을 제안하십시오.


Firebase 콘솔 구성에 SHA1 키를 추가해야합니다. 다음과 같이 할 수 있습니다.

Firebase 콘솔 ( https://console.firebase.google.com )-> 프로젝트-> 구성-> 스크롤하여

여기에 이미지 설명 입력

Android 스튜디오에서 'Signin report'를 실행하는 SHA1 키를 찾을 수 있습니다.

여기에 이미지 설명 입력

그런 다음 "실행 탭"을보고 버튼을 클릭하십시오.

여기에 이미지 설명 입력

더 쉬운 방법이라고 생각합니다. 이 도움을 바랍니다.


Probably you created the configuration file using the SHA1 of your production token, use the androiddebugkey alias to gather the SHA1 corresponding to the debug version of your app and copy the configuration file to the 'app' directory, you should have both configuration files (one for debug purposes and another for production environment).

Based on the walkthrough published in https://developers.google.com/identity/sign-in/android/start


I had the same issue and I got it working by doing these steps:

1.Add DEBUG_KEYSTORE SHA1 fingerprint to the firebase project. use the following command(MAC/LINUX)

  keytool -exportcert -list -v \-alias androiddebugkey -keystore ~/.android/debug.keystore  

2.Now Generate a signed apk of your project. The process includes generating a keystore for your app's release version.

  Copy the path of the newly generated .jks file.

3.Now generate RELEASE_KEYSTORE SHA1 fingerprint using the following command

  keytool -list -v -keystore FULL_PATH_TOJKS_FILE -alias ALIAS_NAME

4.Copy the new SHA1 from the output and add it as another SHA1 fingerprint in your firebase application console.

Now you are good to go! ---- Hope! it helps.


여기에 이미지 설명 입력

The way I fixed it was by picking up the key corresponding to the highlighted text. Due to the confusing usage of the word 'server' in Firebase's documentation page I was picking up the Server key . Which was the reason for the problem.

You can find the key here.


I was having the same problem, how I solved it is that I had different applicationId in my gradle file than the package name in my manifest file. And I used to applicationId to create the json file. I had to change my package name to what my applicationId was and that fixed it for me.


Please Put correct json file in root of the android project
For more Refer here: http://coderzpassion.com/android-working-latest-google-plus-login-api/


Alternatively to the answers provided here, you can use Android Studio's Firebase Assistant to automatically add your SHA-1 to your project with the click of some buttons.

In Android Studio, go to Tools > Firebase > Select 'Authentication' and click the link that says 'Email and password authentication'.

This will bring you a little tutorial on how to integrate Authentication to your project, but since you've probably done all that, just click 'Connect to Firebase' and you're done.


It's an old question, but I have been stuck with error 10 (DEVELOPER_ERROR) lately, because I was using the Android client ID, I created in the google developer console.

The solution for me was to use the Android credentials in google developer console only to indicate the SHA key of my apk and to use the client ID of the Web application (!) credentials from the google developer console in my cordova application.

config.xml:

<plugin name="cordova-plugin-googleplus" spec="^5.3.0">
    <variable name="REVERSED_CLIENT_ID" value="com.googleusercontent.apps.[web-application-client-id]" />
    <variable name="WEB_APPLICATION_CLIENT_ID" value="[web-application-client-id].apps.googleusercontent.com" />
</plugin>

code:

window.plugins.googleplus.login(
    {
       'webClientId': '[web-application-client-id].apps.googleusercontent.com'
    }, 
    ...

I don't use firebase.


You might have generated and added wrong SHA1 key. Use following steps to generate SHA1 key in Android studio:

  1. Click on Gradle (From Right Side Panel, you will see Gradle Bar)
  2. Click on Refresh (Click on Refresh from Gradle Bar, you will see List Gradle scripts of your Project)
  3. Click on Your Project (Your Project Name form List (root))
  4. Click on Tasks
  5. Click on Android
  6. Double Click on signingReport (You will get SHA1 and MD5 in Run Bar(Sometimes it will be in Gradle Console))

Now add this SHA1 key in your firebase android project.


For me it was working when I first implemented it, but stopped after a few days of development, with the mentioned error message.

I've solved the issue with these steps:

  1. I have added the sha-256 fingerprint on top of the sha-1 fingerprint that I already had in the firebase console. (Not sure if this step is required)
  2. I have downloaded google-services.json file again and replaced the old file.
  3. re-installed the app

and it worked


I came across this error in my firebase app. It was fixed when I added therequestIdToken(activity.getString(R.string.default_web_client_id)) part below.

GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
        .requestEmail().requestIdToken(activity.getString(R.string.default_web_client_id))
        .build();

    apiClient = new GoogleApiClient.Builder(activity)
        .addConnectionCallbacks(this)
        .enableAutoManage(activity, this)
        .addApi(Auth.GOOGLE_SIGN_IN_API, gso)
        .build();

    Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(apiClient);
    activity.startActivityForResult(signInIntent, RC_GOOGLE_SIGN_IN);

I got this error when i updated my json config file with a new google account.

Uninstalling the application manually and reinstalling the app worked for me.


The error is caused because the SHA-1 checksum of the debug or release key is not included in the firebase/google console.

First generate key using following command:

keytool -list -v -keystore KEYSTORE_PATH -alias ALIAS_NAME

그런 다음 SHA-1 체크섬을 복사하고 다음으로 이동합니다.

Firebase 콘솔> 프로젝트> 앱 설정> 지문 추가


앱을 출시하는 모든 사람은 키 저장소 파일의 특수 지문이 필요합니다. 릴리스 버전에서만이 오류가 발생하는 이유는 당연합니다. Android에서 OAuth 2.0 용 SHA1 (서명 인증서 지문)을 얻는 방법은 무엇입니까?


Firebase 콘솔의 인증에서 Google 로그인을 활성화했는지 확인합니다.


이 줄에서 올바른 server_client_id사용하여 문제를 해결했습니다 .

String serverClientId = getString(R.string.server_client_id);

잘못된 코드를 사용했습니다.

참고 URL : https://stackoverflow.com/questions/37273145/error-statusstatuscode-developer-error-resolution-null

반응형