Notifications
Clear all

WebGL

12 Posts
2 Users
0 Reactions
934 Views
(@artyom)
Posts: 16
Eminent Member
Topic starter
 

Hello, I have some problem with WebGL.

When I work in Editor, I can communicate with server. I can log in, and log out to/from my game.

But when I make the development build, I have a bug "Failed to get Combu server info

and in console I have such message "Sending message header failed"

Unity version 5.2.1

 
Posted : 21/10/2015 10:57 am
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

There were some issues in Unity WebPlayer and WebGL, read this and eventually do the tests I wrote there to see if their issues were solved.

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 21/10/2015 11:02 am
(@artyom)
Posts: 16
Eminent Member
Topic starter
 

Skared Creations said
There were some issues in Unity WebPlayer and WebGL, read this and eventually do the tests I wrote there to see if their issues were solved.

Where would I write this line of code: CBManager.instance.EncryptSHA1("635633966750300000changeme")

 
Posted : 21/10/2015 11:11 am
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

Create an empty scene and a new script that in OnGUI prints with that line (CBManager became CombuManager now), then build for WebGL and see if the results in editor and build are the same.

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 21/10/2015 11:18 am
(@artyom)
Posts: 16
Eminent Member
Topic starter
 

I'll try to write this :

void OnGUI()
{
    string message = CombuManager.EncryptSHA1("635633966750300000changeme");
    print(message);
}

instance doesn't work, because EncryptSHA1 is static.

when I press play in Editor, in console I have such message:

bccc6ffc5f065e9bd42509e772f7105323a50e07
UnityEngine.MonoBehaviour:print(Object)
TEST:OnGUI() (at Assets/TEST.cs:20)

but when I made a build:

Sending message header failed

 
Posted : 21/10/2015 11:49 am
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

You misunderstood, I meant to print the result with GUI.Label since of course you cannot see the console log on screen in a build (unless you probably build as Development).

Anyway googling "Sending message header failed" seems to be related to Unity, for example this. As you may have seen, Combu is using only Unity classes and features so if Unity has an issue with WWW so it is for Combu as well.

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 21/10/2015 12:02 pm
(@artyom)
Posts: 16
Eminent Member
Topic starter
 

I'll write in GUI Label

void OnGUI()
{
string message = CombuManager.EncryptSHA1("635633966750300000changeme");
GUI.Label(new Rect(10,10,500,40), message);
print(message);
}

and I saw in build and in editor the same message "bccc6ffc5f065e9bd42509e772f7105323a50e07"

Is that mean, that all works correctly?

 
Posted : 21/10/2015 12:25 pm
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

Ok nice, so it seems that they fixed the issue with encryption in WebGL, so yes it should work. Please checkout my answer to your other post about crossdomain.xml

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 21/10/2015 1:42 pm
(@artyom)
Posts: 16
Eminent Member
Topic starter
 

I'll try to build Combu demo scene in Web GL , and when I 'll try to register, I have such error:

Login failed: Unknow error

 
Posted : 21/10/2015 2:24 pm
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

I really don't understand what you are doing, please send your secret key and URL in a PM so I can try myself.

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 21/10/2015 2:34 pm
(@artyom)
Posts: 16
Eminent Member
Topic starter
 

Thank you very much for your help. My game worked in WebPlayer, when I copy crossdomain.xml in a root folderbiggrin

 
Posted : 21/10/2015 2:40 pm
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

Great! Have fun with Combu! 🙂

Hope Unity fixed the issues with WWWForm submitting in WebPlayer, I remember it was bugged on some web browsers.

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 21/10/2015 3:04 pm
Share: