WSATestCertificate.pfx' certificate inside a project.

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

skyboardstudios
Posts: 3
Joined: 18 Jun 2015, 17:54

WSATestCertificate.pfx' certificate inside a project.

Postby skyboardstudios » 22 Jun 2015, 17:23

I am getting this error message during runtime.

Image

I have copied the latest client DLL into my project. I have been using the MMORoom example project as a intial base project.

If you take a look at the reference of the PFX you will see it is pointing to the environment of a GotoAndPlay company computer...

Thanks alot
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: WSATestCertificate.pfx' certificate inside a project.

Postby Bax » 23 Jun 2015, 16:24

That file is generated when building the project for Windows / Windows Store.
We should have deleted it. Is it in your project's folder?
Paolo Bax
The SmartFoxServer Team
aiaustin
Posts: 23
Joined: 19 May 2011, 13:33

Re: WSATestCertificate.pfx' certificate inside a project.

Postby aiaustin » 11 Sep 2015, 16:07

Odd, I am just setting up a new environment SFS2X 2.10 server and installed the Unity5 MMORoomDemo project .. I have not (yet) made any changes at all to the demonstration code or assets. On loading the project it immediately shows the "Please move 'Z:/gotoAndPlay/Workspaces/Unity 5/[official examples]/MMORoomDemo/Assets/WSATestCertificate.pfx' certificate inside a project." error..

I saw this thread and changed the build to the web player but it still shows these two errors... any thoughts on how to fix it?

Security Exception. Policy file loading failed!
UnityEngine.Debug:LogError(Object)
ConnectionUI:Start() (at Assets/Scripts/ConnectionUI.cs:55)

Please move 'Z:/gotoAndPlay/Workspaces/Unity 5/[official examples]/MMORoomDemo/Assets/WSATestCertificate.pfx' certificate inside a project.
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: WSATestCertificate.pfx' certificate inside a project.

Postby Bax » 12 Sep 2015, 09:53

Are you sure you are using the latest version of the example?
Because I checked it and that file is not in the assets folder anymore.
You can get the latest examples package here: http://www.smartfoxserver.com/download/sfs2x#p=examples
Paolo Bax
The SmartFoxServer Team
aiaustin
Posts: 23
Joined: 19 May 2011, 13:33

Re: WSATestCertificate.pfx' certificate inside a project.

Postby aiaustin » 12 Sep 2015, 13:50

Hi Paolo / @Bax... yes I am definitely using the latest version from
http://www.smartfoxserver.com/download/sfs2x#p=examples

I checked carefully and just redownloaded and tried it again on a fresh Unity5 setup on a different computer. I get 3 errors and one minor warning.

Image

I also can see there is no WSATestCertificate.pfx file or asset in the Assets folder.. but the project on load to Unity 5 (version 5.2.0f3 if its relevant) shows that error so something must be referring to it in the assets or project material still... I don't have a Z: drive so I guess its from your own development environment.

Image

I did try changing the default Standalone build setting to Web Player in case there was an insistence on a signed cert for the project to build in Unity. I saved that, exited Unity and re-started Unity with the MMORoomDemo but the one error related to WSATestCertificate.pfx still shows.

P.S. I downloaded the HTML5 examples zip too for a look just now from same URL as above and when I used winzip to unzip that I get 3 errors on some dot (".") files that are included in the folder "BuddyMessenger/libs/jqwidgets/.BettterZipTempFolder_..../".

Image
aiaustin
Posts: 23
Joined: 19 May 2011, 13:33

Re: WSATestCertificate.pfx' certificate inside a project.

Postby aiaustin » 12 Sep 2015, 19:50

I did try putting a fake Assets/WSATestCertificate.pxf file in the Project but that does not change the errors.

I also did a Web player build anyway to try things even with the error showing and that throws a second similar error with reference to UnityEditor.HostView:OnGUI() added

Please move 'Z:/gotoAndPlay/Workspaces/Unity 5/[official examples]/MMORoomDemo/Assets/WSATestCertificate.pfx' certificate inside a project.
UnityEditor.HostView:OnGUI()
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: WSATestCertificate.pfx' certificate inside a project.

Postby Bax » 14 Sep 2015, 07:45

I don't understand what might cause this behavior, and unfortunately I can't reproduce it. I suppose something is written in those .asset files in the ProjectSettings folder.
I suggest a different approach: create a new empty project in Unity, then copy only the Assets folder from the example's zip package to the new project.
It should reimport all the actual assets and hopefully get rid of that error.
Can you try this? Let me know.
Paolo Bax
The SmartFoxServer Team
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: WSATestCertificate.pfx' certificate inside a project.

