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.
Import/export button does not work on demo example page
The initialization of the example failed, the custom JavaScript does not find the reference to the sketcher. Possible reasons behind it:
- When the iframe is empty, the editor is not alive, thus it cannot be referred.
- Error message on the JavaScript console:
Error: Permission denied to access property 'marvin'
: The browser blocks accessing of the iframe content from external JavaScript code if it violates the same-origin policy. The browser considers that the hosted page and the iframe content come from the same-origin. If both arrives from the local filesystem (file://...), in most cases they are identified as different origins. See: Same-origin policy for file: URIs
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 than sends them back to the editor as an MRV file. The clean 2D operation may fail if:
- 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 for the details. If necessary, consult with the system administrator of the server that hosts the web services.
Stereo calculation drops error
In this case, the Stereo Info web service is used to calculate stereo information. It may be the same problem as the 2D clean issue.
SMILES format does not work in Open and Save dialog
SMILES import/export requires the 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:
Desired output format is different than MDL molfile or Marvin Document (output file is generated on the remote server by the MolConvert Webservice).
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 Tomcat servlet container (where MolConvert Webservice is located) and the proxy is configured for https while Tomcat not.
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:
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 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