Getting Error while sending ExtensionRequest

Post here your questions about the HTML5 / JavaScript for SFS2X

Moderators: Lapo, Bax

nik0990
Posts: 63
Joined: 23 Dec 2016, 10:48
Location: India

Getting Error while sending ExtensionRequest

Postby nik0990 » 18 Dec 2018, 09:20

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

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

Re: Getting Error while sending ExtensionRequest

Postby Bax » 18 Dec 2018, 11:01

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.
Paolo Bax
The SmartFoxServer Team
nik0990
Posts: 63
Joined: 23 Dec 2016, 10:48
Location: India

Re: Getting Error while sending ExtensionRequest

Postby nik0990 » 18 Dec 2018, 13:00

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
nik0990
Posts: 63
Joined: 23 Dec 2016, 10:48
Location: India

Re: Getting Error while sending ExtensionRequest

Postby nik0990 » 18 Dec 2018, 13:27

Thanks, It works. :D
User avatar
Bax
Site Admin
Posts: 4479
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Getting Error while sending ExtensionRequest

Postby Bax » 18 Dec 2018, 15:20

Can you please explain what was the issue and how you fixed? Thanks.
Paolo Bax
The SmartFoxServer Team
nik0990
Posts: 63
Joined: 23 Dec 2016, 10:48
Location: India

Re: Getting Error while sending ExtensionRequest

Postby nik0990 » 19 Dec 2018, 06:59

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.
User avatar
Bax
Site Admin
Posts: 4479
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Getting Error while sending ExtensionRequest

Postby Bax » 19 Dec 2018, 08:39

Out of curiosity, how did you achieve that?
Maybe using window.opener to access the main application window from secondary ones?
Paolo Bax
The SmartFoxServer Team

Return to “SFS2X HTML5 / JavaScript API”

Who is online

Users browsing this forum: No registered users and 1 guest