Postby Bax » 14 Sep 2015, 07:52

aiaustin wrote:P.S. I downloaded the HTML5 examples zip too for a look just now from same URL as above and when I used winzip to unzip that I get 3 errors on some dot (".") files that are included in the folder "BuddyMessenger/libs/jqwidgets/.BettterZipTempFolder_..../".

Thank you for reporting. We removed that folder and uploaded the updated zip to our website.
Paolo Bax
The SmartFoxServer Team
aiaustin
Posts: 23
Joined: 19 May 2011, 13:33

Re: WSATestCertificate.pfx' certificate inside a project.

Postby aiaustin » 14 Sep 2015, 09:41

Certainly... testing now. Environment is Windows 10 Pro, Unity 5.2.0f3, SFS2X 2.10, and freshly downloaded Unity5 examples as of a few minutes ago.

1. Create New Unity project, save and exit.
2. unzip MMORoomDemo example and copy ONLY "Assets" folder to new project.
3. Restart Unity and open the modified project. And voila, the .pfx error is no longer there.
4. Just to report that there is one 'Argument is out of range' error (see below) and one minor warning (on a space in a name of a Unity Standard Asset ' skybox info.txt' perversely) do show.
5. Rename the skybox to remove the space in the filename, save the project and exit.
6. Reenter Unity with the project and the previously reported error has gone. I think that is a Unity issue not SFS2X, I have noticed quite a few times that a simple save, exit and re-enter gets rid of some initially reported errors in imported projects. I have no idea why.
7. I had to re-establish the "Build Settings" to manually add the two scenes to the build and change the default company name to "SmartFoxServer", but then I could do a build.
8. Build for Web Server tested fine against my trial SFS2X 2.10 server setup, but trying to run the project in the Unity editor/game preview window crashed Unity.

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentOutOfRangeException: Argument is out of range.
at Mono.Collections.Generic.Collection`1[Mono.Cecil.ParameterDefinition].get_Item (Int32 index) [0x00000] in <filename unknown>:0
at AssemblyUpdater.Steps.MemberReferenceReplacer.MemberReferenceReplacementFor (Mono.Cecil.MethodReference methodReference) [0x00000] in <filename unknown>:0
at AssemblyUpdater.Steps.MemberReferenceReplacer.Visit (Mono.Cecil.MethodReference methodReference, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
at Unity.Cecil.Visitor.Visitor.Visit (Mono.Cecil.Cil.Instruction instruction, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
at Unity.Cecil.Visitor.Visitor.Visit (Mono.Cecil.Cil.MethodBody methodBody, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
at Unity.Cecil.Visitor.Visitor.Visit (Mono.Cecil.MethodDefinition methodDefinition, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
at Unity.Cecil.Visitor.Visitor.Visit (Mono.Cecil.TypeDefinition typeDefinition, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0

' skybox info.txt' is not a recommended asset file name. Please make sure that it does not start with a space or contain characters like ?, <, >, :, *, |, ".
aiaustin
Posts: 23
Joined: 19 May 2011, 13:33

Re: WSATestCertificate.pfx' certificate inside a project.

Postby aiaustin » 14 Sep 2015, 09:54

One further save, exit and re-enter Unity and trying again in the editor game preview and this time it did run showing one error... the usual one about

Security Exception. Policy file loading failed!
UnityEngine.Debug:LogError(Object)
ConnectionUI:Start() (at D:/Unity5/SFSX2-MMORoomDemo-Fresh/Assets/Scripts/ConnectionUI.cs:55)

which does not show when the properly built Web Server build is used.
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: WSATestCertificate.pfx' certificate inside a project.

Postby Bax » 14 Sep 2015, 10:10

Glad the pfx error has gone away.
About the other error you got, it didn't seem related to SFS2X... glad you solved it too. Maybe a Unity glitch..

About the policy issue... In my test environment I get that error if SFS is not running only. Otherwise everything works as expected.
Did you change the connection settings in the inspector (for the "UI" game object)? Maybe you changed the host to a domain name?
Paolo Bax
The SmartFoxServer Team
aiaustin
Posts: 23
Joined: 19 May 2011, 13:33

Re: WSATestCertificate.pfx' certificate inside a project.

Postby aiaustin » 14 Sep 2015, 11:24

Nothing special. SFS2X was running. I changed the machine IP in the Unity editor inspector to the IP address of the server that SFS2X was on.. a machine still on the same subnet.

The " skybox info.txt" problem by the way was a space at the START of the file name. In the usual Standard Assets its got an underbar there.

I am working my way through tutorials and trying the example... just holler if you don't appreciate the notes and I will stop :-)

--------------------
In the Unity5 Examples Connector.cs script around line 30.. to keep everything nice and clean, I suggest enclosing the declaration of defaultWsPort in an #if UNITY_WEBGL compile time wrapper...

#if UNITY_WEBGL
private int defaultWsPort = 8888; // Default WebSocket port
#endif

----------------------
If I do a PC Standalone build of "Connector" I see 4 errors... these may all be in C# assemblies that are not actually used in the example..

Shader error in 'Hidden/NFAA': Compiled shader code uses too many instruction slots (112). Max. allowed by the target (ps_2_0) is 96. at line 1 (on d3d9)

Shader error in 'Hidden/NFAA': Compiled shader code uses too many instruction slots (99). Max. allowed by the target (ps_2_0) is 96. at line 1 (on d3d9)

Shader error in 'Hidden/NFAA': Too many math instructions for SM2.0 (99 needed, max is 64). Try #pragma target 3.0 at line 78 (on d3d9)

Shader error in 'Hidden/NFAA': Too many math instructions for SM2.0 (91 needed, max is 64). Try #pragma target 3.0 at line 114 (on d3d9)

If #pragma target 3.0 is added into that code, it does then compile, but with 6 further warnings.
aiaustin
Posts: 23
Joined: 19 May 2011, 13:33

Re: WSATestCertificate.pfx' certificate inside a project.

Postby aiaustin » 14 Sep 2015, 13:35

Its a little off the topic.. but in completing my initial testing I used the lessons learned above to set up a clean server on a new computer and all made sense except that for the Unity MMODemoRoom example on testing SFX2X using two clients neither could see the other avatar or the 50 NPCs.

I had had this problem with the original setup too, but fiddling about they had suddenly started to show up and the BasicExamples room was created and had 50 NPCs in it. The room seemed to persist even when the two real clients logged off but I assume that's the current logic in the demo and that some sort of NPC will code would need to be added to fix that.

I do have the pyTest/MMORoomDemo.py extension in place. I have restarted the server after that, and I have tried running as administrator ad otherwise but the extension does not seem to be active when running the Unity MMORoomDemo example.

Is there a line missing in the Installation in >> Running the example >> instructions section of

http://docs2x.smartfoxserver.com/ExamplesUnity/mmo-demo

that perhaps explains how to activate extensions for a room. The documentation implied it was automatic I think. I checked the zone .xml files on the working system and the clean build and they look identical... the extension XML parts having the default empty fields.
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: WSATestCertificate.pfx' certificate inside a project.

Postby Bax » 16 Sep 2015, 08:32

aiaustin wrote:I am working my way through tutorials and trying the example... just holler if you don't appreciate the notes and I will stop :-)

Don't worry. We always appreciate comments helping us to improve SmartFoxServer, the examples, the APIs, etc.
Just keep in mind that the examples have been created to showcase the API features, so they are not super-refined and sometimes we didn't take care of all the warnings. In addition some of the warnings you reported are not displayed on our systems: unfortunately we have seen this happen often in Unity: same platform, same project and settings, different behavior.
Also, some warnings are due to changes in Unity's newer releases, or different features set in different target builds. We do our best to keep the examples up-to-date with the Unity changes, but it's not that easy.
Anyway, thank you for the suggestions.
Paolo Bax
The SmartFoxServer Team
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: WSATestCertificate.pfx' certificate inside a project.

Postby Bax » 16 Sep 2015, 08:57

aiaustin wrote:Is there a line missing in the Installation in >> Running the example >> instructions section of
http://docs2x.smartfoxserver.com/ExamplesUnity/mmo-demo
that perhaps explains how to activate extensions for a room. The documentation implied it was automatic I think. I checked the zone .xml files on the working system and the clean build and they look identical... the extension XML parts having the default empty fields.

This is not needed because the example creates its own Room (called UnityMMODemo), hooking the Extension to it via code (see ConnectionUI script, OnLogin event handler).
Not sure why it didn't work for you in the beginning. Did you check the logs for possible errors?
Paolo Bax
The SmartFoxServer Team

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Stevenor and 118 guests