playgameservices / play-games-plugin-for-unity

Google Play Games plugin for Unity
Other
3.45k stars 962 forks source link

Not working with unity 2018.3.3 on Android, no error #2438

Open xxluky opened 5 years ago

xxluky commented 5 years ago

Sorry to report this, but my game suddenly stopped working right after I upgraded to Unity 2018.3.3f1 with play-games-plugin 0.9.50. So I upgraded the plugin to the latest version (0.9.59) but no luck. I have debug mode enabled. It writes 5 debugs (but no error) and then it freezes totally. I can't even see my console, it stucked all the way as it was in while cycle.

I had one error when I was upgrading this plugin on Windows due to permissions. I fixed it thanks to @olehkuznetsov in this thread: https://github.com/playgameservices/play-games-plugin-for-unity/issues/2417

Everything is working fine in editor, but as soon as I run it on Android and try to authenticate it stucks everytime. I know that Authenticate is called as far as I can know.

What should I do? How to debug it? Please help.

olehkuznetsov commented 5 years ago

Can you show the log after you try authenticate, please?

xxluky commented 5 years ago

Can you show the log after you try authenticate, please?

The whole game freezes at start. I can not even open my game console. But if I would open it, it would say this (checked in editor):

that is all, then it freezes. I also tried to delete metadata of Google Play Games apk with no success. I also tried to Resolve for Android and Set up the plugin again for Android.

exzizt commented 5 years ago

Can you show the log after you try authenticate, please?

The whole game freezes at start. I can not even open my game console. But if I would open it, it would say this (checked in editor):

  • Loaded VersionHandlerImpl
  • Detected .NET version 3.5
  • Assets\GooglePlayGames\Editor\GooglePlayGamesPlugin.txt metadata will be checked

that is all, then it freezes. I also tried to delete metadata of Google Play Games apk with no success. I also tried to Resolve for Android and Set up the plugin again for Android.

I bet you have "Managed Stripping" enabled in the Player Settings under Optimization. Set this to Disabled and it should fix your problem.

xxluky commented 5 years ago

Can you show the log after you try authenticate, please?

The whole game freezes at start. I can not even open my game console. But if I would open it, it would say this (checked in editor):

  • Loaded VersionHandlerImpl
  • Detected .NET version 3.5
  • Assets\GooglePlayGames\Editor\GooglePlayGamesPlugin.txt metadata will be checked

that is all, then it freezes. I also tried to delete metadata of Google Play Games apk with no success. I also tried to Resolve for Android and Set up the plugin again for Android.

I bet you have "Managed Stripping" enabled in the Player Settings under Optimization. Set this to Disabled and it should fix your problem.

No, I have checked that before. I have read the latest threads. I have Managed Stripping Level in my Player Settings set to "Disabled". It should be fixed with a v0.9.58 anyway.

xxluky commented 5 years ago

Ok, today I even can not start my game on Android. It crashes right after start. Strange. I did nothing wrong. Everything was working fine with a Unity version 2018.2.6. After I upgraded to Unity 2018.3.3 I can not start my game... I am not using any other plugin except In App Purchases made by Unity Tech. The problem must be due to Play Services Plugin. I just want to ask, what is the proper way to update this plugin? I went like this:

I had to delete the old version because as soon as I tried to just update it the GUID for some files would change.

RolandSzep commented 5 years ago

I have a similar issue when scripting backend is set to IL2CPP.

xxluky commented 5 years ago

I have a similar issue when scripting backend is set to IL2CPP.

Did you find any workaround? Like for example switching the scripting backend to Mono?

It is true that in Unity 2018.3 they made a lot of changes related to IL2CPP. Lets see here https://unity3d.com/unity/whats-new/unity-2018.3.0. The issue seems to be related with Windows OS. Anybody having the same issue?

RolandSzep commented 5 years ago

It is working fine for me when using Mono backend, but I want to use IL2CPP.

legas1 commented 5 years ago

It should work fine with IL2CPP, can you post logs from logcat here please?

RolandSzep commented 5 years ago

Unity 2018.3.4f1 Play game services version: 0.9.60 Scripting backend: IL2CPP

Here is the logcat:

