title: Uncaught TypeError: Cannot read properties of undefined (reading 'local')
body: <p>I'm migrating my extension from Manifest 2 to 3.</p>
  <p>Sometimes I get the following errors:</p>
  <blockquote>
  <p>Uncaught TypeError: Cannot read properties of undefined (reading
  'local')</p>
  </blockquote>
  <p>at the such lines</p>
  <pre><code>chrome.storage.local.get('timeSync', function(result) {
      timeSync = result.timeSync;
  });
  </code></pre>
  <p>of my <code>content_script.js</code></p>
  <p>Also other non sense errors (happens also only sometimes, mb only when reloading the extension at chrome://extensions/, I'm not sure):</p>
  <p><a href="https://i.stack.imgur.com/oisHf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oisHf.png" alt="enter image description here" /></a></p>