Marvin JS - Troubleshoot

Back to index

Sketch does not appear in the iframe on my page

2D clean drops error

Please, note that 2D coordinate calculation is performed at server side. Marvin JS posts the structure to the Clean2D web service that generates the new coordinates and sends it back to the editor in an MRV. The clean 2D operation can fail if

Please, check that web service is available and it is installed properly, see the installation guide of Marvin JS. If it is necessary, consult with the system administrator of the server that hosts the web services.

Stereo calculation drops error

It uses Stereo Info web service to calculate stereo info. It may be the same problem than 2D clean issue.

SMILES format does not work in Open and in Save dialog

SMILES import/export requires MolConvert web service. If it is configured for the editor but it cannot be accessed, you can get an error message. Conversion can fail in the similar cases than 2D clean fails.

Download button in Save dialog does nothing

This error may appear in the following situation:

In this case, the URL of the output file generated by the webservice is incorrect: starts with http instead of https. The browser will block downloading this unsecure content in current secure environment. On the JavaScript console you can find the trace of the blocking.

Solution

To resolve the issue, modify the proxy settings:

then edit Tomcat server.xml: add the following to the <Host> section:
<Valve className="org.apache.catalina.valves.RemoteIpValve"
remoteIpHeader="x-forwarded-for"
remoteIpProxiesHeader="x-forwarded-by"
protocolHeader="x-forwarded-proto"/>
There are other values that can be set and used: see Tomcat documentation

Back to index

At the first time after updating the package on the site, the editor is not launched.

It may be a browser caching issue. This problem occurs when the content of Marvin JS package is modified (replace to a new version) but the browser still attempts to load the old one. Since the browser has already cached the old version earlier, it tries to prefer the cached version instead of the new one. In most cases, the user may not realize that the browser loads out-dated resources by running the editor. He faces with the issue when an out-dated resource requires any resource that does exist anymore on the server.

To resolve the issue, purge out-dated content from this cache. If you apply a Shift+Reload on the current page, browser refreshes only those content in the local cache that belongs to this page. Clearing of the whole browser cache also resolves the issue.

If you would like to prevent your users to run into this issue, modify the configuration of the server where Marvin JS package is hosted. When the web server hosts a content, it can indicate that it is cacheable or not. As the browser receives the content, it considers to cache it by those information that the server wrote in the header of the content. These info can be the expiration date or various caching directives.

The best practice is skipping the caching of each file (from Marvin JS package) whose name contains the .nocache. pattern.

Apache2

If Marvin JS package is hosted by an Apache server, the recommended settings is specifying a Cache-Control directive the HTTP headers of those files where the given pattern match. When you modify its config file, please, check whether the mod_expires module is switched on.
<ifmodule mod_expires.c>
  <Files *.nocache.*>
    ExpiresActive on
    ExpiresDefault "access"
    Header merge Cache-Control "public, max-age=0, must-revalidate"
  </Files>
</ifmodule>

Tomcat 7

If Marvin JS is wrapped into a web application, there is the chance to control what directives appear in the HTTP headers of web application contents. Under Tomcat 7, you can apply a built in filter or define a new one to modify HTTP headers for your web application. Please consult with the manual of your servlet container, how to switch off caching for each file whose name contains the .nocache. pattern.

If you manage to achieve that the response header contains the following lines at *.nocache.* files, it is enough to prevent their caching.

Cache-Control	no-cache, no-store
Pragma	no-cache