google-cloud-platformgoogle-apigoogle-signingoogle-one-tap

Error: 10: Developer console is not set up correctly (Not Using Firebase) (One Tap sign-up)


I'm trying to implement Google's One Tap sign-up for my Android app in development. I am following Google's (quite outdated) official guide and so far everything has gone well, up until display of the sign-up UI where the onFailure listener returns an error when I build and run my app:

com.google.android.gms.common.api.ApiException: 10: Developer console is not set up correctly.

Here's my relevant code:

        oneTapClient = Identity.getSignInClient(this);
        signUpRequest = BeginSignInRequest.builder()
                .setAutoSelectEnabled(true)
                .setGoogleIdTokenRequestOptions(BeginSignInRequest.GoogleIdTokenRequestOptions.builder()
                        .setSupported(true)
                        .setServerClientId(getString(R.string.web_client_id))
                        .setFilterByAuthorizedAccounts(false)
                        .build())
                .build();

        // ActivityResultLauncher<IntentSenderReque... (irrelevant to issue)

        oneTapClient.beginSignIn(signUpRequest).addOnSuccessListener(this, result -> {
            IntentSenderRequest intentSenderRequest = new IntentSenderRequest.Builder(result.getPendingIntent().getIntentSender()).build();
            activityResultLauncher.launch(intentSenderRequest);
        }).addOnFailureListener(this, e -> {
            Log.d("/////", "Failed: " + e);
        }).addOnCanceledListener(this, () -> {
            Log.d("/////", "Canceled.");
        });

Now, as I have mentioned, I'm following the official guide and I haven't skipped a single step so the first thing I did was Google and research the error. It's at this point that I want to mention, I've reviewed every single answer to the following SO questions: 1 2 3 4 5 6 7 8 9 10 There are several, and I mean several duplicated answers that make it such a pain to find one that helps, people make a big deal about duplicated questions but I think these duplicated answers are really what needs moderation. Oh, and a lot of the answers that include code were usually deprecated and for the Legacy Google Sign In, or some other Google API and not One Tap (I still tried to see if the solutions would work regardless but to no avail).

To save everyone's time, I will address two answers that came up over and over again during my research.

  1. The client ID I input is the 'Web' client ID and not the Android client ID.
  2. SHA-1 was not asked for when making the web client ID but it was when making the android client, I did successfully create and input the correct SHA-1 as per this official guide and this (and more guides for fact-checking).

Some useful information to note: I only have one project, I do not have any variants other than the debug, and I am not using Firebase, this happens every time I run the app on my test device, the application ID is the same as the package name in the manifest, I've also tried regenerating the signed bundle.

If you have any ideas why I may be getting this error please let me know! It's been two days and I feel like I'm out of options...


Solution

  • Context: I put so much time and effort tinkering at my code and Google cloud console, and searching all over the internet to find a damn solution, I asked questions in SO (this one) and GCC and got no response, I then made a new project and copied exactly what I saw on a video tutorial, there was nothing unexpected but the new project did work so I have no idea what went wrong in my project.

    Answer: I didn't find any solutions so I gave up. I shut down my computer, went to sleep, and when I woke up I noticed my SHA-1 key had reset...

    I updated the cloud console, ran the code, and it just worked. I'm kinda pissed.

    Usually, I'd delete a question like this, but for anyone else who's in dire need like I was, here's what worked for me "turn it off and on".