Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 4 when clicking signIn #22

Open
mledwards opened this issue Nov 7, 2023 · 12 comments
Open

Error 4 when clicking signIn #22

mledwards opened this issue Nov 7, 2023 · 12 comments

Comments

@mledwards
Copy link

When running the signIn function, I'm getting this back when testing on my real android device

{"save":false,"callbackId":"62724367","pluginId":"CapacitorGameConnect","methodName":"signIn","success":false,"error":{"message":"4: "}}

Any ideas why?

@mledwards
Copy link
Author

Ah, I hadn't gone through the full OAuth consent screen process to send for verification. Will check back once that's verified.

@Ricardo385
Copy link
Collaborator

Hey @mledwards thanks for using the plugin! And yeah, this is a common error by Google Play Services for the Fingerprint Certificate. Also, when you have finished setting up all in Google Play Console don't forget to sign your APK and then install it in your phone. If you need help, don't hesitate to ping us!

@mledwards
Copy link
Author

Thanks, will do! I haven't made the fingerprint certificate yet, can I do that once I'm verified?

@mledwards
Copy link
Author

Or am I able to continue testing the Google Play services during verification if I sort the fingerprint certificate out? They said verification may take 3-5 weeks 😭

@Ricardo385
Copy link
Collaborator

@mledwards Hmm, you don't need to wait for any verification to create a fingerprint certificate. Follow the bullet 6 from the README for the Android setup https://github.com/openforge/capacitor-game-connect#setup-for-android

@Ricardo385
Copy link
Collaborator

Hey @mledwards I want to follow up on this, were you able to get the plugin work after get the certificate fingerprint and sign your APK?

@mledwards
Copy link
Author

mledwards commented Nov 15, 2023

Hi @Ricardo385 , still not having any luck.

I created OAuth credential in Google Console, run the keytool with my keystore, copied my SHA1 into the required field, saved.

Then I went back to Google Play, chose the credentials from the dropdown, clicked publish, waited for that to change from draft to published.

Then I went back to my code, added a test signIn button (see below). Loaded this up in my physical device. But it still comes back with Sending plugin error: {"save":false,"callbackId":"773919","pluginId":"CapacitorGameConnect","methodName":"signIn","success":false,"error":{"message":"4: "}}

This is the code I was running.

const signIn = async () => {
    try {
      const user = await CapacitorGameConnect.signIn();
      console.log("user", user);
    } catch (error) {
      console.log("error", error);
      console.log("error.message", error.message);
    }
  };

Any ideas?

@mledwards
Copy link
Author

@Ricardo385 Oh I just read your last message, will I only be able to test my play center functionality on the APK, not through android studio using the physical device option?

@Ricardo385
Copy link
Collaborator

Hey @mledwards sorry for the late response! Yes, that's correct. Unfortunately, Android will only allow you to test the Play Games functionality on a real device. See our docs in Testing Limitations where we explain this https://github.com/openforge/capacitor-game-connect#testing-limitations

But, is not a big deal to have your APK signed. Just build your APK as signed in Android Studio and that would be all.

Regards,

@mledwards
Copy link
Author

Ah ok. I read the testing limitations as if I can use the "physical device" option through android stydui. Not building the APK, and then installing it on my physical device.

@LDmitrii
Copy link

Hi, have same issue, @mledwards if you fix it, can you help me?

@mledwards
Copy link
Author

I've not managed to test this yet, been caught up on other projects. But it's definitely on my radar to test the sign in / leaderboard on my phone using an APK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants