An anonymous user must be identified by session ID (line 176 -> line 223)

Created on 20 June 2021, almost 4 years ago
Updated 7 March 2023, about 2 years ago

Problem/Motivation

Error with the anonymous user on any entity with a flag enabled.

The error is: Uncaught PHP Exception LogicException: "An anonymous user must be identified by session ID." at ...\web\modules\contrib\flag\src\FlagService.php line 176

This means that the site is completely unusable for anonymous users, as any entity of type "content" produces a WSOD.
Disabling the flags for the entity removes the error.

My current setup is:
Drupal 9.2
Flag 8.x-4.0-beta2

At the moment, the message stack is unusable with this issue.
Is this something to do with this?: https://www.drupal.org/node/3006306

Will updating to dev fix this?

Thanks

Steps to reproduce

Browse to any entity page with a flag enabled as anonymous user.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Postponed: needs info

Component

Flag core

Created by

🇦🇺Australia CBEEM

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024