There is code changes on Flag modules and it's throwing error for anonymous users.
The website encountered an unexpected error. Please try again later.
LogicException: An anonymous user must be identifed by session ID. in Drupal\flag\FlagService->getAllEntityFlaggings() (line 194 of modules/flag/src/FlagService.php).
Drupal\flag\FlagService->getAllEntityFlaggings(Object, Object) (Line: 24)
message_subscribe_email_flag_action_access('flag', Object, Object, Object)
call_user_func_array('message_subscribe_email_flag_action_access', Array) (Line: 402)
Drupal\Core\Extension\ModuleHandler->invokeAll('flag_action_access', Array) (Line: 175)
Drupal\flag\FlagType\FlagTypeBase->actionAccess('flag', Object, Object, Object) (Line: 314)
Drupal\flag\Plugin\Flag\EntityFlagType->actionAccess('flag', Object, Object, Object) (Line: 145)
Drupal\flag\Plugin\Flag\UserFlagType->actionAccess('flag', Object, Object, Object) (Line: 355)
Drupal\flag\Entity\Flag->actionAccess('flag', Object, Object) (Line: 98)
Drupal\flag\ActionLink\ActionLinkTypeBase->getAsFlagLink(Object, Object) (Line: 23)
Drupal\flag\Plugin\ActionLink\AJAXactionLink->getAsFlagLink(Object, Object) (Line: 48)
Drupal\flag\FlagLinkBuilder->build('user', '1', 'email_user')
call_user_func_array(Array, Array) (Line: 356)
Drupal\Core\Render\Renderer->doRender(Array, 1) (Line: 195)
Drupal\Core\Render\Renderer->render(Array, 1) (Line: 151)
Drupal\Core\Render\Renderer->Drupal\Core\Render{closure}() (Line: 574)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 152)
Drupal\Core\Render\Renderer->renderPlain(Array) (Line: 166)
Drupal\Core\Render\Renderer->renderPlaceholder('callback=flag.link_builder%3Abuild&args[0]=user&args[1]=1&args[2]=email_user&token=GCdGR5FCVqLIzAYH2-ME7D7hVeeb5zSHsC4ULIdn5iY', Array) (Line: 698)
Drupal\big_pipe\Render\BigPipe->renderPlaceholder('callback=flag.link_builder%3Abuild&args[0]=user&args[1]=1&args[2]=email_user&token=GCdGR5FCVqLIzAYH2-ME7D7hVeeb5zSHsC4ULIdn5iY', Array) (Line: 552)
Drupal\big_pipe\Render\BigPipe->sendPlaceholders(Array, Array, Object) (Line: 305)
Drupal\big_pipe\Render\BigPipe->sendContent(Object) (Line: 112)
Drupal\big_pipe\Render\BigPipeResponse->sendContent() (Line: 374)
Symfony\Component\HttpFoundation\Response->send() (Line: 20)
You may check this discussion on Drupal Flag.
There is code changes on
Flagmodules and it's throwing error for anonymous users.You may check this discussion on Drupal Flag.