Unable to load data after upgrade

I have upgraded from version 10.1.0 to version 21.1.0 and after that, I am getting "There was an error loading data.

From the browser inspect, I see the error:

"instrument.js:109 Error
at organization.tsx:59
at c (runtime.js:45)
at Generator._invoke (runtime.js:274)
at Generator.forEach.e. [as next] (runtime.js:97)
at n (asyncToGenerator.js:3)
at s (asyncToGenerator.js:25)
(anonymous) @ instrument.js:109
value @ organizationContext.tsx:231
(anonymous) @ organizationContext.tsx:119
n @ PublisherMethods.js:44
a.emit @ index.js:116
trigger @ PublisherMethods.js:63
onFetchOrgError @ organizationStore.tsx:87
n @ PublisherMethods.js:44
a.emit @ index.js:116
trigger @ PublisherMethods.js:63
(anonymous) @ PublisherMethods.js:74
i @ helpers.js:72
setTimeout (async)
(anonymous) @ trycatch.js:86
t.nextTick @ utils.js:60
triggerAsync @ PublisherMethods.js:73
e @ createAction.js:56
(anonymous) @ organization.tsx:85
c @ runtime.js:45
(anonymous) @ runtime.js:274
forEach.e. @ runtime.js:97
n @ asyncToGenerator.js:3
c @ asyncToGenerator.js:29
Promise.then (async)
n @ asyncToGenerator.js:13
s @ asyncToGenerator.js:25
Promise.then (async)
n @ asyncToGenerator.js:13
s @ asyncToGenerator.js:25
(anonymous) @ asyncToGenerator.js:32
(anonymous) @ asyncToGenerator.js:21
lo @ organization.tsx:23
value @ organizationContext.tsx:200
di @ react-dom.production.min.js:131
is @ react-dom.production.min.js:212
pc @ react-dom.production.min.js:255
t.unstable_runWithPriority @ scheduler.production.min.js:19
Xo @ react-dom.production.min.js:122
dc @ react-dom.production.min.js:248
Zs @ react-dom.production.min.js:239
(anonymous) @ react-dom.production.min.js:123
t.unstable_runWithPriority @ scheduler.production.min.js:19
Xo @ react-dom.production.min.js:122
Go @ react-dom.production.min.js:123
Vo @ react-dom.production.min.js:122
R @ react-dom.production.min.js:287
Kt @ react-dom.production.min.js:68
i @ helpers.js:72
instrument.js:136 POST https://sentry.smartsapp.com/api/1/store/?sentry_key=01b52413ef2b447890a27e3902c2948f&sentry_version=7 403 (Forbidden) "

from docker logs, I see the below:

