Forum Feedback Reference code: c0b8cb81 - PlayerIO.authenticate

Problem with the website? Confused about something? Or maybe you just have something you'd like to suggest. This is the place to do it.

Reference code: c0b8cb81 - PlayerIO.authenticate

Postby benoffi7 » May 30th, 2018, 4:16 pm

Hi!
I get this error when I call to authenticate a user

Code: Select all
at com.playerio.PlayerIOChannel.GetError(PlayerIOChannel.java:48)
        at com.playerio.PlayerIOChannelProtobufHttp$1.run(PlayerIOChannelProtobufHttp.java:78)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
        at java.lang.Thread.run(Thread.java:818)


An unexpected error occurred inside the Player.IO webservice. Please try again. - Reference code: c0b8cb81


Code: Select all
HashMap<String, String> authenticationArguments = new HashMap<String, String>();
        authenticationArguments.put("username",gcm);
        authenticationArguments.put("password",gcm);
        authenticationArguments.put("userId",gcm);

        PlayerIO.authenticate(appCompatActivity,"XXXXXX","public",authenticationArguments,null, new Callback<Client>() {
            @Override
            public void onSuccess(Client cliente)
            {
               
            }

            @Override
            public void onError(PlayerIOError playerIOError)
            {
                playerIOError.printStackTrace();
               
            }
        });

Thanks!
Last edited by benoffi7 on June 9th, 2018, 2:49 am, edited 1 time in total.
benoffi7
 
Posts: 4
Joined: May 21st, 2018, 11:34 pm

Re: Reference code: c0b8cb81 - PlayerIO.authenticate

Postby Henrik » June 9th, 2018, 2:39 am

Hey benoffi7,

When you use Basic Authentication, the userId parameter can't be longer than 60 characters. I've fixed it so that you'll get a better error message saying so, instead of what you got now. This fix will go out in the next release.

I see you're passing in three authentication arguments, for Basic Authentication you actually only need the 'userId' parameter. The others are what a Simple Users Authentication would expect, so I'm guessing you're just trying things out?

Out of curiosity, what's the value of your gcm variable? Did you just randomly enter a large userId, or were you trying to use something specific as userId?
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Reference code: c0b8cb81 - PlayerIO.authenticate

Postby benoffi7 » June 9th, 2018, 2:48 am

Henrik wrote:Hey benoffi7,

When you use Basic Authentication, the userId parameter can't be longer than 60 characters. I've fixed it so that you'll get a better error message saying so, instead of what you got now. This fix will go out in the next release.



I realized later when I went back to the changes where the user was "test". Also thanks for the improvement and the response. It's good to read someone from the other side

Henrik wrote:Hey benoffi7,

I see you're passing in three authentication arguments, for Basic Authentication you actually only need the 'userId' parameter. The others are what a Simple Users Authentication would expect, so I'm guessing you're just trying things out?



In my application there is no concept of user type with name and password but I want to identify each one to assign achievements. The user never enters as it is called. The app assigns you an id

Henrik wrote:Hey benoffi7,
Out of curiosity, what's the value of your gcm variable? Did you just randomly enter a large userId, or were you trying to use something specific as userId?



The google cloud messasging id
benoffi7
 
Posts: 4
Joined: May 21st, 2018, 11:34 pm

Re: Reference code: c0b8cb81 - PlayerIO.authenticate

Postby Henrik » June 9th, 2018, 4:34 am

How large are Google Cloud Messaging ids? Longer than 60 characters?
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Reference code: c0b8cb81 - PlayerIO.authenticate

Postby benoffi7 » June 9th, 2018, 3:04 pm

Henrik wrote:How large are Google Cloud Messaging ids? Longer than 60 characters?



This is a example

APA91bHPRgkF3JUikC4ENAHEeMrd41Zxv3hVZjC9KtT8OvPVGJ-hQMRKRrZuJAEcl7B338qju59zJMjw2DELjzEvxwYv7hH5Ynpc1ODQ0aT4U4OFEeco8ohsN5PjL1iC2dNtk2BAokeMCg2ZXKqpc8FXKmhX94kIxQ

Users have observed it is 255 characters.
benoffi7
 
Posts: 4
Joined: May 21st, 2018, 11:34 pm

Re: Reference code: c0b8cb81 - PlayerIO.authenticate

Postby Henrik » June 12th, 2018, 2:11 am

Okay. Why are you authenticating to PlayerIO with the GCM ID? Are you planning on using those as permanent user identifiers for your players?

The reason I'm asking is that we could potentially increase the limit on user ids for Basic Authentication, I just want to make sure that I understand your use-case first.
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Reference code: c0b8cb81 - PlayerIO.authenticate

Postby benoffi7 » June 12th, 2018, 12:50 pm

Henrik wrote:Okay. Why are you authenticating to PlayerIO with the GCM ID? Are you planning on using those as permanent user identifiers for your players?


Yes, this is a unique identifier for my users to send notifications and it is by Google so I dont worry about generate o administrate

Henrik wrote:The reason I'm asking is that we could potentially increase the limit on user ids for Basic Authentication, I just want to make sure that I understand your use-case first.


Its a good idea, yes! Maybe some android users will use the GCM ID. My case is special because there is not UI for Register or Login. I dont want another information for the user
benoffi7
 
Posts: 4
Joined: May 21st, 2018, 11:34 pm

Re: Reference code: c0b8cb81 - PlayerIO.authenticate

Postby Henrik » June 20th, 2018, 6:04 am

In the meantime, if you want to use GCM IDs as PlayerIO UserIDs, you can hash them down to 60 characters, that should work perfectly, and is fairly simple to do.
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Reference code: c0b8cb81 - PlayerIO.authenticate

Postby Emalton » June 29th, 2018, 8:07 pm

Can database object property expressions be increased to 60 characters as well?
Emalton
 
Posts: 86
Joined: June 28th, 2013, 3:49 am


Return to Feedback



cron