sendgrid / sendgrid-ruby

The Official Twilio SendGrid Led, Community Driven Ruby API Library
https://sendgrid.com
MIT License
624 stars 323 forks source link

Not working with Ruby 2.6.0 #378

Closed marlonmarcos21 closed 5 years ago

marlonmarcos21 commented 5 years ago

Issue Summary

We recently upgraded ruby to 2.6.0 and our api requests to sendgrid started failing giving a non descriptive error:

"{"errors":[{"message":"Bad Request","field":null,"help":null}]}"

Rolling back to earlier version of ruby fixes the problem.

Steps to Reproduce

The following is an example of what we post to sendgrid:

{
  "from" => {
    "email" => "noreply@example.com",
    "name" => "Example Name"
  },
  "subject" => "Accordia Golf Trust (AGT SP): MBK + ORIX + AGT = Time for Outperformance? 9.5% Dividend Yield",
  "personalizations" => [
    { 
      "to" => [
        { "email" => "email@example.com" }
      ]
    }
  ],
  "content" => [
    {
      "type" => "text/html",
      "value" => "<!DOCTYPE html>\n<html xmlns=\"http://www.w3.org/1999/xhtml\" style=\"min-height:100%;background:#f2f2f2\">\r\n<head>\r\n<meta content=\"text/html; charset=utf-8\" http-equiv=\"Content-Type\">\r\n<meta content=\"width=device-width, initial-scale=1, minimum-scale=1\" name=\"viewport\">\r\n\r\n\r\n<style>@media only screen and (max-width: 605px) {\ntable.body img{width:auto !important;height:auto !important}\ntable.body center{min-width:0 !important}\ntable.body .container{width:100% !important}\ntable.body .columns{height:auto !important;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;padding-left:25px !important;padding-right:25px !important}\ntable.body .column{height:auto !important;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;padding-left:25px !important;padding-right:25px !important}\ntable.body .columns .column{padding-left:0 !important;padding-right:0 !important}\ntable.body .columns .columns{padding-left:0 !important;padding-right:0 !important}\ntable.body .column .column{padding-left:0 !important;padding-right:0 !important}\ntable.body .column .columns{padding-left:0 !important;padding-right:0 !important}\ntable.body .collapse .columns{padding-left:0 !important;padding-right:0 !important}\ntable.body .collapse .column{padding-left:0 !important;padding-right:0 !important}\ntd.small-1{display:inline-block !important;width:8.333333% !important}\nth.small-1{display:inline-block !important;width:8.333333% !important}\ntd.small-2{display:inline-block !important;width:16.666666% !important}\nth.small-2{display:inline-block !important;width:16.666666% !important}\ntd.small-3{display:inline-block !important;width:25% !important}\nth.small-3{display:inline-block !important;width:25% !important}\ntd.small-4{display:inline-block !important;width:33.333333% !important}\nth.small-4{display:inline-block !important;width:33.333333% !important}\ntd.small-5{display:inline-block !important;width:41.666666% !important}\nth.small-5{display:inline-block !important;width:41.666666% !important}\ntd.small-6{display:inline-block !important;width:50% !important}\nth.small-6{display:inline-block !important;width:50% !important}\ntd.small-7{display:inline-block !important;width:58.333333% !important}\nth.small-7{display:inline-block !important;width:58.333333% !important}\ntd.small-8{display:inline-block !important;width:66.666666% !important}\nth.small-8{display:inline-block !important;width:66.666666% !important}\ntd.small-9{display:inline-block !important;width:75% !important}\nth.small-9{display:inline-block !important;width:75% !important}\ntd.small-10{display:inline-block !important;width:83.333333% !important}\nth.small-10{display:inline-block !important;width:83.333333% !important}\ntd.small-11{display:inline-block !important;width:91.666666% !important}\nth.small-11{display:inline-block !important;width:91.666666% !important}\ntd.small-12{display:inline-block !important;width:100% !important}\nth.small-12{display:inline-block !important;width:100% !important}\n.columns td.small-12{display:block !important;width:100% !important}\n.column td.small-12{display:block !important;width:100% !important}\n.columns th.small-12{display:block !important;width:100% !important}\n.column th.small-12{display:block !important;width:100% !important}\ntable.body td.small-offset-1{margin-left:8.333333% !important}\ntable.body th.small-offset-1{margin-left:8.333333% !important}\ntable.body td.small-offset-2{margin-left:16.666666% !important}\ntable.body th.small-offset-2{margin-left:16.666666% !important}\ntable.body td.small-offset-3{margin-left:25% !important}\ntable.body th.small-offset-3{margin-left:25% !important}\ntable.body td.small-offset-4{margin-left:33.333333% !important}\ntable.body th.small-offset-4{margin-left:33.333333% !important}\ntable.body td.small-offset-5{margin-left:41.666666% !important}\ntable.body th.small-offset-5{margin-left:41.666666% !important}\ntable.body td.small-offset-6{margin-left:50% !important}\ntable.body th.small-offset-6{margin-left:50% !important}\ntable.body td.small-offset-7{margin-left:58.333333% !important}\ntable.body th.small-offset-7{margin-left:58.333333% !important}\ntable.body td.small-offset-8{margin-left:66.666666% !important}\ntable.body th.small-offset-8{margin-left:66.666666% !important}\ntable.body td.small-offset-9{margin-left:75% !important}\ntable.body th.small-offset-9{margin-left:75% !important}\ntable.body td.small-offset-10{margin-left:83.333333% !important}\ntable.body th.small-offset-10{margin-left:83.333333% !important}\ntable.body td.small-offset-11{margin-left:91.666666% !important}\ntable.body th.small-offset-11{margin-left:91.666666% !important}\ntable.body table.columns td.expander{display:none !important}\ntable.body table.columns th.expander{display:none !important}\ntable.body .right-text-pad{padding-left:10px !important}\ntable.body .text-pad-right{padding-left:10px !important}\ntable.body .left-text-pad{padding-right:10px !important}\ntable.body .text-pad-left{padding-right:10px !important}\ntable.menu{width:100% !important}\ntable.menu td{width:auto !important;display:inline-block !important}\ntable.menu th{width:auto !important;display:inline-block !important}\ntable.menu.vertical td{display:block !important}\ntable.menu.vertical th{display:block !important}\ntable.menu.small-vertical td{display:block !important}\ntable.menu.small-vertical th{display:block !important}\ntable.menu[align=&quot;center&quot;]{width:auto !important}\n.insight-snippet th.columns{padding-left:10px !important;padding-right:10px !important}\n.small-float-center{margin:0 auto !important;float:none !important;text-align:center !important}\n.small-text-center{text-align:center !important}\n.small-text-left{text-align:left !important}\n.small-text-right{text-align:right !important}\ntable.body table.container .hide-for-large{display:block !important;width:auto !important;overflow:visible !important}\ntable.body table.container .row.hide-for-large{display:table !important;width:100% !important}\ntable.body table.container .row.hide-for-large{display:table !important;width:100% !important}\ntable.body table.container .show-for-large{display:none !important;width:0;mso-hide:all;overflow:hidden}\n}\na:hover{color:#1b7f7d}\na:active{color:#1b7f7d}\na:visited{color:#24a9a7}\nh1 a:visited{color:#24a9a7}\nh2 a:visited{color:#24a9a7}\nh3 a:visited{color:#24a9a7}\nh4 a:visited{color:#24a9a7}\nh5 a:visited{color:#24a9a7}\nh6 a:visited{color:#24a9a7}\ntable.button:hover table tr td a{color:#fff}\ntable.button:active table tr td a{color:#fff}\ntable.button table tr td a:visited{color:#fff}\ntable.button.tiny:hover table tr td a{color:#fff}\ntable.button.tiny:active table tr td a{color:#fff}\ntable.button.tiny table tr td a:visited{color:#fff}\ntable.button.small:hover table tr td a{color:#fff}\ntable.button.small:active table tr td a{color:#fff}\ntable.button.small table tr td a:visited{color:#fff}\ntable.button.large:hover table tr td a{color:#fff}\ntable.button.large:active table tr td a{color:#fff}\ntable.button.large table tr td a:visited{color:#fff}\ntable.button:hover table td{background:#1b7f7d;color:#fff}\ntable.button:visited table td{background:#1b7f7d;color:#fff}\ntable.button:active table td{background:#1b7f7d;color:#fff}\ntable.button:hover table a{border:0px solid #1b7f7d}\ntable.button:visited table a{border:0px solid #1b7f7d}\ntable.button:active table a{border:0px solid #1b7f7d}\ntable.button.secondary:hover table td{background:#e6e6e6;color:#fff}\ntable.button.secondary:hover table a{border:0px solid #e6e6e6}\ntable.button.secondary:hover table td a{color:#fff}\ntable.button.secondary:active table td a{color:#fff}\ntable.button.secondary table td a:visited{color:#fff}\ntable.button.success:hover table td{background:#23bf5d}\ntable.button.success:hover table a{border:0px solid #23bf5d}\ntable.button.alert:hover table td{background:#e23317}\ntable.button.alert:hover table a{border:0px solid #e23317}\n.thumbnail:hover{box-shadow:0 0 6px 1px rgba(36,169,167,0.5)}\n.thumbnail:focus{box-shadow:0 0 6px 1px rgba(36,169,167,0.5)}\n.row-info-private a:hover{color:#fff !important}\n.row-info-private a:active{color:#fff !important}\n.row-info-private a:visited{color:#fff !important}\n.row-info-private h1 a:hover{color:#fff !important}\n.row-info-private h1 a:active{color:#fff !important}\n.row-info-private h1 a:visited{color:#fff !important}\n.row-info-private h2 a:hover{color:#fff !important}\n.row-info-private h2 a:active{color:#fff !important}\n.row-info-private h2 a:visited{color:#fff !important}\n.row-info-private h3 a:hover{color:#fff !important}\n.row-info-private h3 a:active{color:#fff !important}\n.row-info-private h3 a:visited{color:#fff !important}\n.row-info-private h4 a:hover{color:#fff !important}\n.row-info-private h4 a:active{color:#fff !important}\n.row-info-private h4 a:visited{color:#fff !important}\n.row-info-private h5 a:hover{color:#fff !important}\n.row-info-private h5 a:active{color:#fff !important}\n.row-info-private h5 a:visited{color:#fff !important}\n.row-info-private h6 a:hover{color:#fff !important}\n.row-info-private h6 a:active{color:#fff !important}\n.row-info-private h6 a:visited{color:#fff !important}\n.row-info-public-direct a:hover{color:#fff !important}\n.row-info-public-direct a:active{color:#fff !important}\n.row-info-public-direct a:visited{color:#fff !important}\n.row-info-public-direct h1 a:hover{color:#fff !important}\n.row-info-public-direct h1 a:active{color:#fff !important}\n.row-info-public-direct h1 a:visited{color:#fff !important}\n.row-info-public-direct h2 a:hover{color:#fff !important}\n.row-info-public-direct h2 a:active{color:#fff !important}\n.row-info-public-direct h2 a:visited{color:#fff !important}\n.row-info-public-direct h3 a:hover{color:#fff !important}\n.row-info-public-direct h3 a:active{color:#fff !important}\n.row-info-public-direct h3 a:visited{color:#fff !important}\n.row-info-public-direct h4 a:hover{color:#fff !important}\n.row-info-public-direct h4 a:active{color:#fff !important}\n.row-info-public-direct h4 a:visited{color:#fff !important}\n.row-info-public-direct h5 a:hover{color:#fff !important}\n.row-info-public-direct h5 a:active{color:#fff !important}\n.row-info-public-direct h5 a:visited{color:#fff !important}\n.row-info-public-direct h6 a:hover{color:#fff !important}\n.row-info-public-direct h6 a:active{color:#fff !important}\n.row-info-public-direct h6 a:visited{color:#fff !important}\n.row-info-public a:hover{color:#fff !important}\n.row-info-public a:active{color:#fff !important}\n.row-info-public a:visited{color:#fff !important}\n.row-info-public h1 a:hover{color:#fff !important}\n.row-info-public h1 a:active{color:#fff !important}\n.row-info-public h1 a:visited{color:#fff !important}\n.row-info-public h2 a:hover{color:#fff !important}\n.row-info-public h2 a:active{color:#fff !important}\n.row-info-public h2 a:visited{color:#fff !important}\n.row-info-public h3 a:hover{color:#fff !important}\n.row-info-public h3 a:active{color:#fff !important}\n.row-info-public h3 a:visited{color:#fff !important}\n.row-info-public h4 a:hover{color:#fff !important}\n.row-info-public h4 a:active{color:#fff !important}\n.row-info-public h4 a:visited{color:#fff !important}\n.row-info-public h5 a:hover{color:#fff !important}\n.row-info-public h5 a:active{color:#fff !important}\n.row-info-public h5 a:visited{color:#fff !important}\n.row-info-public h6 a:hover{color:#fff !important}\n.row-info-public h6 a:active{color:#fff !important}\n.row-info-public h6 a:visited{color:#fff !important}\n.insight-content a:hover{color:#3a3a3c !important}\n.insight-content a:visited{color:#3a3a3c !important}</style></head>\r\n<body style=\"min-width:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;font-size:14px;line-height:21px;width:100% !important\">\r\n<div class=\"preheader\" style=\"color:#f2f2f2;font-size:1px;text-align:center;display:none !important\">\r\nAccordia Golf Trust (AGT SP). Accordia Golf Trust (AGT SP) has not been a great success story since its IPO in August 2014. The stock went to market at a unit price of...\r\n</div>\r\n<table class=\"body\" style=\"border-spacing:0;border-collapse:collapse;vertical-align:top;background:#f2f2f2;height:100%;width:100%;color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;font-size:14px;line-height:21px\">\r\n<tr style=\"padding:0;vertical-align:top;text-align:left\">\r\n<td align=\"center\" class=\"center\" valign=\"top\" style=\"word-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;hyphens:auto;vertical-align:top;color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;font-size:14px;line-height:21px;border-collapse:collapse !important\">\r\n<center style=\"width:100%;min-width:580px;min-width:320px\">\r\n<table class=\"container\" style=\"width:580px;border-spacing:0;border-collapse:collapse;padding:0;vertical-align:top;text-align:left;background:#fff;max-width:580px;margin:0 auto;text-align:inherit\">\r\n<tbody>\r\n<tr style=\"padding:0;vertical-align:top;text-align:left\">\r\n<td style=\"word-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;hyphens:auto;vertical-align:top;color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;font-size:14px;line-height:21px;border-collapse:collapse !important\">\r\n<table class=\"row row-dark\" style=\"border-spacing:0;border-collapse:collapse;vertical-align:top;text-align:left;background:#3a3a3c;padding:0;width:100%;position:relative;display:table\">\r\n<tbody>\r\n<tr style=\"padding:0;vertical-align:top;text-align:left\">\r\n<th class=\"small-12 large-12 first last columns lg-top lg-bottom\" style=\"color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;font-size:14px;line-height:21px;margin:0 auto;padding-bottom:10px;width:555px;padding-left:12.5px;padding-right:12.5px;color:#ccc;padding-left:25px;padding-right:25px;padding-bottom:25px;padding-top:25px\">\r\n<img alt=\"Smartkarma\" class=\"logo\" height=\"29\" src=\"https://assets.smartkarma.com/v2/img/smartkarma-logo.png\" width=\"155\" style=\"outline:none;text-decoration:none;-ms-interpolation-mode:bicubic;width:auto;max-width:100%;clear:both;display:block;max-width:155px;max-height:29px;color:#ccc\">\r\n</th>\r\n<th class=\"expander\" style=\"color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;font-size:14px;line-height:21px;visibility:hidden;width:0;color:#ccc;padding:0 !important\"></th>\r\n</tr>\r\n</tbody>\r\n</table>\r\n<table class=\"row row-info-public\" style=\"border-spacing:0;border-collapse:collapse;vertical-align:top;text-align:left;background:#24a9a7;padding:0;width:100%;position:relative;display:table\">\r\n<tbody>\r\n<tr style=\"padding:0;vertical-align:top;text-align:left\">\r\n<th class=\"small-12 large-12 first last columns sm-top\" style=\"color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;font-size:14px;line-height:21px;margin:0 auto;padding-bottom:10px;width:555px;padding-left:12.5px;padding-right:12.5px;color:#fff;padding-left:25px;padding-right:25px;padding-top:10px\">\r\nMarlon, a new Insight matching your Alert.\r\n<br>\r\n<strong>Alert matched:</strong>\r\n<a href=\"https://www.smartkarma.com/settings/alerts/606\" style=\"color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;color:#24a9a7;text-decoration:none;color:#fff;text-decoration:underline\">Real-Time Alert for My Reading List</a>\r\n\r\n</th>\r\n<th class=\"expander\" style=\"color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;font-size:14px;line-height:21px;visibility:hidden;width:0;color:#fff;padding:0 !important\"></th>\r\n</tr>\r\n</tbody>\r\n</table>\r\n<table class=\"insight-snippet row\" style=\"border-spacing:0;border-collapse:collapse;vertical-align:top;text-align:left;padding:0;width:100%;position:relative;display:table\">\r\n<tr style=\"padding:0;vertical-align:top;text-align:left\">\r\n<th class=\"first last columns lg-top lg-bottom\" style=\"color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;font-size:14px;line-height:21px;margin:0 auto;padding-left:25px;padding-bottom:10px;padding-right:25px;padding-bottom:25px;padding-top:25px\">\r\n<table class=\"profile-snippet\" style=\"border-spacing:0;border-collapse:collapse;padding:0;vertical-align:top;text-align:left;width:100%\">\r\n<tr style=\"padding:0;vertical-align:top;text-align:left\">\r\n<td class=\"profile-image\" valign=\"top\" style=\"word-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;hyphens:auto;color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;font-size:14px;line-height:21px;vertical-align:middle;min-width:35px;width:35px;vertical-align:top;border-collapse:collapse !important\">\r\n<img width=\"35\" height=\"35\" alt=\"\" src=\"https://static-prod.smartkarma.com/accounts/profile_photos/000/001/208/small/data?1487375762\" style=\"outline:none;text-decoration:none;-ms-interpolation-mode:bicubic;width:auto;max-width:100%;clear:both;display:block\">\r\n</td>\r\n<td class=\"profile-content\" valign=\"top\" style=\"word-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;hyphens:auto;color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;font-size:14px;line-height:21px;vertical-align:middle;padding-left:10px;padding-right:10px;vertical-align:top;border-collapse:collapse !important\">\r\nNicolas Van Broekhoven\r\n<span class=\"text-inactive-gray\" style=\"color:#ccc\">\r\n/\r\n</span>\r\n<span class=\"insight-vertical\" style=\"white-space:nowrap\">\r\nEquity Bottom-Up\r\n</span>\r\n<div class=\"text-bullish\" style=\"color:#75ac33\">\r\nAccordia Golf Trust <span class=\"entity-ticker\" style=\"font-size:12px;white-space:nowrap\">(AGT SP)</span>\r\n</div>\r\n<table class=\"spacer\" style=\"border-spacing:0;border-collapse:collapse;padding:0;vertical-align:top;text-align:left;width:100%\">\r\n<tbody>\r\n<tr style=\"padding:0;vertical-align:top;text-align:left\">\r\n<td height=\"2px\" style=\"word-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;hyphens:auto;vertical-align:top;color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;font-size:14px;line-height:21px;border-collapse:collapse !important;font-size:2px;line-height:2px\">\r\n \r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n\r\n<a href=\"https://www.smartkarma.com/insights/accordia-golf-trust-agt-sp-mbk-orix-agt-time-for-outperformance-9-5-dividend-yield?utm_medium=email&amp;utm_source=realtime\" style=\"color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;color:#24a9a7;text-decoration:none\"><strong class=\"insight-headline\" style=\"color:#1f1f20;font-size:18px\">\r\nAccordia Golf Trust (AGT SP): MBK + ORIX + AGT = Time for Outperformance? 9.5% Dividend Yield\r\n</strong>\r\n</a><table class=\"spacer\" style=\"border-spacing:0;border-collapse:collapse;padding:0;vertical-align:top;text-align:left;width:100%\">\r\n<tbody>\r\n<tr style=\"padding:0;vertical-align:top;text-align:left\">\r\n<td height=\"3px\" style=\"word-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;hyphens:auto;vertical-align:top;color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;font-size:14px;line-height:21px;border-collapse:collapse !important;font-size:3px;line-height:3px\">\r\n \r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n\r\n<div class=\"insight-content\">\r\n<a href=\"https://www.smartkarma.com/insights/accordia-golf-trust-agt-sp-mbk-orix-agt-time-for-outperformance-9-5-dividend-yield?utm_medium=email&amp;utm_source=realtime\" style=\"color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;color:#24a9a7;text-decoration:none;color:#3a3a3c !important\"><span class=\"text-subtle-black\" style=\"color:#3a3a3c\">\r\n<p style=\"margin:0 0 0 10px;color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;font-size:14px;line-height:21px;margin-bottom:10px;margin-bottom:15px\"><span href=\"https://www.smartkarma.com/entities/20224\" target=\"_blank\">Accordia Golf Trust (AGT SP)</span> has not been a great success story since its IPO in August 2014. The stock went to market at a unit price of 0.97 SGD and was recently traded at 0.53 SGD. If we include the dividends received since the IPO (0.2387 SGD) the '<em>real</em>' adjusted price is still only 0.76 SGD.</p><p style=\"margin:0 0 0 10px;color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;font-size:14px;line-height:21px;margin-bottom:10px;margin-bottom:15px\">In the past we have attended several management meetings and the 2017 company AGM but were disappointed on multiple occasions by management that either 1) did not care, 2) did not know how or 3) was held…</p>\r\n</span>\r\n</a></div>\r\n<table class=\"spacer\" style=\"border-spacing:0;border-collapse:collapse;padding:0;vertical-align:top;text-align:left;width:100%\">\r\n<tbody>\r\n<tr style=\"padding:0;vertical-align:top;text-align:left\">\r\n<td height=\"15px\" style=\"word-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;hyphens:auto;vertical-align:top;color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;font-size:14px;line-height:21px;border-collapse:collapse !important;font-size:15px;line-height:15px\">\r\n \r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n\r\n<table class=\"button radius\" style=\"border-spacing:0;border-collapse:collapse;padding:0;vertical-align:top;text-align:left;margin:0;width:100%;width:auto !important\">\r\n<tr style=\"padding:0;vertical-align:top;text-align:left\">\r\n<td style=\"word-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;hyphens:auto;vertical-align:top;color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;font-size:14px;line-height:21px;border-collapse:collapse !important\">\r\n<table style=\"border-spacing:0;border-collapse:collapse;padding:0;vertical-align:top;text-align:left;width:100%;width: auto\">\r\n<tr style=\"padding:0;vertical-align:top;text-align:left\">\r\n<td style=\"word-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;hyphens:auto;vertical-align:top;color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;line-height:1.5;font-size:14px;line-height:21px;text-align:left;color:#fff;background:#24a9a7;border:2px solid #24a9a7;border-radius:2px;border:none;border-collapse:collapse !important\">\r\n<a href=\"https://www.smartkarma.com/insights/accordia-golf-trust-agt-sp-mbk-orix-agt-time-for-outperformance-9-5-dividend-yield?utm_medium=email&amp;utm_source=realtime\" style=\"color:#3a3a3c;padding:0;margin:0;text-align:left;line-height:1.5;color:#24a9a7;font-family:Roboto, Helvetica, Arial, sans-serif;font-size:15px;font-weight:normal;color:#fff;text-decoration:none;display:inline-block;padding:10px 20px 10px 20px;border:0px solid #24a9a7;border-radius:2px\">Continue Reading</a>\r\n</td>\r\n</tr>\r\n</table>\r\n</td>\r\n</tr>\r\n</table>\r\n\r\n</td>\r\n</tr>\r\n</table>\r\n</th>\r\n<th class=\"expander\" style=\"color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;font-size:14px;line-height:21px;visibility:hidden;width:0;padding:0 !important\"></th>\r\n</tr>\r\n</table>\r\n\r\n\r\n\r\n<table class=\"row row-dark\" style=\"border-spacing:0;border-collapse:collapse;vertical-align:top;text-align:left;background:#3a3a3c;padding:0;width:100%;position:relative;display:table\">\r\n<tbody>\r\n<tr style=\"padding:0;vertical-align:top;text-align:left\">\r\n<th class=\"small-12 large-12 first last columns lg-top lg-bottom\" style=\"color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;font-size:14px;line-height:21px;margin:0 auto;padding-bottom:10px;width:555px;padding-left:12.5px;padding-right:12.5px;color:#ccc;padding-left:25px;padding-right:25px;padding-bottom:25px;padding-top:25px\">\r\n<div class=\"small-bottom-margin\" style=\"margin-bottom:5px\">\r\n<small style=\"hyphens:none;font-size:12px;color:#cacaca\">\r\nMarlon, you have set up real-time e-mail delivery.\r\n<a href=\"https://www.smartkarma.com/settings/alerts\" style=\"color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;color:#24a9a7;text-decoration:none\">Change your Alerts settings</a>\r\n</small>\r\n</div>\r\n<small style=\"hyphens:none;font-size:12px;color:#cacaca\">\r\nYou requested to receive emails for activities on your Insights.\r\n<a href=\"https://www.smartkarma.com/settings/communication\" style=\"color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;color:#24a9a7;text-decoration:none\">Change your communication settings.</a>\r\n</small>\r\n\r\n<div>\r\n<small style=\"hyphens:none;font-size:12px;color:#cacaca\">\r\nPlease report any issues to our\r\n<a href=\"mailto:helpdesk@smartkarma.com\" target=\"_blank\" style=\"color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;color:#24a9a7;text-decoration:none\">helpdesk.</a>\r\n</small>\r\n</div>\r\n</th>\r\n<th class=\"expander\" style=\"color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;font-size:14px;line-height:21px;visibility:hidden;width:0;color:#ccc;padding:0 !important\"></th>\r\n</tr>\r\n</tbody>\r\n</table>\r\n<table class=\"row collapse footer-gradient\" style=\"border-spacing:0;border-collapse:collapse;vertical-align:top;text-align:left;background:#39ae86;background-image:linear-gradient(160deg, #24a9a7, #4db365);line-height:10px;padding:0;width:100%;position:relative;display:table\">\r\n<tbody>\r\n<tr style=\"padding:0;vertical-align:top;text-align:left\">\r\n<th class=\"small-12 large-12 columns\" style=\"color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;font-size:14px;line-height:21px;margin:0 auto;padding-left:25px;padding-bottom:10px;width:555px;padding-left:12.5px;padding-right:12.5px;font-size:1px;height:10px;line-height:1px;padding-bottom:0;padding-right:0;padding-left:0;width:580px\">\r\n<img alt=\"\" height=\"10\" src=\"https://assets.smartkarma.com/email/sk-email-gradient.png\" width=\"580\" style=\"outline:none;text-decoration:none;-ms-interpolation-mode:bicubic;width:auto;max-width:100%;clear:both;display:block;min-height:10px;width:100%;height:10px !important\">\r\n</th>\r\n<th class=\"expander\" style=\"color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;font-size:14px;line-height:21px;visibility:hidden;width:0;height:0;padding:0 !important\"></th>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n<table class=\"spacer\" style=\"border-spacing:0;border-collapse:collapse;padding:0;vertical-align:top;text-align:left\">\r\n<tbody>\r\n<tr style=\"padding:0;vertical-align:top;text-align:left\">\r\n<td height=\"10px\" style=\"word-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;hyphens:auto;vertical-align:top;color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;font-size:14px;line-height:21px;border-collapse:collapse !important;font-size:10px;line-height:10px\">\r\n \r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n\r\n<center style=\"width:100%;min-width:580px;min-width:320px\">\r\n<a style=\"color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;color:#24a9a7;text-decoration:none;width: 120px; height: 40px; display: inline-block; margin-right: 10px;\" href=\"https://app.smartkarma.com\"><img alt=\"Download on the App Store\" height=\"40\" src=\"https://assets.smartkarma.com/mailer_images/appstore-lrg.jpg\" width=\"120\" style=\"outline:none;text-decoration:none;-ms-interpolation-mode:bicubic;width:auto;max-width:100%;clear:both;display:block;border:none\">\r\n</a><a style=\"color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;color:#24a9a7;text-decoration:none;width: 120px; height: 40px; display: inline-block;\" href=\"https://play.google.com/store/apps/details?id=com.smartkarma.app\"><img alt=\"Get it on Google Play\" height=\"40\" src=\"https://assets.smartkarma.com/mailer_images/sk_android_donwload.png\" width=\"120\" style=\"outline:none;text-decoration:none;-ms-interpolation-mode:bicubic;width:auto;max-width:100%;clear:both;display:block;border:none\">\r\n</a></center>\r\n<table class=\"spacer\" style=\"border-spacing:0;border-collapse:collapse;padding:0;vertical-align:top;text-align:left\">\r\n<tbody>\r\n<tr style=\"padding:0;vertical-align:top;text-align:left\">\r\n<td height=\"10px\" style=\"word-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;hyphens:auto;vertical-align:top;color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;font-size:14px;line-height:21px;border-collapse:collapse !important;font-size:10px;line-height:10px\">\r\n \r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n\r\n<p class=\"text-center\" style=\"margin:0 0 0 10px;color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;font-size:14px;line-height:21px;margin-bottom:10px;text-align:center\">\r\n<small style=\"hyphens:none;font-size:12px;color:#cacaca\">\r\n<a href=\"https://compliance.smartkarma.com/terms-of-use/\" style=\"color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;color:#24a9a7;text-decoration:none\">Terms</a>\r\n<span class=\"text-inactive-gray\" style=\"color:#ccc\">\r\n|\r\n</span>\r\n<a href=\"https://compliance.smartkarma.com/\" style=\"color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;color:#24a9a7;text-decoration:none\">Compliance</a>\r\n<span class=\"text-inactive-gray\" style=\"color:#ccc\">\r\n|\r\n</span>\r\n<a href=\"https://assets.smartkarma.com/docs/Smartkarma+Disclaimers.pdf\" style=\"color:#3a3a3c;font-family:Roboto, Helvetica, Arial, sans-serif;font-weight:normal;padding:0;margin:0;text-align:left;line-height:1.5;color:#24a9a7;text-decoration:none\">Disclaimer</a>\r\n</small>\r\n</p>\r\n</center>\r\n</td>\r\n</tr>\r\n</table>\r\n</body>\r\n</html>\n"
    }
  ],
  "tracking_settings" => {
    "click_tracking" => {
      "enable" => true,
      "enable_text" => true
    },
    "open_tracking" => {
      "enable" => true
    }
  }
}

Technical details:

jeffblake commented 5 years ago

I had the same problem. Nasty bug. Spend a whole day debugging this. Then I got an email from Ruby Weekly that I believe makes sense of the issue: https://mensfeld.pl/2019/01/exploring-a-critical-netprotocol-issue-in-ruby-2-6-0p0-and-how-it-can-lead-to-a-security-problem/

For me it was some random combination of when unicode characters were present, and the request body was a certain size.

I downgraded to ruby 2.5.3. I think we have to wait for a new release of Ruby.

Other libraries are likely affected as well, so don't use ruby 2.6.0!!

thinkingserious commented 5 years ago

Thanks for jumping in @jeffblake!

kenaniah commented 5 years ago

This issue is caused by a bug in Ruby 2.6.0 and is fixed in Ruby 2.6.1.

The bug that causes this is documented in https://bugs.ruby-lang.org/issues/15468. Running any other version of Ruby makes this problem go away.

kenaniah commented 5 years ago

@thinkingserious can you please change the title of this bug to "Not working with Ruby 2.6.0" as it is specific to a single release of Ruby, and not the 2.6.x branch in general?

ajsharp commented 5 years ago

Request that the readme be updated.