02-03` 09:51:43.730: I/System.out(11189): package:my.package.name
02-03 09:51:43.880: I/UnityIAP(12140): Package name: my.package.name
02-03 09:51:43.886: I/Finsky(5693): [394] com.google.android.finsky.billing.iab.an.b(40): my.package.name: Account determined from installer data - [Zkal6BiO-QXq8wLZhgFrdVEUrlg]
02-03 09:51:43.886: I/Finsky(5693): [394] com.google.android.finsky.billing.iab.an.b(48): my.package.name: Account from preferred account - [Zkal6BiO-QXq8wLZhgFrdVEUrlg]
02-03 09:51:44.214: E/CRASH(12140): pid: 12140, tid: 12297, name: Thread-19  >>> my.package.name <<<
02-03 09:51:44.353: W/BroadcastQueue(3826): Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REPLACED dat=package:my.package.name flg=0x4000010 (has extras) } to com.sec.android.app.sbrowser/.webcontentsprovider.WebContentsProviderReceiver
02-03 09:51:44.356: W/BroadcastQueue(3826): Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REPLACED dat=package:my.package.name flg=0x4000010 (has extras) } to com.sec.android.app.shealth/com.samsung.android.service.health.status.PackageDelegateReceiver
02-03 09:51:44.586: E/CRASH(12140):     #00  pc 003cc9c0  /data/app/my.package.name-LsOcEQ5RZlRMZJzTIWdX_w==/lib/arm/libunity.so (UnityEngine::PlatformWrapper::GetRendererAPI()+28)
02-03 09:51:44.586: E/CRASH(12140):     #01  pc 003f88c4  /data/app/my.package.name-LsOcEQ5RZlRMZJzTIWdX_w==/lib/arm/libunity.so (CrashReporting::CrashReport::CaptureMetadata()+852)
02-03 09:51:44.586: E/CRASH(12140):     #02  pc 003fbc38  /data/app/my.package.name-LsOcEQ5RZlRMZJzTIWdX_w==/lib/arm/libunity.so (CrashReporting::CrashReporter::PopulateReportSharedData(CrashReporting::CrashReport&, bool)+40)
02-03 09:51:44.586: E/CRASH(12140):     #03  pc 003fb7dc  /data/app/my.package.name-LsOcEQ5RZlRMZJzTIWdX_w==/lib/arm/libunity.so (CrashReporting::CrashReporter::SendReport(CrashReporting::CrashReport&, bool)+36)
02-03 09:51:44.586: E/CRASH(12140):     #04  pc 003fb71c  /data/app/my.package.name-LsOcEQ5RZlRMZJzTIWdX_w==/lib/arm/libunity.so (CrashReporting::CrashReporter::HandleLog(core::basic_string<char, core::StringStorageDefault<char> > const&, core::basic_string<char, core::StringStorageDefault<char> > const&, core::basic_string<char, core::StringStorageDefault<char> > const&, LogType)+468)
02-03 09:51:44.586: E/CRASH(12140):     #05  pc 003fb428  /data/app/my.package.name-LsOcEQ5RZlRMZJzTIWdX_w==/lib/arm/libunity.so (CrashReporting::CrashReporter::OnLogCallbackStatic(DebugStringToFileData const&, LogType, bool)+252)
02-03 09:51:44.586: E/CRASH(12140):     #06  pc 003caf5c  /data/app/my.package.name-LsOcEQ5RZlRMZJzTIWdX_w==/lib/arm/libunity.so (CallbackArray3<bool, bool, int>::Invoke(bool, bool, int)+104)
02-03 09:51:44.586: E/CRASH(12140):     #07  pc 011d07ac  /data/app/my.package.name-LsOcEQ5RZlRMZJzTIWdX_w==/lib/arm/libunity.so (DebugStringToFilePostprocessedStacktrace(DebugStringToFileData const&)+192)
02-03 09:51:44.586: E/CRASH(12140):     #08  pc 011d0ebc  /data/app/my.package.name-LsOcEQ5RZlRMZJzTIWdX_w==/lib/arm/libunity.so (DebugStringToFile(DebugStringToFileData const&)+488)
02-03 09:51:44.586: E/CRASH(12140):     #09  pc 00c1a514  /data/app/my.package.name-LsOcEQ5RZlRMZJzTIWdX_w==/lib/arm/libunity.so (Scripting::LogException(ScriptingExceptionPtr, int, char const*, bool)+428)
02-03 09:51:44.586: E/CRASH(12140):     #10  pc 0020b530  /data/app/my.package.name-LsOcEQ5RZlRMZJzTIWdX_w==/lib/arm/libil2cpp.so
02-03 09:51:44.586: E/CRASH(12140):     #11  pc 00eca3d0  /data/app/my.package.name-LsOcEQ5RZlRMZJzTIWdX_w==/lib/arm/libil2cpp.so
02-03 09:51:44.604: E/MessageQueue(12140): pid: 12140, tid: 12297, name: Thread-19  >>> my.package.name <<<

UPDATE: My problem is NOT related to this. It was a bug in Unity: https://issuetracker.unity3d.com/issues/android-apk-build-crashes-on-an-android-device-when-iap-placement-is-enabled-but-sdk-is-not-included-in-a-build