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

  • replied
    Something that might help getting the OnlineSubsystemGooglePlay working: Adding AndroidEngine.ini: https://forums.unrealengine.com/show...Compile-Errors

    Leave a comment:


  • replied
    So, I'm having trouble with the OnlineSubsystemGooglePlay module too. When we try to get the online subsystem in code it comes back as saying it is not present despite adding OnlineSubsystem & OnlineSubsystemGooglePlay in PublicDependencyModuleNames for the Android target platform.

    We are using 4.6.1, Am I to understand that if we have code then there is a bug which means we can not use OnlineSubsystemGooglePlay?

    Thanks for the response, i'll be away for a week but will check on this when I get back.

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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?

    Leave a comment:


  • replied
    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?

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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?

    Leave a comment:


  • replied
    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.

    Leave a comment:


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

    Leave a comment:


  • replied
    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

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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?

    Leave a comment:


  • replied
    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".

    Leave a comment:


  • replied
    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.)

    Leave a comment:

Working...
X