Debugging cloud plugin

Hi,

I’m new to cloud development. I have a dev cloud instance and have turned dev mode on. I’m running ngrok and all that. However when I click upload it fails. It does seem to download. How do I debug what is going wrong?

Thanks,
Justin

Update:

HTTP Server is returning:

[Thu Sep 21 2017 20:26:49 GMT+1000 (AEST)] “GET /” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/11.0 Safari/604.1.38”
[Thu Sep 21 2017 20:28:37 GMT+1000 (AEST)] “GET /atlassian-connect.json” “Apache-HttpClient/4.3.5 (java 1.5)”
[Thu Sep 21 2017 20:28:40 GMT+1000 (AEST)] “POST /installed?user_key=admin” “Atlassian HttpClient unknown / JIRA-1001.0.0-SNAPSHOT (100060) / Atlassian-Connect/1.3.252”
[Thu Sep 21 2017 20:28:40 GMT+1000 (AEST)] “POST /installed?user_key=admin” Error (404): “Not found”

Your Jira Cloud instance is trying to make a POST call to /installed endpoint, but your app is returning a 404, but Jira Cloud is expecting a 200 or 204. This callback event is firing because you have it defined in the lifecycle section of your app descriptor (see lifecycle docs for Connect).

These lifecycle callbacks help keep your app informed about installs and uninstalls of your app. If you’re just trying to get things to work, and aren’t concerned at this stage about tracking lifecycle event details, then just create a route on your app for /installed that returns static content and a 200 response code.

Thanks so much. I have based my code off https://marketplace.atlassian.com/plugins/com.csacc.example/cloud/overview
What is this best way to do this when in development mode versus prod?

Hey @ubangy, try looking at atlassian-connect-express that’s an official library from atlassian for developing cloud add-on’s using node.js, it handles automatic installation/deinstallation when developing. Or this connect-spring-boot if you’re more about Java developing. Also check this tutorial, it might help with getting started

1 Like