title: Flask web application loses session variables upon redirect in Chrome only
body: <p>EDIT: I realized that I have been using <a href="https://www.sharethis.com/" rel="noreferrer">https://www.sharethis.com/</a> in order to integrate share buttons into my website. For some reason, this causes a cookie to be added with no name. This messes with Chrome's ability to read the other cookies. I hope this information helps others in case you run into a strangely specific situation like this one!</p>
  
  <p>I'm experiencing a weird error similar to the error in <a href="https://stackoverflow.com/questions/8247842/session-data-lost-in-chrome-only/10818694#10818694">this post</a> where upon redirect my flask app loses session cookies, and it only happens in Chrome.</p>
  
  <p>However, the favicon is in the right location and the top answer is not the issue (there's no 404 when trying to load resources). Something interesting to note is that it seems that it only happens sometimes, and only on certain redirects. Another interesting thing is that once it happens, Chrome will no longer store any session variables until I quit it entirely and reopen it (or open an incognito window).</p>
  
  <p>Here's my redirecting code:</p>
  
  <pre><code>session["msg"] = 1
  return redirect("/active")
  </code></pre>
  
  <p>If I print the session immediately before the redirect, it's populated, but if I print it on the first line of the function at /active, it's completely empty. Chrome still has a session cookie (the cookie value has changed), but as I said I can no longer populate it at all until quitting the browser and reopening.</p>
  
  <p>It works entirely fine on Safari, Edge, and Firefox.</p>
  
  <p>I've spent at least a few weeks trying to figure this out and I'm really not sure where to go at this point.</p>
  
  <p>Thank you!</p>