Search code examples
phpsymfony-4.3

UVdesk application getting frequently logged out


I am using UVdesk for a ticketing system. I have tested it locally and uploaded it to the server. Everything was working fine until recently the UVdesk on the live server started to get logged out frequently while accessing any of the links. It's working fine in my local system. I have checked the server logs but couldn't find any issue in the logs. What is happening is that when I click a link it's giving a 302 response with a redirect to login.

enter image description here

I have enabled the development mode and now I am getting this error while redirected:

Populated the TokenStorage with an anonymous Token.

UVdesk is developed using Symfony and this error is part of the Symfony framework. What can be the issue? Please help

[2021-05-14 05:00:01] php.INFO: User Deprecated: Checking for the AdvancedUserInterface in "Symfony\Component\Security\Core\Authentication\Token\AbstractToken::hasUserChanged()" is deprecated since Symfony 4.1 and support for it will be removed in 5.0. Implement the Symfony\Component\Security\Core\User\EquatableInterface to check if the user has been changed, {"exception":"[object] (ErrorException(code: 0): User Deprecated: Checking for the AdvancedUserInterface in \"Symfony\\Component\\Security\\Core\\Authentication\\Token\\AbstractToken::hasUserChanged()\" is deprecated since Symfony 4.1 and support for it will be removed in 5.0. Implement the Symfony\\Component\\Security\\Core\\User\\EquatableInterface to check if the user has been changed, at /home/admin/domains/tellmedoc.in/public_html/uvdesk-community/vendor/symfony/security-core/Authentication/Token/AbstractToken.php:325)"} []
[2021-05-14 05:00:01] php.INFO: User Deprecated: Checking for the AdvancedUserInterface in "Symfony\Component\Security\Core\Authentication\Token\AbstractToken::hasUserChanged()" is deprecated since Symfony 4.1 and support for it will be removed in 5.0. Implement the Symfony\Component\Security\Core\User\EquatableInterface to check if the user has been changed, {"exception":"[object] (ErrorException(code: 0): User Deprecated: Checking for the AdvancedUserInterface in \"Symfony\\Component\\Security\\Core\\Authentication\\Token\\AbstractToken::hasUserChanged()\" is deprecated since Symfony 4.1 and support for it will be removed in 5.0. Implement the Symfony\\Component\\Security\\Core\\User\\EquatableInterface to check if the user has been changed, at /home/admin/domains/tellmedoc.in/public_html/uvdesk-community/vendor/symfony/security-core/Authentication/Token/AbstractToken.php:325)"} []
[2021-05-14 05:00:01] security.DEBUG: User was reloaded from a user provider. {"provider":"Webkul\\UVDesk\\CoreFrameworkBundle\\Providers\\UserProvider","username":"[email protected]"} []
[2021-05-14 05:00:02] doctrine.DEBUG: SELECT t0.id AS id_1, t0.name AS name_2, t0.code AS code_3, t0.logo AS logo_4, t0.theme_color AS theme_color_5, t0.favicon AS favicon_6, t0.created_at AS created_at_7, t0.updated_at AS updated_at_8, t0.is_active AS is_active_9, t0.timezone AS timezone_10, t0.timeformat AS timeformat_11 FROM uv_website t0 WHERE t0.code = ? LIMIT 1 ["knowledgebase"] []
[2021-05-14 05:00:02] doctrine.DEBUG: SELECT t0.id AS id_1, t0.status AS status_2, t0.brand_color AS brand_color_3, t0.page_background_color AS page_background_color_4, t0.header_background_color AS header_background_color_5, t0.link_color AS link_color_6, t0.article_text_color AS article_text_color_7, t0.ticket_create_option AS ticket_create_option_8, t0.site_description AS site_description_9, t0.meta_description AS meta_description_10, t0.meta_keywords AS meta_keywords_11, t0.homepage_content AS homepage_content_12, t0.white_list AS white_list_13, t0.black_list AS black_list_14, t0.created_at AS created_at_15, t0.updated_at AS updated_at_16, t0.broadcast_message AS broadcast_message_17, t0.disable_customer_login AS disable_customer_login_18, t0.script AS script_19, t0.custom_css AS custom_css_20, t0.is_active AS is_active_21, t0.header_links AS header_links_22, t0.footer_links AS footer_links_23, t0.banner_background_color AS banner_background_color_24, t0.link_hover_color AS link_hover_color_25, t0.login_required_to_create AS login_required_to_create_26, t0.remove_customer_login_button AS remove_customer_login_button_27, t0.remove_branding_content AS remove_branding_content_28, t0.website AS website_29 FROM uv_website_knowledgebase t0 WHERE t0.website = ? AND t0.is_active = ? LIMIT 1 [2,1] []
[2021-05-14 05:00:02] doctrine.DEBUG: SELECT t0.id AS id_1, t0.name AS name_2, t0.code AS code_3, t0.logo AS logo_4, t0.theme_color AS theme_color_5, t0.favicon AS favicon_6, t0.created_at AS created_at_7, t0.updated_at AS updated_at_8, t0.is_active AS is_active_9, t0.timezone AS timezone_10, t0.timeformat AS timeformat_11 FROM uv_website t0 WHERE t0.code = ? LIMIT 1 ["helpdesk"] []
[2021-05-14 05:00:03] doctrine.DEBUG: SELECT t0.id AS id_1, t0.source AS source_2, t0.skype_id AS skype_id_3, t0.contact_number AS contact_number_4, t0.designation AS designation_5, t0.signature AS signature_6, t0.profile_image_path AS profile_image_path_7, t0.created_at AS created_at_8, t0.updated_at AS updated_at_9, t0.is_active AS is_active_10, t0.is_verified AS is_verified_11, t0.is_starred AS is_starred_12, t0.ticket_access_level AS ticket_access_level_13, t0.user_id AS user_id_14, t0.supportRole_id AS supportRole_id_15 FROM uv_user_instance t0 WHERE t0.user_id = ? [1] []
[2021-05-14 05:00:03] doctrine.DEBUG: SELECT t0.id AS id_1, t0.code AS code_2, t0.description AS description_3, t0.is_active AS is_active_4 FROM uv_ticket_type t0 WHERE t0.is_active = ? [true] []
[2021-05-14 05:00:03] security.DEBUG: Stored the security token in the session. {"key":"_security_back_support"} []
[2021-05-14 05:00:04] request.INFO: Matched route "_wdt". {"route":"_wdt","route_parameters":{"_route":"_wdt","_controller":"web_profiler.controller.profiler::toolbarAction","token":"998290"},"request_uri":"https://tellmedoc.in/tickets/_wdt/998290","method":"GET"} []
[2021-05-14 05:00:04] security.INFO: Populated the TokenStorage with an anonymous Token. [] []
[2021-05-14 05:00:07] request.INFO: Matched route "helpdesk_member_account_collection". {"route":"helpdesk_member_account_collection","route_parameters":{"_route":"helpdesk_member_account_collection","_controller":"Webkul\\UVDesk\\CoreFrameworkBundle\\Controller\\Account::listAgents","_locale":"en"},"request_uri":"https://tellmedoc.in/tickets/en/member/agents","method":"GET"} []
[2021-05-14 05:00:07] security.INFO: Populated the TokenStorage with an anonymous Token. [] []
[2021-05-14 05:00:07] security.DEBUG: Access denied, the user is not fully authenticated; redirecting to authentication entry point. {"exception":"[object] (Symfony\\Component\\Security\\Core\\Exception\\AccessDeniedException(code: 403): Access Denied. at /home/admin/domains/tellmedoc.in/public_html/uvdesk-community/vendor/symfony/security-http/Firewall/AccessListener.php:72)"} []
[2021-05-14 05:00:07] security.DEBUG: Calling Authentication entry point. [] []
[2021-05-14 05:00:07] php.INFO: User Deprecated: The "Webkul\UVDesk\CoreFrameworkBundle\Controller\Account" class extends "Symfony\Bundle\FrameworkBundle\Controller\Controller" that is deprecated since Symfony 4.2, use "Symfony\Bundle\FrameworkBundle\Controller\AbstractController" instead. {"exception":"[object] (ErrorException(code: 0): User Deprecated: The \"Webkul\\UVDesk\\CoreFrameworkBundle\\Controller\\Account\" class extends \"Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller\" that is deprecated since Symfony 4.2, use \"Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController\" instead. at /home/admin/domains/tellmedoc.in/public_html/uvdesk-community/vendor/symfony/debug/DebugClassLoader.php:200)"} []
[2021-05-14 05:00:07] request.INFO: Matched route "helpdesk_member_handle_login". {"route":"helpdesk_member_handle_login","route_parameters":{"_route":"helpdesk_member_handle_login","_controller":"Webkul\\UVDesk\\CoreFrameworkBundle\\Controller\\Authentication::login","_locale":"en"},"request_uri":"https://tellmedoc.in/tickets/en/member/login","method":"GET"} []
[2021-05-14 05:00:07] security.INFO: Populated the TokenStorage with an anonymous Token. [] []
[2021-05-14 05:00:08] doctrine.DEBUG: SELECT t0.id AS id_1, t0.name AS name_2, t0.code AS code_3, t0.logo AS logo_4, t0.theme_color AS theme_color_5, t0.favicon AS favicon_6, t0.created_at AS created_at_7, t0.updated_at AS updated_at_8, t0.is_active AS is_active_9, t0.timezone AS timezone_10, t0.timeformat AS timeformat_11 FROM uv_website t0 WHERE t0.code = ? LIMIT 1 ["knowledgebase"] []
[2021-05-14 05:00:08] doctrine.DEBUG: SELECT t0.id AS id_1, t0.status AS status_2, t0.brand_color AS brand_color_3, t0.page_background_color AS page_background_color_4, t0.header_background_color AS header_background_color_5, t0.link_color AS link_color_6, t0.article_text_color AS article_text_color_7, t0.ticket_create_option AS ticket_create_option_8, t0.site_description AS site_description_9, t0.meta_description AS meta_description_10, t0.meta_keywords AS meta_keywords_11, t0.homepage_content AS homepage_content_12, t0.white_list AS white_list_13, t0.black_list AS black_list_14, t0.created_at AS created_at_15, t0.updated_at AS updated_at_16, t0.broadcast_message AS broadcast_message_17, t0.disable_customer_login AS disable_customer_login_18, t0.script AS script_19, t0.custom_css AS custom_css_20, t0.is_active AS is_active_21, t0.header_links AS header_links_22, t0.footer_links AS footer_links_23, t0.banner_background_color AS banner_background_color_24, t0.link_hover_color AS link_hover_color_25, t0.login_required_to_create AS login_required_to_create_26, t0.remove_customer_login_button AS remove_customer_login_button_27, t0.remove_branding_content AS remove_branding_content_28, t0.website AS website_29 FROM uv_website_knowledgebase t0 WHERE t0.website = ? AND t0.is_active = ? LIMIT 1 [2,1] []
[2021-05-14 05:00:08] doctrine.DEBUG: SELECT t0.id AS id_1, t0.name AS name_2, t0.code AS code_3, t0.logo AS logo_4, t0.theme_color AS theme_color_5, t0.favicon AS favicon_6, t0.created_at AS created_at_7, t0.updated_at AS updated_at_8, t0.is_active AS is_active_9, t0.timezone AS timezone_10, t0.timeformat AS timeformat_11 FROM uv_website t0 WHERE t0.code = ? LIMIT 1 ["helpdesk"] []
[2021-05-14 05:00:09] request.INFO: Matched route "_wdt". {"route":"_wdt","route_parameters":{"_route":"_wdt","_controller":"web_profiler.controller.profiler::toolbarAction","token":"780a1b"},"request_uri":"https://tellmedoc.in/tickets/_wdt/780a1b","method":"GET"} []
[2021-05-14 05:00:09] security.INFO: Populated the TokenStorage with an anonymous Token. [] []

Solution

  • The issue was that the session was not getting saved on the server. The session path was missing on the server. I fixed it by giving the path in the file uvdesk-community\config\packages\framework.yaml

    session: handler_id: session.handler.native_file save_path: '%kernel.project_dir%/var/sessions/%kernel.environment%'
    

    Also, remember to give the correct permission to the folder uvdesk-community\var\sessions\prod