Announcement

Collapse
No announcement yet.

How do I debug refusal to connecto to Google Play services?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How do I debug refusal to connecto to Google Play services?

    I have an app that successfully connected to Google Play and unlocked achievements a few days ago.
    Now, however, that has stopped working. Unfortunately, I don't remember exactly when.
    As far as I can tell, all the blueprint nodes related to caching achievements still run the same as before; they just don't succeed.
    This is using a deployment/release build, installing with the .bat script onto the device.

    I have defined and published my google play services, so they should all be available.

    This is probably something stupid I've accidentally changed, but I can't figure out what it is, and worse, I can't figure out how to debug it.
    Logcat doesn't print much useful things. There are a bunch of errors about W/Adreno-EGL(28619): <qeglDrvAPI_eglGetConfigAttrib:632>: EGL_BAD_ATTRIBUTE but that's unlikely to be related :-)

    Here are the log messages:
    Code:
    V/Zygote  (28619): Switching descriptor 34 to /dev/null
    V/Zygote  (28619): Switching descriptor 9 to /dev/null
    I/ActivityManager(  794): Start proc com.enchantedage.supercellpop1 for activity com.enchantedage.supercellpop1/com.epic
    games.ue4.GameActivity: pid=28619 uid=10131 gids={50131, 3003, 1028, 1015}
    I/ActivityManager(  794): Config changes=480 {1.0 310mcc410mnc en_US ldltr sw360dp w640dp h335dp 480dpi nrml long land f
    inger -keyb/v/h -nav/h s.81 themeResource=null}
    I/InputReader(  794): Reconfiguring input devices.  changes=0x00000004
    I/InputReader(  794): Device reconfigured: id=5, name='synaptics-rmi-ts', size 1080x1920, orientation 1, mode 1, display
     id 0
    D/PhoneStatusBar( 1017): mSettingsPanelGravity = 55
    D/ActivityThread(28619): handleBindApplication:com.enchantedage.supercellpop1
    D/ActivityThread(28619): setTargetHeapUtilization:0.75
    D/ActivityThread(28619): setTargetHeapMinFree:2097152
    D/dalvikvm(28619): Trying to load lib /data/app-lib/com.enchantedage.supercellpop1-1/libgnustl_shared.so 0x41d8e848
    D/dalvikvm(28619): Added shared lib /data/app-lib/com.enchantedage.supercellpop1-1/libgnustl_shared.so 0x41d8e848
    D/dalvikvm(28619): No JNI_OnLoad found in /data/app-lib/com.enchantedage.supercellpop1-1/libgnustl_shared.so 0x41d8e848,
     skipping init
    D/dalvikvm(28619): Trying to load lib /data/app-lib/com.enchantedage.supercellpop1-1/libUE4.so 0x41d8e848
    D/dalvikvm(28619): Added shared lib /data/app-lib/com.enchantedage.supercellpop1-1/libUE4.so 0x41d8e848
    W/IInputConnectionWrapper( 1208): showStatusIcon on inactive InputConnection
    I/Timeline(28619): Timeline: Activity_idle id: android.os.BinderProxy@41d7fc30 time:164216424
    I/ActivityManager(  794): Displayed com.enchantedage.supercellpop1/com.epicgames.ue4.GameActivity: +293ms
    I/Timeline(  794): Timeline: Activity_windows_visible id: ActivityRecord{42b95320 u0 com.enchantedage.supercellpop1/com.
    epicgames.ue4.GameActivity t61} time:164216440
    I/Adreno-EGL(28619): <qeglDrvAPI_eglInitialize:410>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_LNX.LA.3.5.2.2_RB1.04.04.0
    4.087.028_msm8974_LNX.LA.3.5.2.2_RB1__release_AU ()
    I/Adreno-EGL(28619): OpenGL ES Shader Compiler Version: E031.24.00.15
    I/Adreno-EGL(28619): Build Date: 07/31/14 Thu
    I/Adreno-EGL(28619): Local Branch:
    I/Adreno-EGL(28619): Remote Branch: quic/LNX.LA.3.5.2.2_rb1
    I/Adreno-EGL(28619): Local Patches: NONE
    I/Adreno-EGL(28619): Reconstruct Branch: AU_LINUX_ANDROID_LNX.LA.3.5.2.2_RB1.04.04.04.087.028 +  NOTHING
    W/Adreno-EGL(28619): <qeglDrvAPI_eglGetConfigAttrib:632>: EGL_BAD_ATTRIBUTE
    W/Adreno-EGL(28619): <qeglDrvAPI_eglGetConfigAttrib:632>: EGL_BAD_ATTRIBUTE
    W/Adreno-EGL(28619): <qeglDrvAPI_eglGetConfigAttrib:632>: EGL_BAD_ATTRIBUTE
    W/Adreno-EGL(28619): <qeglDrvAPI_eglGetConfigAttrib:632>: EGL_BAD_ATTRIBUTE
    W/Adreno-EGL(28619): <qeglDrvAPI_eglGetConfigAttrib:632>: EGL_BAD_ATTRIBUTE
    W/Adreno-EGL(28619): <qeglDrvAPI_eglGetConfigAttrib:632>: EGL_BAD_ATTRIBUTE
    W/Adreno-EGL(28619): <qeglDrvAPI_eglGetConfigAttrib:632>: EGL_BAD_ATTRIBUTE
    W/Adreno-EGL(28619): <qeglDrvAPI_eglGetConfigAttrib:632>: EGL_BAD_ATTRIBUTE
    W/Adreno-EGL(28619): <qeglDrvAPI_eglGetConfigAttrib:632>: EGL_BAD_ATTRIBUTE
    W/Adreno-EGL(28619): <qeglDrvAPI_eglGetConfigAttrib:632>: EGL_BAD_ATTRIBUTE
    W/Adreno-EGL(28619): <qeglDrvAPI_eglGetConfigAttrib:632>: EGL_BAD_ATTRIBUTE
    W/Adreno-EGL(28619): <qeglDrvAPI_eglGetConfigAttrib:632>: EGL_BAD_ATTRIBUTE
    W/Adreno-EGL(28619): <qeglDrvAPI_eglGetConfigAttrib:632>: EGL_BAD_ATTRIBUTE
    W/Adreno-EGL(28619): <qeglDrvAPI_eglGetConfigAttrib:632>: EGL_BAD_ATTRIBUTE
    W/Adreno-EGL(28619): <qeglDrvAPI_eglGetConfigAttrib:632>: EGL_BAD_ATTRIBUTE
    W/Adreno-EGL(28619): <qeglDrvAPI_eglGetConfigAttrib:632>: EGL_BAD_ATTRIBUTE
    W/Adreno-EGL(28619): <qeglDrvAPI_eglGetConfigAttrib:632>: EGL_BAD_ATTRIBUTE
    W/Adreno-EGL(28619): <qeglDrvAPI_eglGetConfigAttrib:632>: EGL_BAD_ATTRIBUTE
    I/WindowManager(  794): Screen frozen for +320ms due to Window{429556b8 u0 StatusBar}
    E/MediaPlayer(28619): stop called in state 1
    E/MediaPlayer(28619): error (-38, 0)
    E/MediaPlayer(28619): Error (-38,0)
    I/ActivityManager(  794): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp
    =com.cyanogenmod.trebuchet/org.cyanogenmod.trebuchet.CustomHomeLauncher} from pid 794
    I/InputReader(  794): Reconfiguring input devices.  changes=0x00000004
    I/InputReader(  794): Device reconfigured: id=5, name='synaptics-rmi-ts', size 1080x1920, orientation 0, mode 1, display
     id 0
    I/ActivityManager(  794): Config changes=480 {1.0 310mcc410mnc en_US ldltr sw360dp w360dp h615dp 480dpi nrml long port f
    inger -keyb/v/h -nav/h s.82 themeResource=null}
    D/PhoneStatusBar( 1017): mSettingsPanelGravity = 55
    I/WindowManager(  794): Screen frozen for +163ms due to Window{429556b8 u0 StatusBar}
    W/IInputConnectionWrapper(28619): showStatusIcon on inactive InputConnection
    I/Timeline(  794): Timeline: Activity_windows_visible id: ActivityRecord{4249e388 u0 com.cyanogenmod.trebuchet/org.cyano
    genmod.trebuchet.CustomHomeLauncher t1} time:164223486
    I/Timeline( 1208): Timeline: Activity_idle id: android.os.BinderProxy@41a2cdd8 time:164223636
    I/ActivityManager(  794): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp
    =com.cyanogenmod.trebuchet/org.cyanogenmod.trebuchet.CustomHomeLauncher} from pid 794
    If I could just figure out where the Unreal game log file goes, that might be something, but I can't even find those.
    "adb shell" tells me that my game is installed in /storage/emulated/legacy/SuperCellPop1 but that directory just contains a bunch of ini files.
    Code:
    ls -R
    
    .:
    Epic Games
    SuperCellPop1
    
    ./Epic Games:
    KeyValueStore.ini
    
    ./SuperCellPop1:
    Intermediate
    Saved
    
    ./SuperCellPop1/Intermediate:
    Config
    
    ./SuperCellPop1/Intermediate/Config:
    CoalescedSourceConfigs
    
    ./SuperCellPop1/Intermediate/Config/CoalescedSourceConfigs:
    DeviceProfiles.ini
    Engine.ini
    Game.ini
    GameUserSettings.ini
    Input.ini
    Scalability.ini
    
    ./SuperCellPop1/Saved:
    Config
    
    ./SuperCellPop1/Saved/Config:
    Android
    
    ./SuperCellPop1/Saved/Config/Android:
    DeviceProfiles.ini
    Engine.ini
    Game.ini
    GameUserSettings.ini
    Input.ini
    Scalability.ini
    Last edited by jwatte; 04-20-2015, 01:05 AM.

    #2
    EGL_BAD_ATTRIBUTE is harmless; this is just the engine checking for capabilities which the driver does not support in this case so are disabled.

    The logcat is where the game sends all logging. You can look for engine log data with tag UE4 (adb logcat -s UE4).

    Are you sure you have a working Google Play Services? I noticed cyanogenmod in the log.

    Comment


      #3
      The logcat is where the game sends all logging. You can look for engine log data with tag UE4 (adb logcat -s UE4).
      That's what I assumed, but what I pasted in the message above is the full (unfiltered) logcat, and does not include any UE4 messages.
      Where do those messages go?
      Also, where do savegames go? I'm using a plugin that writes some persistent data next to the savegames, so perhaps I can write some debugging data there too, if I could figure out where this would be...

      Are you sure you have a working Google Play Services? I noticed cyanogenmod in the log.
      Yes, that is the stock OS on my OnePlus One phone. Just like HTC has Sense and Samsung has .. whatever they call theirs .. OnePlus chose Cyanogen OS as their flavor of Android. (Which is different from the "rooted" Cyanogen Mod you may be thinking about.)

      Comment


        #4
        Logging is only enabled for Development or Test builds. Shipping disables all logging. Google Play Services does have its own log messages you should see. I would expect to see them after "Displayed com.enchantedage.supercellpop1/com.epicgames.ue4.GameActivity".

        Comment


          #5
          Google Play Services does have its own log messages you should see. I would expect to see them after "Displayed com.enchantedage.supercellpop1/com.epicgames.ue4.GameActivity".
          I would expect so, too, but I don't.
          How do I debug this?

          Comment


            #6
            So, going back to non-shipping builds, i can get log outputs. It claims that the Google Play online system module is not available.

            Code:
            D/UE4     (20563): [2015.04.22-03.21.07:347][  0]LogModuleManager:Warning: ModuleManager: Module 'OnlineSubsystemGooglePlay' not found - its StaticallyLinkedModuleInitializers function is null.
            D/UE4     (20563): [2015.04.22-03.21.07:347][  0]LogOnline:Warning: Unable to load default OnlineSubsystem module GooglePlay, using NULL interface
            D/UE4     (20563): [2015.04.22-03.21.07:347][  0]LogModuleManager:Warning: ModuleManager: Module 'OnlineSubsystemNull' not found - its StaticallyLinkedModuleInitializers function is null.
            Now, looking inside ./Source/.../MyGame.Build.cs I find a line about needing to uncomment online services:

            Code:
            		// Uncomment if you are using online features
            		// PrivateDependencyModuleNames.Add("OnlineSubsystem");
            Uncommenting this and re-building and re-packaging does not solve the problem, though.

            Comment


              #7
              Also, I notice from the google play sticky thread:
              You need to enter some information about your game in the Unreal Editor. Make sure your project is configured for the Android platform and Google Play Services in the project settings. Once it is, check “Enable Google Play support”.
              What does "configured for the ... Google Play Services in the project settings" mean? Just that it doesn't complain that it's not configured for these?

              Here are my android settings:

              Click image for larger version

