title: <amp-ad> advertisements not displaying
body: <p>I am trying to serve my own AMP ads. I have code that was working a couple of weeks ago, but which has mysteriously stopped working. I've appended a trivial example here:</p>
  
  <p>I can tell from the Chrome Developer Tools Network tab the the ad is  successfully invoking remote.html, which is successfully fetching the picture.</p>
  
  <p>However, when I inspect the amp-ad tag itself, it is empty - there isn't even an empty iframe. It's as if it had loaded the iframe, fetched everything correctly, and the iframe has then destroyed itself.</p>
  
  <p>HELP!!!</p>
  
  <p>Here is the code of the page:</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html amp lang="en"&gt;
    &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;script async src="https://cdn.ampproject.org/v0.js"&gt;&lt;/script&gt;
      &lt;script async custom-element="amp-ad" src="https://cdn.ampproject.org/v0/amp-ad-0.1.js"&gt;&lt;/script&gt;
      &lt;title&gt;Hello, AMPs&lt;/title&gt;
      &lt;link rel="canonical" href="http://dk-imac.local" /&gt;
      &lt;meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"&gt;
      &lt;meta name="amp-3p-iframe-src" content="https://localbtk.com/remote.html"&gt;
      &lt;script type="application/ld+json"&gt;
        {
          "@context": "http://schema.org",
          "@type": "NewsArticle",
          "headline": "Open-source framework for publishing content",
          "datePublished": "2015-10-07T12:02:41Z",
          "image": [
            "logo.jpg"
          ]
        }
      &lt;/script&gt;
      &lt;style amp-boilerplate&gt;body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}&lt;/style&gt;&lt;noscript&gt;&lt;style amp-boilerplate&gt;body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}&lt;/style&gt;&lt;/noscript&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;h1&gt;Welcome to the mobile web&lt;/h1&gt;
      &lt;amp-ad width=728 height=90 type="_ping_" data-fkslot='1'&gt;
      &lt;/amp-ad&gt;
    &lt;/body&gt;
  &lt;/html&gt; 
  </code></pre>
  
  <p>And here is the code of remote.html:</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;head&gt;
  &lt;title&gt;Remote PBL&lt;/title&gt;
  &lt;meta charset="utf-8"&gt;
  &lt;meta name="robots" content="noindex"&gt;
  &lt;script&gt;
  (function() {
  var v = location.search.substr(1);
  if (!(/^\d+(-canary)?$/.test(v))) return;
  var u = 'https://3p.ampproject.net/'+encodeURIComponent(v)+'/f.js';
  document.write('&lt;script'+' src="'+encodeURI(u)+'"&gt;&lt;'+'/script&gt;');
  })();
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body style="margin:0"&gt;
  &lt;div id="c" style="position:absolute;top:0;left:0;bottom:0;right:0;"&gt;
  &lt;script&gt;
      // @todo Add in proper Google Analytics
      var trackJavascriptLink = function(url) {
          window.open(url, '_blank');
      };
      draw3p(function(config){    // Can add a second parameter "done" which is a function
          var x = new XMLHttpRequest();
          x.onreadystatechange = function(){
              if (this.readyState == 4 &amp;&amp; this.status == 200) {
                  document.write("&lt;div style='width:" + (config.width - 16) + "px;height:" + (config.height - 16) + "px'&gt;" + 
                          this.responseText + "&lt;/div&gt;");
              }
          };
          x.open("GET", "https://localbtk.com/handler/amp-page/fetch-slot/" + config.fkslot + "/" + (config.width - 16) + "/" +
                  (config.height - 16), true);
          x.send();
      },
        // List of expected amp-ad types.
        ['_ping_'],
        // List of hostnames that are allowed to embed this change.
        // Please also use ALLOW-FROM X-Frame-Options to get security in
        // browsers that do not support location.ancestorOrigins.
        ['dk-imac.local']); // My own has a few others also.
  &lt;/script&gt;
  &lt;/div&gt;
  &lt;script&gt;if (window.docEndCallback) window.docEndCallback()&lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>UPDATE 2016-Oct-10: I've posted this as an issue on the AMP project's Github page (see <a href="https://github.com/ampproject/amphtml/issues/5442#issuecomment-252025995" rel="nofollow">https://github.com/ampproject/amphtml/issues/5442#issuecomment-252025995</a>). There is an answer, as yet unsatisfactory, that this is expected behaviour and that <code>_ping_</code> is for testing only. However, they don't make any suggestions as to what I should do differently, which leaves me with creating code for a new "ad network" (which is really just my own site) as my only option. This is going to be a lot of work and feels like real overkill, but that's where I'm at for now.</p>
  
  <p>Btw, here is an example: 
  <a href="https://bachtrack.com/amptest.html" rel="nofollow">https://bachtrack.com/amptest.html</a></p>