Internet Explorer 11 not supported?

Post here your questions about the HTML5 / JavaScript for SFS2X

Moderators: Lapo, Bax

User avatar
rewb0rn
Posts: 177
Joined: 26 Jan 2009, 12:54
Location: Berlin, Germany

Internet Explorer 11 not supported?

Postby rewb0rn » 15 May 2018, 19:42

Hi team,

we are currently having an error with the JS client API 1.7.10 in the browser Internet Explorer 11.

The message is "'Symbol' is undefined" and it results in the whole SFS2X-API not being initialized and hence not available.

It seems that in version 1.7.10 of the JS API you are using the "Symbol"-feature which requires according to my investigation ECMA-Script 6. But unfortunately IE 11 does not support ECMA-Script 6.

We also tried to jump back to Version 1.7.1, which seemed to work fine with IE 11, but we can not use it with the binary sockets protocol.

Is this a known problem? We currently have around 15% of our users in Internet Explorer 11, so it seems a bit too early to drop this browser. Any advise is appreciated.

Thanks in advance,
Ruben
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Internet Explorer 11 not supported?

Postby Bax » 16 May 2018, 15:06

Hi.
Our API were fully compatible with IE11 until v1.7.9.
It seems the new build system introduced in v1.7.10 has broken something, despite we didn't change the actual code.
Let us investigate more. We will let you know soon.
Paolo Bax
The SmartFoxServer Team
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Internet Explorer 11 not supported?

Postby Bax » 16 May 2018, 15:55

Ok, issue solved.
You should load the babel-polyfill library before the SFS2X API file, like this:

Code: Select all

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/6.26.0/polyfill.min.js"></script>
<script type="text/javascript" src="libs/sfs2x-api-1.7.10.js"></script>

This provides compatibility with the Symbol object, not available in IE11.
We will add a specific note in the API documentation.
Thank you for pointing out the issue.
Paolo Bax
The SmartFoxServer Team
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Internet Explorer 11 not supported?

Postby Bax » 16 May 2018, 16:39

In case you are using npm (as described in this tutorial: http://docs2x.smartfoxserver.com/Exampl ... pm-webpack), you should install the babel-polyfill library available in the npm repository and then import it using this statement at the very beginning of your entry file:

Code: Select all

import "babel-polyfill";
Paolo Bax
The SmartFoxServer Team
User avatar
rewb0rn
Posts: 177
Joined: 26 Jan 2009, 12:54
Location: Berlin, Germany

Re: Internet Explorer 11 not supported?

Postby rewb0rn » 17 May 2018, 09:33

Thanks Paolo, great news!

I will forward this internally and let you know if this solves the problem for us.

Kind regards,
Ruben
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Internet Explorer 11 not supported?

Postby Bax » 17 May 2018, 09:38

Actually we are investigating if we can avoid forcing developers to import a separate library.
If everything works well we will release an API version including the polyfill needed to fix the IE11 compatibility.
I'll let you know soon.
Paolo Bax
The SmartFoxServer Team
User avatar
rewb0rn
Posts: 177
Joined: 26 Jan 2009, 12:54
Location: Berlin, Germany

Re: Internet Explorer 11 not supported?

Postby rewb0rn » 17 May 2018, 10:44

Hi Bax,

thanks! The build is working now in IE11 so the suggested fix solved the problem. I will also keep an eye out for a new release of the client API, but we got it working which is the most important part :)

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

Re: Internet Explorer 11 not supported?

Postby Bax » 17 May 2018, 15:56

The new version is available in the download section of our website.
Again, thank you for pointing out the issue.
Paolo Bax
The SmartFoxServer Team

Return to “SFS2X HTML5 / JavaScript API”

Who is online

Users browsing this forum: No registered users and 10 guests