Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / HTML5 -Failed to load resource: the server responded with a status of 401 () - On uploading scores to server at end of game

Author
Message
yoda333
12
Years of Service
User Offline
Joined: 3rd Apr 2012
Location:
Posted: 1st Jan 2017 12:14 Edited at: 6th Jan 2017 19:04
Hi - At the end of my online game - i'm receiving a long delay due to Scripts Error (A red shield appears on the Right Hand Side of the url field - at the top of the browser) in Google Chrome
this is the url of my game https://rockabilly19.com/rocktheworld/index.html

As an apk android app - the scores upload fine to my webhost server.

Selecting view, developer, javascript console i have the following displayed in Google Chrome.
*******************************************************************************************************************************************
Failed to load resource: the server responded with a status of 401 ()
https://realtimesupport.clients6.google.com/v2/customers/me/availabilities?…R&client_version=1481446959321&key=AIzaSyB5V4SIBGmrqREm7kf2fBJgPcBMCdUrLzE
*******************************************************************************************************************************************

I hope someone can assist. Thanks

Im using these functions in my game to upload scores

tboy
11
Years of Service
User Offline
Joined: 1st Jan 2013
Location: UK
Posted: 1st Jan 2017 13:51
401 is an authentication error as you're probably aware, so your credentials are not being verified,
my guess is that the browser is blocking the connection.

Have you tried setting httpsOn = 1 in your code as I would assume going from a non-secure connection
to a secure connection could result in blocking.

Perhaps someone else will have a better idea.

yoda333
12
Years of Service
User Offline
Joined: 3rd Apr 2012
Location:
Posted: 1st Jan 2017 20:18 Edited at: 1st Jan 2017 20:21
Hello tboy

I've tried what has been suggested httpsOn=1 and also disabled secure directory - SecureDirectory=0
So while I wait for an answer - i'm no longer calling these functions.

Thanks for the reply and your assistance
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 5th Jan 2017 14:51
Unfortunately the tool we use for HTTP requests on HTML5 does not support username and password type authentication
yoda333
12
Years of Service
User Offline
Joined: 3rd Apr 2012
Location:
Posted: 6th Jan 2017 11:35
Hi Paul

Thanks for the reply. Can I simply post$ the scores without secure directory. I've set SecureDirectory=0 - still getting the error described above.

Thanks
yoda333
yoda333
12
Years of Service
User Offline
Joined: 3rd Apr 2012
Location:
Posted: 6th Jan 2017 18:44 Edited at: 6th Jan 2017 19:04
Hi Thanks for your help guys. It works as follows.




Cheers yoda333
tboy
11
Years of Service
User Offline
Joined: 1st Jan 2013
Location: UK
Posted: 6th Jan 2017 20:17
Glad you got it sorted, awesome work!

Login to post a reply

Server time is: 2024-09-29 21:17:20
Your offset time is: 2024-09-29 21:17:20