playgameservices / play-games-plugin-for-unity

Google Play Games plugin for Unity
Other
3.47k stars 966 forks source link

Unity game crashing on mobile when GPGS authenticate #2310

Open VNA-DJ opened 6 years ago

VNA-DJ commented 6 years ago

Google could find any solution for this. Same problem all version. I built my game from unity and I openes it but then my game crashing when authanticate. What can i do for solution? I looked to aLogCat but there is no any error

ManuelRauber commented 6 years ago

This has helped me: https://github.com/playgameservices/play-games-plugin-for-unity/issues/2254#issuecomment-408709979

Still, I'm getting an authentication failed afterwards.

VNA-DJ commented 6 years ago

bu login is always failed

ghost commented 6 years ago

This has helped me: #2254 (comment)

Still, I'm getting an authentication failed afterwards.

Let me try to help you. Once you have fixed the issue with the game crashing, you need to resolve the new problem with the authentication.

1) Open the developer console Developer Console 2) Make sure you have selected appropriate project (in the top left corner) 3) Go to the "Credentials" tab (at the left side) 4) Click the available client id for Android (it should be located below 'OAuth 2.0 client IDs') - Remember this tab! 5) In the separate window open google play console 6) Select your project 7) Move to 'Release Management' > 'App signing' 8) Copy SHA-1 certificate fingerprint from the "Upload certificate" table (second one, not the first one!) (in my case it was something like "2D:5H:1L:71:79:13:23:DA:4G:2H:23:G2:7C:16:L1:F7:J8:6A:51:2G" 9) Go back to the Developer Console tab (4th step) 10) Paste SHA-1 certificate fingerprint into the "Signing-certificate fingerprint" input field 11) Save the changes 12) Try to check it again. It should work :)

I'm using the latest version (0.9.50) and the latest version of Unity (Unity 2018.2.10.f1).

ManuelRauber commented 6 years ago

That is all setup. My problem id, that the DLL on device is not found. There are also already open issues to that. :-)

--

Beste Grüße

Manuel Rauber

Sent from my iPhone

On 30. Sep 2018, at 05:50, Dzmitry notifications@github.com<mailto:notifications@github.com> wrote:

This has helped me: #2254 (comment)https://github.com/playgameservices/play-games-plugin-for-unity/issues/2254#issuecomment-408709979

Still, I'm getting an authentication failed afterwards.

