0

After upgrading from Airflow 1.10.12 to Airflow 2.0.0, I get the following error when trying to run airflow webserver:

Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1953, in full_dispatch_request
return self.finalize_request(rv)
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1970, in finalize_request
response = self.process_response(response)
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2269, in process_response
self.session_interface.save_session(self, ctx.session, response)
File "/usr/local/lib/python3.9/site-packages/flask/sessions.py", line 379, in save_session
response.set_cookie(
File "/usr/local/lib/python3.9/site-packages/werkzeug/wrappers/base_response.py", line 468, in set_cookie
dump_cookie(
File "/usr/local/lib/python3.9/site-packages/werkzeug/http.py", line 1217, in dump_cookie
raise ValueError("SameSite must be 'Strict', 'Lax', or 'None'.")
ValueError: SameSite must be 'Strict', 'Lax', or 'None'.**
zglin
  • 2,891
  • 2
  • 15
  • 26
kaxil
  • 17,706
  • 2
  • 59
  • 78

1 Answers1

1

Update the cookie_samesite config under [webserver] section from to Lax in airflow.cfg.

Default is just an empty string in 1.10.x but was changed to Lax in https://github.com/apache/airflow/pull/11873.

Updating guide entry: https://github.com/apache/airflow/blob/2.0.1/UPDATING.md#the-default-value-for-webserver-cookie_samesite-has-been-changed-to-lax

kaxil
  • 17,706
  • 2
  • 59
  • 78
  • This worked for me, it's likely you'll find `cookie_samesite = ` (nothing on rhs) if you're facing this issue – swimmer Apr 12 '21 at 13:33