title: How to avoid "Extension context invalidated" errors when messaging AFTER an Extension update?
body: <p>I am trying to create a smooth experience for users of my Chrome Extension after I release updates.</p>
  
  <p>I reinject my content script on an update of the app, and my functionality works even if the user continues to use my Extension on a page that has NOT been refreshed after the Extension update. Refreshing the page is ideal, but I don't want to have to force that on my users.</p>
  
  <p>However, I get the following errors in my content script console (the page the content script is inserted into) AFTER the Extension updates but BEFORE the page is refreshed when my code attempts to message from the content script/page to my background page:</p>
  
  <blockquote>
    <p>Uncaught Error: Extension context invalidated.</p>
  </blockquote>
  
  <p>Is there a way to 'rebuild' the connection? I've tried a long-lived port and regular messaging - updating the Extension has the same effect.</p>
  
  <p>Any ideas/direction appreciated. </p>
  
  <p>Here is my simple messaging code (in the content script) that throws the error...but IS able to communicate with the background script:</p>
  
  <pre><code>chrome.runtime.sendMessage({ msg: "recordFeedback", obj: commentObj, source: source}, function(response){
    console.log('Sent to DB...response was: ', response, response.recordFeedbackResponse);
  });
  </code></pre>