-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Jenkins version -> 2.150.3
Zoom Plugin version -> 1.1
A customer reported that he failed to use Zoom Plugin in Jenkins. After checking the customer's System Log, i found the issue arised in this function:
public static boolean notify(String url, String authToken, String message) { boolean success = false; log.info("Send notification to {}, authToken: {}, message: {}", url, authToken, message); if(url == null || url.isEmpty()){ log.error("Invalid URL"); return success; } HttpPost httpPost = new HttpPost(url); try { httpPost.setHeader("content-type", "application/json;charset=UTF-8"); if(authToken != null && !authToken.isEmpty()){ httpPost.setHeader("Authorization", authToken); } if(message != null && !message.isEmpty()){ StringEntity stringEntity = new StringEntity(message, "UTF-8"); stringEntity.setContentEncoding("UTF-8"); httpPost.setEntity(stringEntity); } CloseableHttpResponse response = httpclient.execute(httpPost); int responseCode = response.getStatusLine().getStatusCode(); HttpEntity entity = response.getEntity(); log.info("Response code: {}", responseCode); if (entity != null) { log.info("Response entity: {}", EntityUtils.toString(entity)); } if(responseCode == HttpStatus.SC_OK){ success = true; } } catch (IOException e) { log.error("Error posting to Zoom, url: {}, authToken: {}, message: {}", url, authToken, message); } finally { httpPost.releaseConnection(); } return success; }
here is the __ log from the customer:
Aug 12, 2019 8:36:23 AM INFO io.jenkins.plugins.zoom.ZoomNotifyClient notify
Send notification to https://applications.zoom.us/addon/jenkins/webhooks/******, authToken: ******, message: null
Neither returns the Response code, nor throws exception, the function just returns false.
I'm not able to duplicate this issue in my local, any idea on how it happened?
Code is on GitHub: https://github.com/jenkinsci/zoom-plugin