title: Cannot upload images to Firebase Storage
body: <p>First I initialized a Polymer app-drawer-template using the Polymer cli and then I added Firebase storage to the web app. Then I added file upload code to one of the pages (The code for the page is found below). However I am getting the following errors (This prevents files from being uploaded and also does not update the progress bar),</p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot read property 'addEventListener' of null</p>
  </blockquote>
  
  <p>and also</p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot read property 'instanceCount' of undefined</p>
  </blockquote>
  
  <p>This is my code.</p>
  
  <pre><code>&lt;link rel="import" href="../bower_components/polymer/polymer.html"&gt;
  
  &lt;dom-module id="my-market"&gt;
  
    &lt;template&gt;
  
      &lt;style&gt;
        :host {
          display: block;
          padding: 10px;
        }
        paper-card.top{
          margin-top: 8px;
          width: 100%;
          padding-bottom: 16px;
        }
      &lt;/style&gt;
  
      &lt;paper-card heading="Welcome to the Market!"&gt;
        &lt;div class="card-content"&gt;
          &lt;h4&gt;Upload a photo of your item&lt;/h4&gt;
          &lt;!--uplod image--&gt;
          &lt;input type="file" value="upload" id="fileUpload"/&gt;
          &lt;progress value="0" max="100" id="uploader"&gt;0%&lt;/progress&gt;
        &lt;/div&gt;
      &lt;/paper-card&gt;
  
    &lt;/template&gt;
  
    &lt;script&gt;
  
     //File upload script to Firebase storage
    var uploader = document.getElementById('uploader');
    var fileButton = document.getElementById('fileUpload');
  
    //File selection listener
    fileButton.addEventListener('change', function(a) {
  
      //Get image
      var file = a.target.files[0];
  
      //create a storage reference
      var storageRef = firebase.storage().ref('images/' + file.name);
  
      //store the image
      var task = storageRef.put(file);
  
      //notify the user of upload status
      task.on('state_changed',
  
          function progress(snapshot) {
            var percentage = (snapshot.bytesTransferred/snapshot.totalBytes)*100;
            uploader.value = percentage;
          },
  
          function error(err) {
  
          },
  
          function complete() {
  
          }
  
      );
  
    });
  
    &lt;/script&gt;
  
  
    &lt;script&gt;
  
      Polymer({
  
        is: 'my-market'
  
      });
  
    &lt;/script&gt;
  
  &lt;/dom-module&gt;
  </code></pre>
  
  <p>I also tried to place the code for Firebase Storage in the  tag of the index.html file but it's still not working. Any suggestions?</p>