Sketch Does Not Appear in the Iframe on My Page

    Please, check whether the reference to editor.html or editorws.html in the src attribute of the iframe is correct. Sketch requires HTML5 canvas. Please, check whether your browser supports HTML5 canvas. It is not available in old browsers like IE8.

    2D Clean Throws an 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 MRV format. The clean 2D operation can fail in the following cases:

    • The web service is not available on the expected URL.
    • The browser may block the communication between Marvin JS and the server since it harms the same-origin policy of the browser.
    • Internal server error occurs during performing the calculation.

    Please, check that the 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 Throws an Error

    It uses the Stereo Info web service to calculate the stereo info. The stereo calculation can fail for the same reasons as the clean 2D operation.

    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 similar cases than 2D clean fails.

    Download Button in Save Dialog Does Nothing

    This error may appear in the following situation:

    • Desired output format is different than MDL molfile or Marvin Document (output file is generated on the remote server by the MolConvert web service).
    • The web page where Marvin JS is embedded is accessed via HTTP secure protocol (its URL address starts with https://).
    • A proxy is configured as a frontend for the Tomcat servlet container (where MolConvert web service is located) and the proxy is configured for https while Tomcat is not.

    In this case, the URL of the output file generated by the web service is incorrect; it 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.


    To resolve the issue, modify the proxy settings:

    • If the proxy is apache: RequestHeader set X-Forwarded-Proto "https"
    • If the proxy is nginx: more_set_headers "X-Forwarded-Proto: https";

    Then edit the Tomcat server.xml and add the following to the <Host> section:

    <Valve className="org.apache.catalina.valves.RemoteIpValve"

    There are other values that can be set and used, see the Tomcat documentation.

    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 (updated 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 outdated 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 the outdated content from the 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.