172.20.0.1 - - [11/Feb/2021:22:12:02 +0000] “GET / HTTP/1.1” 302 450 “-” “python-requests/2.18.4”
172.20.0.1 - - [11/Feb/2021:22:12:02 +0000] “GET /auth/login/ HTTP/1.1” 302 571 “-” “python-requests/2.18.4”
172.20.0.1 - - [11/Feb/2021:22:12:03 +0000] “GET /auth/login/company/ HTTP/1.1” 200 7679 “-” “python-requests/2.18.4”
172.20.0.1 - - [11/Feb/2021:22:12:03 +0000] “GET /api/0/organizations/company/?detailed=0 HTTP/1.1” 200 4970 “https://sentry.domain.com/organizations/company/issues/” “Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36”
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/sentry/api/base.py”, line 124, in handle_exception
response = super(Endpoint, self).handle_exception(exc)
File “/usr/local/lib/python3.6/site-packages/rest_framework/views.py”, line 449, in handle_exception
self.raise_uncaught_exception(exc)
File “/usr/local/lib/python3.6/site-packages/sentry/api/base.py”, line 237, in dispatch
response = handler(request, *args, **kwargs)
File “/usr/local/lib/python3.6/site-packages/sentry/api/endpoints/organization_projects.py”, line 103, in get
serialize(list(queryset), request.user, ProjectSummarySerializer(collapse=collapse))
File “/usr/local/lib/python3.6/site-packages/sentry/api/serializers/base.py”, line 41, in serialize
**kwargs
File “/usr/local/lib/python3.6/site-packages/sentry/api/serializers/models/project.py”, line 444, in get_attrs
for release in bulk_fetch_project_latest_releases(item_list)
File “/usr/local/lib/python3.6/site-packages/sentry/api/serializers/models/project.py”, line 535, in bulk_fetch_project_latest_releases
(tuple(six.text_type(i.id) for i in projects),),
File “/usr/local/lib/python3.6/site-packages/django/db/models/query.py”, line 1259, in iter
instance = model_cls.from_db(db, model_init_names, model_init_values)
File “/usr/local/lib/python3.6/site-packages/django/db/models/base.py”, line 583, in from_db
new = cls(*values)
File “/usr/local/lib/python3.6/site-packages/sentry/db/models/base.py”, line 48, in init
self._update_tracked_data()
File “/usr/local/lib/python3.6/site-packages/sentry/db/models/base.py”, line 90, in _update_tracked_data
v = self.__get_field_value(f)
File “/usr/local/lib/python3.6/site-packages/sentry/db/models/base.py”, line 76, in __get_field_value
return getattr(self, field.attname, None)
File “/usr/local/lib/python3.6/site-packages/django/db/models/query_utils.py”, line 116, in get
instance.refresh_from_db(fields=[self.field_name])
File “/usr/local/lib/python3.6/site-packages/django/db/models/base.py”, line 691, in refresh_from_db
db_instance_qs = db_instance_qs.only(*fields)
File “/usr/local/lib/python3.6/site-packages/sentry/db/models/manager.py”, line 74, in only
raise NotImplementedError(“Use values_list instead [performance].”)
NotImplementedError: Use values_list instead [performance].
172.20.0.1 - - [11/Feb/2021:22:12:04 +0000] “GET /api/0/organizations/company/projects/?all_projects=1&collapse=latestDeploys HTTP/1.1” 500 642 " “Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36”
22:12:04 [WARNING] django.security.csrf: Forbidden (Referer checking failed - no Referer.): /api/1/store/ (status_code=403 request=<WSGIRequest: POST ‘/api/1/store/’>)
22:12:04 [ERROR] sentry_sdk.errors: Unexpected status code: 403 (body: b’\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n \n\n {“current”:“21.1.0”,“latest”:“21.1.0”,“build”:“486d790a8f52436ec1434dc78a897a4a78116827”,“upgradeAvailable”:false},“features”:,“distPrefix”:"/_static/1613075545/sentry/dist/",“needsUpgrade”:false,“dsn”:“https://01b52413ef2b447890a27e3902c2948f@sentry.domain.com/1”,“dsn_requests”:"",“statuspage”:null,“messages”:,“apmSampling”:0.0,“isOnPremise”:true,“invitesEnabled”:true,“gravatarBaseUrl”:“https://secure.gravatar.com”,“termsUrl”:null,“privacyUrl”:null,“lastOrganization”:null,“languageCode”:“en”,“userIdentity”:{“ip_address”:“172.20.0.18”},“csrfCookieName”:“sc”,“sentryConfig”:{“dsn”:“https://01b52413ef2b447890a27e3902c2948f@sentry.domain.com/1”,“release”:“486d790a8f52436ec1434dc78a897a4a78116827”,“environment”:“production”,“whitelistUrls”:},“isAuthenticated”:false,“user”:null};\n\n \n \n \n \n\n \n \n\n \n\n \n \n \n\n\n\n \n

\n \n\n \n \n\n\n
\n\n\n\n \n\n
\n
\n \n
\n\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n
\n
\n \n \n
\n

CSRF Verification Failed

\n
\n\n

A required security token was not found or was invalid.

\n\n

If you’re continually seeing this issue, try the following:

\n\n
    \n
  1. Clear cookies (at least for Sentry’s domain).
  2. \n
  3. Reload the page you’re trying to submit (don’t re-submit data).
  4. \n
  5. Re-enter the information, and submit the form again.
  6. \n
\n\n \n

You are seeing this message because Sentry requires a ‘Referer\n header’ to be sent by your Web browser, but none was sent. This header is\n required for security reasons, to ensure that your browser is not being\n hijacked by third parties.

\n\n

If you have configured your browser to disable ‘Referer’ headers, please\n re-enable them, at least for this site, or for HTTPS connections, or for\n ‘same-origin’ requests.

\n \n\n

Read more about CSRF on Wikipedia.

\n \n\n
\n
\n\n\n
\n
\n
\n \n\n \n\n\n’)
172.20.0.1 - - [11/Feb/2021:22:12:04 +0000] “POST /api/1/store/ HTTP/1.1” 403 4960 “-” “sentry.python/0.19.5”
172.20.0.1 - - [11/Feb/2021:22:12:05 +0000] “GET /api/0/organizations/company/broadcasts/ HTTP/1.1” 200 1040 “Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36”
22:12:09 [WARNING] django.security.csrf: Forbidden (CSRF token missing or incorrect.): /api/1/store/ (status_code=403 request=<WSGIRequest: POST ‘/api/1/store/?sentry_key=01b52413ef2b447890a27e3902c2948f&sentry_version=7’>)
172.20.0.1 - - [11/Feb/2021:22:12:09 +0000] “POST /api/1/store/?sentry_key=01b52413ef2b447890a27e3902c2948f&sentry_version=7 HTTP/1.1” 403 6016

Please search the forum for similar posts before sending new topics: Issue with CSRF token after sentry upgrade