Name:	2015-04-21-android-settings.jpg
Views:	1
Size:	254.1 KB
ID:	1074879

              Comment


                #8
                In addition to "OnlineSubsystem" you can try adding the "OnlineSubsystemGooglePlay" module as a dependency in your Build.cs file as well.

                Comment


                  #9
                  Some more hints: I created a brand new empty blueprint project, and set it up with the same settings in the dialog box (app ID, package name, etc,) and it does connect to Google Play just fine.
                  This project does not have C++ code.

                  Then, when I add an empty C++ class to the project and compile it, and re-package, and now it fails to connect to Google Play.

                  Adding the OnlineSubsystem and OnlineSubsystemGooglePlay modules then generates a link error:
                  Code:
                  Error LINK : fatal error LNK1181: cannot open input file 'C:\UnrealEngine\Unreal Engine\4.7\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-OnlineSubsystemGooglePlay.lib'
                  I presume this is because you don't support Google Play for Windows. (Yet? It'd actually be kind-of nice to have this for desktop apps!)

                  Re-packaging for Android with this addition, does build without errors. However, the app does not correctly connect to Google Play even after this.

                  I get these errors:
                  Code:
                  D/UE4     (23301): [2015.04.23-02.42.27:762][  0]LogModuleManager:Warning: ModuleManager: Module 'OnlineSubsystemGooglePlay' not found - its StaticallyLinkedModuleInitializers function is null.
                  
                  D/UE4     (23301): [2015.04.23-02.42.27:762][  0]LogOnline:Warning: Unable to load default OnlineSubsystem module GooglePlay, using NULL interface
                  
                  D/UE4     (23301): [2015.04.23-02.42.27:763][  0]LogModuleManager:Warning: ModuleManager: Module 'OnlineSubsystemNull' not found - its StaticallyLinkedModuleInitializers function is null.
                  The way I added the modules was:
                  Code:
                  		PrivateDependencyModuleNames.Add("OnlineSubsystem");
                          if (Target.Platform == UnrealTargetPlaform.Android)
                          {
                              PrivateDependencyModuleNames.Add("OnlineSubsystemGooglePlay");
                          }
                  Last edited by jwatte; 04-22-2015, 10:44 PM.

                  Comment


                    #10
                    Originally posted by jwatte View Post
                    Adding the OnlineSubsystem and OnlineSubsystemGooglePlay modules then generates a link error:
                    Code:
                    Error LINK : fatal error LNK1181: cannot open input file 'C:\UnrealEngine\Unreal Engine\4.7\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-OnlineSubsystemGooglePlay.lib'
                    I presume this is because you don't support Google Play for Windows. (Yet? It'd actually be kind-of nice to have this for desktop apps!)
                    Correct, Google Play is not supported on Windows. Google would need to provide support for their services in desktop apps before we would add this to the engine.

                    Originally posted by jwatte View Post
                    Re-packaging for Android with this addition, does build without errors. However, the app does not correctly connect to Google Play even after this.
                    ...
                    There is a bug (tracked as UE-13075) where UnrealBuildTool doesn't automatically detect changes in Build.cs files. If you regenerate the Visual Studio project files, do the OnlineSubsystem modules get picked up then?

                    Comment


                      #11
                      I had already re-generated the files and re-built the C++, and that did not help.

                      Google would need to provide support for their services in desktop apps before we would add this to the engine.
                      (They do support web browsers, and in general, any arbitrary REST client. I'm just sayin' ... :-)

                      If you fix the "adding C++ breaks online services for android" bug, though, that would be the high-order bit of priority.

                      Comment


                        #12
                        Originally posted by jwatte View Post
                        I had already re-generated the files and re-built the C++, and that did not help.

                        (They do support web browsers, and in general, any arbitrary REST client. I'm just sayin' ... :-)

                        If you fix the "adding C++ breaks online services for android" bug, though, that would be the high-order bit of priority.
                        I have the same issue with OnlineSubsystemNull:
                        https://answers.unrealengine.com/que...not-found.html

                        My issue is also packaging for Mac, not just for Android. Is it the same bug?
                        How of I re-generate the needed files?

                        Comment


                          #13
                          Originally posted by jwatte View Post
                          The way I added the modules was:
                          Code:
                          		PrivateDependencyModuleNames.Add("OnlineSubsystem");
                                  if (Target.Platform == UnrealTargetPlaform.Android)
                                  {
                                      PrivateDependencyModuleNames.Add("OnlineSubsystemGooglePlay");
                                  }
                          Note that as written this code should fail to compile. UnrealTargetPlaform should be UnrealTargetPlatform.

                          Originally posted by jwatte View Post
                          I had already re-generated the files and re-built the C++, and that did not help.
                          I can't reproduce this issue in 4.7.6, even without regenerating the project files. Specifically, after adding a C++ class to a Blueprint project, I:

                          1. Added OnlineSubsystem and OnlineSubsystemGooglePlay to the PrivateDependencyModuleNames list in the project's Build.cs file.
                          4. Switched back to the Unreal Editor and choose File -> Package Project -> Android ->Android (ATC) (or any other texture format appropriate for your device)
                          5. Ran the Install_*.bat file in the final packaged directory
                          6. Start the app on the phone, and notice that the line "FOnlineSubsystemAndroid::Init" appears in logcat. This indicates the engine was able to find the OnlineSubsystemGooglePlay module.

                          Can you confirm that after following these steps, you still see the "Module 'OnlineSubsystemGooglePlay' not found" error in logcat?

                          Comment


                            #14
                            I am having trouble with this as well - https://answers.unrealengine.com/que...dule-goog.html

                            I see little tidbits here and there on how to enable google play - could we get an example solution or a youtube video end to end please?

                            From my testing just now

                            [2015.04.29-11.50.40:745][ 0]LogOnlineisplay: OnlineSubsystemGooglePlayModule::StartupModule()
                            [2015.04.29-11.50.40:745][ 0]LogOnlineisplay: FOnlineIdentityAndroid::FOnlineIdentityAndroid()
                            [2015.04.29-11.50.42:166][ 0]LogScript:Warning: UInAppPurchaseQueryCallbackProxy::TriggerQuery - In App Purchases are not supported by Online Subsystem
                            Last edited by BPANDREW; 04-29-2015, 07:57 AM.
                            ZOMBIE TOWN AHHH (ANDROID/STEAM) | RIDE SHARE EMPIRE (ANDROID/GAME JAM) | NEVER NOT KNIGHT (ANDROID/GAME JAM) | TWITTER | MY UE4 TUTORIALS | ANSWERHUB

                            Comment


                              #15
                              Hello Ryan,

                              A modified version of your instructions worked for me. I am running 4.7.6 and just ran into this thread's issue, of adding C++ to a Blueprints project and experiencing a failure to access Google Play services, after it had worked just fine before.

                              In the [project].Build.cs, I added "OnlineSubsystemGooglePlay" in the PublicDependencyModuleNames list.

                              Google Play services now work in development (only the login for dev, of course) and distribution with Blueprints/C++!

                              Thanks for your help from a year ago!

                              Hopefully this bug can be addressed in a future engine version.
                              Founder and CEO at Devious Gamers
                              Designer/director/producer. Current project: I Hate My Job, for iOS and Android, Q3 2016

                              Comment

                              Working...
                              X