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

Action scheduled for later (connection currently in progress) [13401757] #25

Closed
ghost opened this issue Feb 21, 2014 · 26 comments
Closed
Labels

Comments

@ghost
Copy link

ghost commented Feb 21, 2014

Hi guys,

first of all Thank you for your plugins. Really appreciated!

Almost each time the game start and the user login manually, when there's a request for leaderboard or postScore, nothing happens. Every calls is put in a queue and wait until...ever. The only way I found is to put the game in background manually and come back and every actions in the queue happens. What can we do? We are testing it on Nexus 7 and Nexus S.

Thank you
David

@ghost ghost closed this as completed Feb 21, 2014
@ghost ghost reopened this Feb 21, 2014
@ghost
Copy link
Author

ghost commented Feb 21, 2014

Ok, the issue isn't really here. When the user cancel the login the first time, automatically the play game service is asking again to login. If the user login the second time, all action request are put in a queue.

@Baronium
Copy link

This is a very serious issue, I'm experiencing it too. I've been able to reproduce it in a similar way to the one described here:

When the user logs out ingame, e.g. via the leaderboard settings, and tries to log in again, often the authentification process completes but our cloud load call is put into the queue. We're waiting for the cloud callback when the user logs in and this puts us in an infinite loop. Closing and reopening the game is not a solution for live apps.

[Removed adb log because of new repro steps below]

@Spavacz
Copy link
Contributor

Spavacz commented Mar 1, 2014

Got the same issue here :( Any quick temporary fix?

@btco
Copy link

btco commented Mar 10, 2014

Just to confirm the steps to repro this:

  1. Log in
  2. Open up a leaderboards screen and sign out from that screen
  3. Close the leaderboards screen
  4. Log in again

Is that correct?

@btco
Copy link

btco commented Mar 10, 2014

Also, is this happening on 0.8.00 or 0.8.01?

@btco btco added the bug label Mar 10, 2014
@Baronium
Copy link

It is reproducible with the Cubic Pilot sample running version 0.8.01.

  1. Sign in
  2. Sign out
  3. Repeat step 1-2 until the cloud load fails (scheduled for later).

@ghost
Copy link
Author

ghost commented Mar 13, 2014

Sorry for the triple post. (will delete the 2 older ones) Just discovered an error in my implementation. So now I am exactly able to reproduce the error in everybodys way and actually really only in that way. I am sorry for the wrong informations i provided earlier.

@wired
Copy link

wired commented Mar 14, 2014

I'm having the same issue here.

The problem occurs after a manual sign-out. When loading the game with an account signed in from a previous session, everything works correctly.

If you:

  • Sign out
  • Then Sign in again

all actions are scheduled for later:
[Play Games Plugin DLL] Action scheduled for later (connection currently in progress).

If, however, I Sign out / Sign in again, the error goes away. Until I Sign out again.
Sending the app to the background (or killing and re-launching it) also fixes the issue.

@crazydadz
Copy link

It is only happening with 0.8.01 version. I downgrade to 0.8.00 and everythings is working fine.

@btco
Copy link

btco commented Mar 14, 2014

I believe our next bugfix update (coming soon) will fix this. At least I can't repro the bug any more. But just to be sure, could someone enable debug logs, produce logs for this problem and attach them here?

To enable debug logs, do this before calling Authenticate:

PlayGamesPlatform.Instance.DebugLogEnabled = true;

@wired
Copy link

wired commented Mar 14, 2014

Awesome. Could you push the bug-fix update in a different branch so I can test it? Thanks :)

@ghost
Copy link
Author

ghost commented Mar 15, 2014

Here the data I just logged. As you will notice, I wasn't able to reproduce the bug directly, the second try did it. I replaced my ID with [ID] and my name with [NAME]. I also deleted the Achievements. Here the link to the log-file. I hope it will help. =) If you have questions, I would like to hear/read from you.

http://pastebin.com/yyUFU7Qr

Regards
Kalle

EDIT: I want to add, that I sometimes, after a reinstall get this problem on first login. So I login and I am initially not able to do an action. I will try to log that also.

EDIT2: not able to reproduce this at the moment. The bug has a very low probability at first login.

@btco
Copy link

btco commented Mar 17, 2014

Let's try something. Could you please try downloading this JAR:
https://docs.google.com/file/d/0B1IdIjhHcunCMEtkU3ZXR1prYW8/edit

And overwrite your play-games-plugin-support.jar here:
PluginDev/Assets/Plugins/Android/MainLibProj/libs/play-games-plugin-support.jar

Then rebuild and redeploy your APK.
Does the problem persist after this?

@ghost
Copy link
Author

ghost commented Mar 17, 2014

