Plotly.js IIS deployment - WebGL setup failed

311 views Asked by At

i tried to deploy my plotly application to an IIS (running under windows server 2012). Unfortunately, the graph is not shown and an error is logged out:

WARN: webgl setup failed possibly due to enabling preserveDrawingBuffer config. The device may not be supported by is-mobile module! Inverting preserveDrawingBuffer option in second attempt to create webgl scene.

as I figured out using the error page, I have to add some rewrites/mime types to my web.config. But it still doesn’t work after.

My web.config looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
            <staticContent>

<remove fileExtension=".mem" />
<mimeMap fileExtension=".mem" mimeType="application/octet-stream" />
<remove fileExtension=".data" />
<mimeMap fileExtension=".data" mimeType="application/octet-stream" />
<remove fileExtension=".memgz" />
<mimeMap fileExtension=".memgz" mimeType="application/octet-stream" />
<remove fileExtension=".datagz" />
<mimeMap fileExtension=".datagz" mimeType="application/octet-stream" />
<remove fileExtension=".unity3dgz" />
<mimeMap fileExtension=".unity3dgz" mimeType="application/octet-stream" />
<remove fileExtension=".jsgz" />
<mimeMap fileExtension=".jsgz" mimeType="application/x-javascript; charset=UTF-8" />

            </staticContent>
            <rewrite>
                    <outboundRules>
                        <rule name="Append gzip Content-Encoding header">
                            <match serverVariable="RESPONSE_Content-Encoding" pattern=".*" />
                            <conditions>
                                    <add input="{REQUEST_FILENAME}" pattern="\.unityweb$" />
                            </conditions>
                            <action type="Rewrite" value="gzip" />
                        </rule>
                    </outboundRules>
            </rewrite>
    </system.webServer>
</configuration>

Dou you have an idea, how to cope with this error?

1

There are 1 answers

0
user3066027 On BEST ANSWER

problem was not caused by IIS (as the error misleadingly states). Error is caused by the current version of plotly, downgrading to version 1.43 fixed the issue.

Somehow the minified version of the new plotly version is not valid.