Page 1 of 1

Getting Error while sending ExtensionRequest

Posted: 18 Dec 2018, 09:20
by nik0990
Hi,

I am upgrading My existing server from 2.9.2 to 2.13.4 and facing few problems

Code: Select all

if (!that.sfsInstance) {
            return;
        }
        var roomObj = that.sfsInstance.getRoomByName(roomName);
       
       

        var parsm1 = new SFS2X.SFSObject();
        parsm1.putBool('test',false);

       
       
        that.sfsInstance.send(new SFS2X.ExtensionRequest("game.test", parsm1, roomObj)); // Line number 154 in sfsrequestservice.js



Getting below exception

Code: Select all


Uncaught Error: ExtensionRequest Error
    at t (SFS2X_API_JS.js:6)
    at new t (SFS2X_API_JS.js:6)
    at t.value (SFS2X_API_JS.js:6)
    at t.value (SFS2X_API_JS.js:7)
    at Object.that.sendClientReady (sfsrequestservice.js:154)
    at game.js:639

   

Re: Getting Error while sending ExtensionRequest

Posted: 18 Dec 2018, 11:01
by Bax
As the API code is minified, the error you reported is impossible to decipher.
Could you please add the .js.map file to your project, and try again? The browser console should then report a better stack trace.
Thanks.

Re: Getting Error while sending ExtensionRequest

Posted: 18 Dec 2018, 13:00
by nik0990
I am getting this error, While transferring sfs Object to other Chrome window.

While Making an extension request in room from another window, We are having that error.

Explain:

I am initiating SFS object in window "A" and send data from window "B" by accessing the sfs object from window "A".


In last JS(1.2.0), I can able to do this. But in this JS(1.7.13), I am having this issue

Re: Getting Error while sending ExtensionRequest

Posted: 18 Dec 2018, 13:27
by nik0990
Thanks, It works. :D

Re: Getting Error while sending ExtensionRequest

Posted: 18 Dec 2018, 15:20
by Bax
Can you please explain what was the issue and how you fixed? Thanks.

Re: Getting Error while sending ExtensionRequest

Posted: 19 Dec 2018, 06:59
by nik0990
Hi,

I believe that SmartFoxServer 2X is use for single page application(I hope, it is right)?

But for my game i need to open multiple windows with one SFS instance.

While shifting to Client JS(1.7.13), I am not able to achieve SFS instance sharing on multiple windows, But now i achieve that.

Re: Getting Error while sending ExtensionRequest

Posted: 19 Dec 2018, 08:39
by Bax
Out of curiosity, how did you achieve that?
Maybe using window.opener to access the main application window from secondary ones?