Let me try to help you. Once you have fixed the issue with the game crashing, you need to resolve the new problem with the authentication.

  1. Open the developer console https://console.developers.google.com/
  2. Make sure you have selected appropriate project (in the top left corner)
  3. Go to the "Credentials" tab (at the left side)
  4. Click the available client id for Android (it should be located below 'OAuth 2.0 client IDs') - Remember this tab!
  5. In the separate window open [https://play.google.com/apps/publish/](google play console)
  6. Select your project
  7. Move to 'Release Management' > 'App signing'
  8. Copy SHA-1 certificate fingerprint from the "Upload certificate" table (second one, not the first one!) (in my case it was something like "2D:5H:1L:71:79:13:23:DA:4G:2H:23:G2:7C:16:L1:F7:J8:6A:51:2G"
  9. Go back to the Developer Console tab (4th step)
  10. Paste SHA-1 certificate fingerprint into the "Signing-certificate fingerprint" input field
  11. Save the changes
  12. Try to check it again. It should work :)

I'm using the latest version (0.9.50) and the latest version of Unity (Unity 2018.2.10.f1).

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/playgameservices/play-games-plugin-for-unity/issues/2310#issuecomment-425692293, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAtNt9ZfM2RueO4Zm24t8OR9TgUIBF92ks5ugD-BgaJpZM4W34F5.

VNA-DJ commented 6 years ago

This has helped me: #2254 (comment) Still, I'm getting an authentication failed afterwards.

Let me try to help you. Once you have fixed the issue with the game crashing, you need to resolve the new problem with the authentication.

  1. Open the developer console Developer Console
  2. Make sure you have selected appropriate project (in the top left corner)
  3. Go to the "Credentials" tab (at the left side)
  4. Click the available client id for Android (it should be located below 'OAuth 2.0 client IDs') - Remember this tab!
  5. In the separate window open google play console
  6. Select your project
  7. Move to 'Release Management' > 'App signing'
  8. Copy SHA-1 certificate fingerprint from the "Upload certificate" table (second one, not the first one!) (in my case it was something like "2D:5H:1L:71:79:13:23:DA:4G:2H:23:G2:7C:16:L1:F7:J8:6A:51:2G"
  9. Go back to the Developer Console tab (4th step)
  10. Paste SHA-1 certificate fingerprint into the "Signing-certificate fingerprint" input field
  11. Save the changes
  12. Try to check it again. It should work :)

I'm using the latest version (0.9.50) and the latest version of Unity (Unity 2018.2.10.f1).

but I don't create any OAuth 2.0

ghost commented 6 years ago

This has helped me: #2254 (comment) Still, I'm getting an authentication failed afterwards.

Let me try to help you. Once you have fixed the issue with the game crashing, you need to resolve the new problem with the authentication.

  1. Open the developer console Developer Console
  2. Make sure you have selected appropriate project (in the top left corner)
  3. Go to the "Credentials" tab (at the left side)
  4. Click the available client id for Android (it should be located below 'OAuth 2.0 client IDs') - Remember this tab!
  5. In the separate window open google play console
  6. Select your project
  7. Move to 'Release Management' > 'App signing'
  8. Copy SHA-1 certificate fingerprint from the "Upload certificate" table (second one, not the first one!) (in my case it was something like "2D:5H:1L:71:79:13:23:DA:4G:2H:23:G2:7C:16:L1:F7:J8:6A:51:2G"
  9. Go back to the Developer Console tab (4th step)
  10. Paste SHA-1 certificate fingerprint into the "Signing-certificate fingerprint" input field
  11. Save the changes
  12. Try to check it again. It should work :)

I'm using the latest version (0.9.50) and the latest version of Unity (Unity 2018.2.10.f1).

but I don't create any OAuth 2.0

Hm, I have used my own keystore during the build compiling. After that I have activated Google Play App Signing and it automatically created the QAuth keys.

VNA-DJ commented 6 years ago

This has helped me: #2254 (comment) Still, I'm getting an authentication failed afterwards.

Let me try to help you. Once you have fixed the issue with the game crashing, you need to resolve the new problem with the authentication.

  1. Open the developer console Developer Console
  2. Make sure you have selected appropriate project (in the top left corner)
  3. Go to the "Credentials" tab (at the left side)
  4. Click the available client id for Android (it should be located below 'OAuth 2.0 client IDs') - Remember this tab!
  5. In the separate window open google play console
  6. Select your project
  7. Move to 'Release Management' > 'App signing'
  8. Copy SHA-1 certificate fingerprint from the "Upload certificate" table (second one, not the first one!) (in my case it was something like "2D:5H:1L:71:79:13:23:DA:4G:2H:23:G2:7C:16:L1:F7:J8:6A:51:2G"
  9. Go back to the Developer Console tab (4th step)
  10. Paste SHA-1 certificate fingerprint into the "Signing-certificate fingerprint" input field
  11. Save the changes
  12. Try to check it again. It should work :)

I'm using the latest version (0.9.50) and the latest version of Unity (Unity 2018.2.10.f1).

but I don't create any OAuth 2.0

Hm, I have used my own keystore during the build compiling. After that I have activated Google Play App Signing and it automatically created the QAuth keys.

I did this your ways but same problem

andmed commented 6 years ago

I lose few days on the same thing, that was solution. https://github.com/playgameservices/play-games-plugin-for-unity/issues/2013#issuecomment-385303507

VNA-DJ commented 6 years ago

2013 (comment)

this problem is solved. now there is one more problem. authentication problem

olehkuznetsov commented 6 years ago

Do you have any related logcat messages about authentication problem?

VNA-DJ commented 6 years ago

Do you have any related logcat messages about authentication problem?

I don't get any logcat message. just Sign Up/In Screen does not seems

kainatthanif commented 6 years ago

This has helped me: #2254 (comment) Still, I'm getting an authentication failed afterwards.

Let me try to help you. Once you have fixed the issue with the game crashing, you need to resolve the new problem with the authentication.

  1. Open the developer console Developer Console
  2. Make sure you have selected appropriate project (in the top left corner)
  3. Go to the "Credentials" tab (at the left side)
  4. Click the available client id for Android (it should be located below 'OAuth 2.0 client IDs') - Remember this tab!
  5. In the separate window open google play console
  6. Select your project
  7. Move to 'Release Management' > 'App signing'
  8. Copy SHA-1 certificate fingerprint from the "Upload certificate" table (second one, not the first one!) (in my case it was something like "2D:5H:1L:71:79:13:23:DA:4G:2H:23:G2:7C:16:L1:F7:J8:6A:51:2G"
  9. Go back to the Developer Console tab (4th step)
  10. Paste SHA-1 certificate fingerprint into the "Signing-certificate fingerprint" input field
  11. Save the changes
  12. Try to check it again. It should work :)

I'm using the latest version (0.9.50) and the latest version of Unity (Unity 2018.2.10.f1).

I'm facing the same problem. i followed all these steps that you mentioned. but the authentication function does not working on my phone. I signed my app with upload certiicate in credentials and when I test my application I directly download it from play store.

olehkuznetsov commented 5 years ago

Can you try to build Minimal sample with your package/SHA1 key and check if it works for you, please?

mgrogin commented 5 years ago

Was this resolved? Im also having issues logging in with an app that used to log in no problem

olehkuznetsov commented 5 years ago

Check the apk SHA1 key if it is the same you have in Play console linked app section - this is most common configuration issue.

mgrogin commented 5 years ago

@olehkuznetsov What I found in my situation is that linking to firebase broke my previously working GPGS (I think it modified the GPGS oauth 2 client)

  1. everything was working with GPGS leaderboards and authentication
  2. On Dec 16th I linked firebase to my android game under project settings - this seems to have broken something with authentication
  3. I think the issue has to do with the OAuth 2.0 client IDs in https://console.cloud.google.com/apis/credentials?project={my-project-name} I see that it says the 'Android client for com.domain.myProject (auto created by Google Service)' was created on Dec 16th and everything else was created at an earlier date. the client id is in this format: {12 digit number}-{32 letters and numbers}.apps.googleusercontent.com and I would expect it to be {my-app-id}.apps.googleusercontent.com
  4. How can I fix this so that I have The Google Play games leaderboard working again and keep the firebase integration working.
  5. I cant have 2 OAuth 2.0 clients with the same sha-1

Any ideas how to fix this? Is there a chance that Firebase and GPGS can't live together?

Thanks

olehkuznetsov commented 5 years ago

Just get actual SHA1 key from your built apk and add it to linked section in Play Console. You can have multiple linked apps there for the same package name.

mgrogin commented 5 years ago

@olehkuznetsov It wont allow me to add it since you cant have duplicate sha-1 keys and the sha-1 key is being used for the firebase link (client id {12 digit number}-{32 letters and numbers}.apps.googleusercontent.com)

The error I get is "Package name and certificate fingerprint combination already exists"

olehkuznetsov commented 5 years ago

How many linked apps do you have in Play Console? Can you check if you already have a linked app to the same as firebase client id, please?

mgrogin commented 5 years ago

@olehkuznetsov

  1. I only have one linked app in PLAY Console (the one that isn't working now - it used to work before I linked it in the Firebase Console)
  2. The OAuth2 Client ID in the PLAY Console for my linked app doesn't exist in the cloud console under credentials (OAuth2 Client ID is {application Id}-{32 letters & numbers}.apps.googleusercontent.com)
  3. The only CLOUD console OAuth 2.0 client ID for Android {12 digits maybe firebase application id?}-{32 letters & numbers}.apps.googleusercontent.com (Android client for com.*****.##### (auto created by Google Service))

So to answer your second question i dont have a linked app to the same as firebase client id

olehkuznetsov commented 5 years ago

Can you provide me with this project Play Games services app_id, please?

SaadAli2016 commented 5 years ago

APP CRASH 2019 FIXED​ After trying everything turns out its the plugin compatibility problem here is the perfect fix for it. https://youtu.be/L-N7Tsw6Jf4

Felischwarz commented 4 years ago

Got the same issue...