Sadly I am still able to reproduce the bug in the same way on first try. Here is the log: http://pastebin.com/jkReDMiL

(Made two (what a stupid mistake) runs, both same result)

@btco
Copy link

btco commented Mar 17, 2014

Thanks for trying this. Could you please enable the debug logs so I can see what's going on in greater detail? Just add this right before the call to Authenticate:

PlayGamesPlatform.Instance.DebugLogEnabled = true;

@ghost
Copy link
Author

ghost commented Mar 17, 2014

If I try to add this. I get this error: "Assets/Scripts/MenuControllScript.cs(294,52): error CS0176: Static member `GooglePlayGames.PlayGamesPlatform.DebugLogEnabled' cannot be accessed with an instance reference, qualify it with a type name instead"

Should this line do something different then: "PlayGamesPlatform.DebugLogEnabled = true;"?

My code fragment:

PlayGamesPlatform.Activate ();
PlayGamesPlatform.Instance.DebugLogEnabled = true;
Social.localUser.Authenticate ((bool success) => { ...

@btco
Copy link

btco commented Mar 17, 2014

There's typo there, you're missing 'Instance':

GooglePlayGames.PlayGamesPlatform.Instance.DebugLogEnabled = true;

@ghost
Copy link
Author

ghost commented Mar 17, 2014

If i try this:

PlayGamesPlatform.Activate ();
GooglePlayGames.PlayGamesPlatform.Instance.DebugLogEnabled = true;
Social.localUser.Authenticate ((bool success) => {...

I still get this error:

"Assets/Scripts/MenuControllScript.cs(294,68): error CS0176: Static member `GooglePlayGames.PlayGamesPlatform.DebugLogEnabled' cannot be accessed with an instance reference, qualify it with a type name instead"

Are you sure that I need the "Instance"?

@btco
Copy link

btco commented Mar 17, 2014

Hmmm try this instead:

GooglePlayGames.PlayGamesPlatform.DebugLogEnabled = true;
PlayGamesPlatform.Activate ();
Social.localUser.Authenticate ((bool success) => {...

@ghost
Copy link
Author

ghost commented Mar 17, 2014

I think that is what I did for the last log. But I'll try it. Oh I think I should filter for another Tag in logcat i that possible?

@btco
Copy link

btco commented Mar 17, 2014

If possible, show me the whole logcat. Things come in with a lot of different tags.

If you can, clear your logcat before running the test (with "adb logcat -c") so that the log will only contain the test's output.

@ghost
Copy link
Author

ghost commented Mar 17, 2014

Actually I am not able to reproduce it. I will change back from the .jar you uploaded to the old one. I don't get it why I am sometimes be able to reproduce it, sometimes I get the error without logging out and now I am not able to reproduce it.

I'll try it with the old files now. Moment pls.

Is there a way to submit this log to you in private? Would like to not show all IDs etc. to the complete internet. ;)

@wired
Copy link

wired commented Mar 17, 2014

http://dpaste.com/1740679/

This is using the test jar you posted.
I still have the same issue.

@ghost
Copy link
Author

ghost commented Mar 17, 2014

Now that I know what you need...:

http://pastebin.com/XdxLjLrU

@btco
Copy link

btco commented Mar 17, 2014

Ok, from the logs and some investigation (and especially with the help of friikyeu@), it looks like this is what's happening:

  1. When the sign-in helper activity (SignInHelperActivity.java in the plugin support library) reports sign in success, the main Activity (the game) starts its sign in flow; this happens in GameHelperManager.cs, OnSignInSucceeded.
  2. The sign-in helper Activity quits and the game gets OnApplicationPaused false, causing GameHelperManager to start the sign in flow and set the "connecting" flag

Depending on the order these two things happen, the game activity gets into a state where it thinks it's undergoing a connection flow when in fact it isn't. Particularly, when (1) happens before (2), the result is that (2) will set the state to "connecting" even though (1) has already done that, so the race condition causes the state to remain as "connecting" forever, which means actions will be put on the queue.

I'm rolling out a fix to this bug in the next few days.

@wired
Copy link

wired commented Mar 17, 2014

Good to hear, thank you for looking into it. Can't wait for the fix :)

btco pushed a commit that referenced this issue Mar 18, 2014
…r; bug fixes.

New features:
    * Turn-based multiplayer (iOS, Android)
    * Real-time multiplayer (iOS, Android)
Bug fixes:
    * #49 - double cancellation necessary
    * #40 - add account crashes app
    * #25 - Action Scheduled for Later
    * properly close Achievement buffer
    * fix memory management on iOS
    * minor fixes
@btco
Copy link

btco commented Mar 18, 2014

I believe this is fixed in 0.9.00. Please reopen this issue if this is not the case.

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

No branches or pull requests

5 participants