AnsweredAssumed Answered

404 Error on LTI launch for local running test app

Question asked by Trip Gould on Jan 17, 2019
Latest reply on Jan 30, 2019 by Peter Love

I am developing an external tool for Canvas integration.  The app and all of its endpoints function properly when running in a browser tab, but when launched from the Canvas editor button I have created for my LTI placement, the route returns a 404 error and a message in the launched modal UI stating "Cannot POST /lti_launch".  I have tried setting up multiple routes just to see and they all end up with "Cannot POST /<my route here>".

 

I have made sure that etc/hosts has been edited to point 127.0.0.1 to my domain -- in this case the format is:

127.0.0.1 canvas.myapp.com 

-- and that DNS setup does work when outside of the Canvas LTI launch modal in a standard browser tab.

 

My XML is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<cartridge_basiclti_link xmlns="http://www.imsglobal.org/xsd/imslticc_v1p0"
xmlns:blti = "http://www.imsglobal.org/xsd/imsbasiclti_v1p0"
xmlns:lticm ="http://www.imsglobal.org/xsd/imslticm_v1p0"
xmlns:lticp ="http://www.imsglobal.org/xsd/imslticp_v1p0"
xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation = "http://www.imsglobal.org/xsd/imslticc_v1p0 http://www.imsglobal.org/xsd/lti/ltiv1p0/imslticc_v1p0.xsd
http://www.imsglobal.org/xsd/imsbasiclti_v1p0 http://www.imsglobal.org/xsd/lti/ltiv1p0/imsbasiclti_v1p0.xsd
http://www.imsglobal.org/xsd/imslticm_v1p0 http://www.imsglobal.org/xsd/lti/ltiv1p0/imslticm_v1p0.xsd
http://www.imsglobal.org/xsd/imslticp_v1p0 http://www.imsglobal.org/xsd/lti/ltiv1p0/imslticp_v1p0.xsd">
<blti:title>KUP16</blti:title>
<blti:description>Plugin Test 16</blti:description>
<blti:icon></blti:icon>
<blti:launch_url>https://canvas.myapp.com:8080/lti_launch</blti:launch_url>
<blti:extensions platform="canvas.instructure.com">
<lticm:property name="tool_id">knowbly_plugin_16</lticm:property>
<lticm:property name="privacy_level">public</lticm:property>
<lticm:property name="domain">canvas.myapp.com</lticm:property>
<lticm:options name="editor_button">
<lticm:property name="url">https://canvas.myapp.com:8080/lti_launch</lticm:property>
<lticm:property name="text">Plugin Test 16</lticm:property>
<lticm:property name="selection_width">500</lticm:property>
<lticm:property name="selection_height">400</lticm:property>
<lticm:property name="enabled">true</lticm:property>
</lticm:options>
</blti:extensions>
<cartridge_bundle identifierref="BLTI001_Bundle"/>
<cartridge_icon identifierref="BLTI001_Icon"/>
</cartridge_basiclti_link>

 

That was generated using the tool at XML Config Builder 

 

The Network tab info looks fine:

Request URL:
Request Method:

 

POST
Status Code:

404 Not Found
Remote Address:

 

127.0.0.1:8080
Referrer Policy:

 

no-referrer-when-downgrade
Except, of course, for the 404 Not Found error.  But the Request URL is correct and the Remote Address is correct.  The Form Data being passed looks good, as well, with all of the expected LTI data that I would hope to capture.
So, it really just comes down to that 404 terminating the communication before it reaches the route it thinks does not exist.  Any thoughts?  Any more info I can provide?
Thanks.

Outcomes