TypeError when running Javascript API example in firefox

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

Moderators: Lapo, Bax

pratts
Posts: 34
Joined: 23 Aug 2016, 17:46

TypeError when running Javascript API example in firefox

Postby pratts » 29 Apr 2017, 17:00

Hello,
I recently downloaded SFS 2.13 and the JS API example:HTML5 examples pack, Version: 1.4.1, Release date: Apr 27th, 2017.
I tried the example "GameLobby" and it executed successfully on google chrome but the same example is not running in firefox.
It is giving:
"TypeError: 'info' called on an object that does not implement interface Console. sfs2x-api-1.7.0.js:16:6883"
whenever I reload the page and nothing appears on the UI.
Image


I tried "Advanced Chat" example and it is also running fine on google chrome but it is also not running in firefox.
The same error is also appearing but I get the components(buttons, form) on the page but when I click connect it gives :
"TypeError: sfs is null main.js:66:2" along with the error mentioned above.
Image
Image

We are planning to switch to SFS 2.13 and use new binary protocol in JS API.

Thank you.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: TypeError when running Javascript API example in firefox

Postby Lapo » 30 Apr 2017, 14:23

Hi,
could you tell me exactly which Firefox version you're using and under which OS?

Thanks
p.s. = the images are not showing up. You can upload them directly via the forum. Take a look below the textarea when you write a new message. There's a tab called "Attachments"
Lapo
--
gotoAndPlay()
...addicted to flash games
pratts
Posts: 34
Joined: 23 Aug 2016, 17:46

Re: TypeError when running Javascript API example in firefox

Postby pratts » 01 May 2017, 06:08

OS was debian 8 and firefox was installed from its repo.
Attachments
advanced_chat_2.png
Error with advanced chat project when login triggered
(77.25 KiB) Not downloaded yet
advanced_chat_1.png
Error with advanced chat project when project loaded
(75.36 KiB) Not downloaded yet
game_lobby_1.png
Error with GameLobby project
(71.31 KiB) Not downloaded yet
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: TypeError when running Javascript API example in firefox

Postby Lapo » 01 May 2017, 13:31

It looks like an issues with older versions of Firefox. We have tested on recent FFox (ver 52.x) and did not find any issues but on an older machine with version 48.x I did reproduce the problem.

We'll take a closer look and report back. Thanks for reporting.
Lapo

--

gotoAndPlay()

...addicted to flash games
pratts
Posts: 34
Joined: 23 Aug 2016, 17:46

Re: TypeError when running Javascript API example in firefox

Postby pratts » 01 May 2017, 16:03

Thank you for replying.

I am using debian 8 and firefox version is:
prateek@prateek-debian:~$ firefox --version
Mozilla Firefox 45.9.0

P.S. - I tried the same thing on firefox in centos 7 and it worked there.
on centos:
[prateek@localhost ~]$ firefox --version
Mozilla Firefox 52.1.0
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: TypeError when running Javascript API example in firefox

Postby Lapo » 02 May 2017, 15:43

Thanks.
We have published an update that fixes the issue you have reported. However we have noticed that it persists in IE11 under Windows (not Edge however) and we'll do some extra investigation on that specific issue.

I'd recommend updating from the client API download page:
http://smartfoxserver.com/download/sfs2x#p=client

hope it helps
Lapo

--

gotoAndPlay()

...addicted to flash games
pratts
Posts: 34
Joined: 23 Aug 2016, 17:46

Re: TypeError when running Javascript API example in firefox

Postby pratts » 03 May 2017, 07:33

Thank you :)

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 55 guests