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.
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:
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.
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 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.
This error may appear in the following situation:
https://
).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:
RequestHeader set X-Forwarded-Proto "https"
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"
remoteIpHeader="x-forwarded-for"
remoteIpProxiesHeader="x-forwarded-by"
protocolHeader="x-forwarded-proto"/>
There are other values that can be set and used, see the Tomcat documentation.
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.