Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated Functionality: Creation of dynamic property Magento\Framework\Acl::$_roleRegistry #37469

Open
1 of 5 tasks
gladroger opened this issue May 5, 2023 · 23 comments
Open
1 of 5 tasks
Labels
Area: Upgrades - Upgrade Compatibility Tool Component: Framework/Acl Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: ready for dev Reported on 2.4.6 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch

Comments

@gladroger
Copy link

Preconditions and environment

After updating Magento CE from 2.4.5-p1 to 2.4.6, cant enter admin panel anymore.

Found the same error mentioned here: https://magento.stackexchange.com/questions/366673/deprecated-functionality-error-in-sessionmanager-php-on-line-186-after-update-to

PHP 8.2.5 on Centos 7

  • Magento version 2.4.6
    `- 1 exception(s):
    Exception #0 (Exception): Deprecated Functionality: Creation of dynamic property Magento\Framework\Acl::$_roleRegistry is deprecated in vendor/magento/framework/Session/SessionManager.php on line 186

Exception #0 (Exception): Deprecated Functionality: Creation of dynamic property Magento\Framework\Acl::$_roleRegistry is deprecated in vendor/magento/framework/Session/SessionManager.php on line 186

#1 session_start() called at [vendor/magento/framework/Session/SessionManager.php:186]
#2 Magento\Framework\Session\SessionManager->start() called at [generated/code/Magento/Backend/Model/Auth/Session/Interceptor.php:32]
#3 Magento\Backend\Model\Auth\Session\Interceptor->start() called at [vendor/magento/framework/Session/SessionManager.php:123]
#4 Magento\Framework\Session\SessionManager->__construct() called at [vendor/magento/module-backend/Model/Auth/Session.php:104]
#5 Magento\Backend\Model\Auth\Session->__construct() called at [generated/code/Magento/Backend/Model/Auth/Session/Interceptor.php:14]
#6 Magento\Backend\Model\Auth\Session\Interceptor->__construct() called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:121]
#7 Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject() called at [vendor/magento/framework/ObjectManager/Factory/Compiled.php:108]
#8 Magento\Framework\ObjectManager\Factory\Compiled->create() called at [vendor/magento/framework/ObjectManager/Factory/Compiled.php:150]
#9 Magento\Framework\ObjectManager\Factory\Compiled->get() called at [vendor/magento/framework/ObjectManager/Factory/Compiled.php:79]
#10 Magento\Framework\ObjectManager\Factory\Compiled->create() called at [vendor/magento/framework/ObjectManager/Factory/Compiled.php:150]
#11 Magento\Framework\ObjectManager\Factory\Compiled->get() called at [vendor/magento/framework/ObjectManager/Factory/Compiled.php:79]
#12 Magento\Framework\ObjectManager\Factory\Compiled->create() called at [vendor/magento/framework/ObjectManager/Factory/Compiled.php:150]
#13 Magento\Framework\ObjectManager\Factory\Compiled->get() called at [vendor/magento/framework/ObjectManager/Factory/Compiled.php:125]
#14 Magento\Framework\ObjectManager\Factory\Compiled->parseArray() called at [vendor/magento/framework/ObjectManager/Factory/Compiled.php:86]
#15 Magento\Framework\ObjectManager\Factory\Compiled->create() called at [vendor/magento/framework/ObjectManager/ObjectManager.php:70]
#16 Magento\Framework\ObjectManager\ObjectManager->get() called at [vendor/magento/framework/App/FrontController.php:109]
#17 Magento\Framework\App\FrontController->__construct() called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:14]
#18 Magento\Framework\App\FrontController\Interceptor->__construct() called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:121]
#19 Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject() called at [vendor/magento/framework/ObjectManager/Factory/Compiled.php:108]
#20 Magento\Framework\ObjectManager\Factory\Compiled->create() called at [vendor/magento/framework/ObjectManager/ObjectManager.php:70]
#21 Magento\Framework\ObjectManager\ObjectManager->get() called at [vendor/magento/framework/App/Http.php:115]
#22 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:23]
#23 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:264]
#24 Magento\Framework\App\Bootstrap->run() called at [pub/index.php:30]
`

Steps to reproduce

  1. Open admin panel after upgrade

Expected result

Get into admin

Actual result

Error.

Additional information

No response

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
@m2-assistant
Copy link

m2-assistant bot commented May 5, 2023

Hi @gladroger. Thank you for your report.
To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:


Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
🕙 You can find the schedule on the Magento Community Calendar page.
📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

@engcom-Bravo engcom-Bravo added the Reported on 2.4.6 Indicates original Magento version for the Issue report. label May 5, 2023
@engcom-Bravo engcom-Bravo self-assigned this May 5, 2023
@m2-assistant
Copy link

m2-assistant bot commented May 5, 2023

Hi @engcom-Bravo. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
  • 3. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
  • 4. Verify that the issue is reproducible on 2.4-develop branch
    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
  • 5. Add label Issue: Confirmed once verification is complete.
  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@gladroger
Copy link
Author

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

Hi @gladroger. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

@gladroger
Copy link
Author

I have also solved it temporary by editing SessionManager.php

// if (isset($_SESSION['destroyed'])
// && $_SESSION['destroyed'] < time() - $this->sessionConfig->getCookieLifetime()
// ) {
// $this->destroy(['clear_storage' => true]);
// }

            if (isset($_SESSION['destroyed'])
                && $_SESSION['destroyed'] < time() - $this->sessionConfig->getCookieLifetime()
            ) {
                $this->destroy(['clear_storage' => true]);
            } elseif (!isset($this->_roleRegistry)) {
                $this->_roleRegistry = null;
            } 

@yohangwak
Copy link

@gladroger Thanks for this!

After I apply your solution, I get other error on front-end and admin

main.CRITICAL: Exception: Deprecated Functionality: Creation of dynamic property Magento\Framework\Session\Generic\Interceptor::$_roleRegistry is deprecated in vendor/magento/framework/Session/SessionManager.php on line 198 in vendor/magento/framework/App/ErrorHandler.php:62
Stack trace:
#0 vendor/magento/framework/Session/SessionManager.php(198): Magento\Framework\App\ErrorHandler->handler()
#1 vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\Session\SessionManager->start()
#2 vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Session\Generic\Interceptor->___callParent()
#3 vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\Session\Generic\Interceptor->Magento\Framework\Interception{closure}()
#4 generated/code/Magento/Framework/Session/Generic/Interceptor.php(41): Magento\Framework\Session\Generic\Interceptor->___callPlugins()
#5 vendor/magento/framework/Session/SessionManager.php(123): Magento\Framework\Session\Generic\Interceptor->start()
#6 generated/code/Magento/Framework/Session/Generic/Interceptor.php(14): Magento\Framework\Session\SessionManager->__construct()
#7 vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(121): Magento\Framework\Session\Generic\Interceptor->__construct()
#8 vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject()
#9 vendor/magento/framework/ObjectManager/Factory/Compiled.php(150): Magento\Framework\ObjectManager\Factory\Compiled->create()
#10 vendor/magento/framework/ObjectManager/Factory/Compiled.php(79): Magento\Framework\ObjectManager\Factory\Compiled->get()
#11 vendor/magento/framework/ObjectManager/Factory/Compiled.php(150): Magento\Framework\ObjectManager\Factory\Compiled->create()
#12 vendor/magento/framework/ObjectManager/Factory/Compiled.php(79): Magento\Framework\ObjectManager\Factory\Compiled->get()
#13 vendor/magento/framework/ObjectManager/Factory/Compiled.php(150): Magento\Framework\ObjectManager\Factory\Compiled->create()
#14 vendor/magento/framework/ObjectManager/Factory/Compiled.php(79): Magento\Framework\ObjectManager\Factory\Compiled->get()
#15 vendor/magento/framework/ObjectManager/Factory/Compiled.php(150): Magento\Framework\ObjectManager\Factory\Compiled->create()
#16 vendor/magento/framework/ObjectManager/Factory/Compiled.php(125): Magento\Framework\ObjectManager\Factory\Compiled->get()
#17 vendor/magento/framework/ObjectManager/Factory/Compiled.php(86): Magento\Framework\ObjectManager\Factory\Compiled->parseArray()
#18 vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Compiled->create()
#19 vendor/magento/framework/App/FrontController.php(109): Magento\Framework\ObjectManager\ObjectManager->get()
#20 generated/code/Magento/Framework/App/FrontController/Interceptor.php(14): Magento\Framework\App\FrontController->__construct()
#21 vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(121): Magento\Framework\App\FrontController\Interceptor->__construct()
#22 vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject()
#23 vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Compiled->create()
#24 vendor/magento/framework/App/Http.php(115): Magento\Framework\ObjectManager\ObjectManager->get()
#25 generated/code/Magento/Framework/App/Http/Interceptor.php(23): Magento\Framework\App\Http->launch()
#26 vendor/magento/framework/App/Bootstrap.php

@gladroger
Copy link
Author

gladroger commented May 6, 2023

@yohangwak

I was in a hurry to get live again so I also changed the error reporting setting. I had lots of small problems during the day but some were due to 3rd party modules.

app/bootstrap.php
error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT);

@ihor-sviziev ihor-sviziev added the Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. label May 8, 2023
@engcom-Bravo
Copy link
Contributor

Hi @gladroger,

Thank you for reporting and collaboration.

Verified the issue while upgrading from Magento 2.4.5-p1 to Magento 2.4.6(latest version) we are not able to reproduce the issue. Kindly refer the attached video.

We are able to enter the admin panel successfully.

Screenshot 2023-05-09 at 2 12 59 PM

Screen.Recording.2023-05-09.at.2.14.38.PM.mov

Kindly check the issue while upgrading from 2.4.5-p1 to 2.4.6 and check if any 3rd party extensions / modules enabled is causing this issue.

Thanks.

@engcom-Bravo engcom-Bravo added the Issue: needs update Additional information is require, waiting for response label May 9, 2023
@gladroger
Copy link
Author

What php version are you using when testing?

@engcom-Bravo
Copy link
Contributor

Hi @gladroger,

Thanks for your update.

We are using php 8.1.

Screenshot 2023-05-11 at 12 36 14 PM

Thanks.

@yohangwak
Copy link

Hi @gladroger,

Thanks for your update.

We are using php 8.1.

Screenshot 2023-05-11 at 12 36 14 PM Thanks.

Can you try with php 8.2? I get error with php 8.2

@engcom-Bravo
Copy link
Contributor

Hi @gladroger,

Thanks for your update.

Verified the issue while upgrading from Magento 2.4.5-p1 to Magento 2.4.6(latest version) we are not able to reproduce the issue.Kindly refer the screenshots.

We have installed with php 8.2

Screenshot 2023-05-25 at 4 50 55 PM Screenshot 2023-05-25 at 4 50 37 PM Screenshot 2023-05-25 at 2 37 25 PM Screenshot 2023-05-25 at 4 49 50 PM

Kindly check the issue while upgrading from 2.4.5-p1 to 2.4.6 and check if any 3rd party extensions / modules enabled is causing this issue.

Thanks.

@engcom-Bravo
Copy link
Contributor

Hi @gladroger,

We have noticed that this issue has not been updated for a period of 14 Days.
Hence we assume that this issue is fixed now, so we are closing it. Please raise a fresh ticket or reopen this ticket if you need more assistance on this.

Thanks.

@domeglic
Copy link

domeglic commented Dec 20, 2023

I had the same problem while updating from 2.4.5 to 2.4.6. I think it happens if you have an admin session and then update, because after clearing the sessions I didn't have this problem. That class must somehow be serialized in the session with the old variable name _roleRegistry which got renamed.

So not a real issue.

@arunkumar2687
Copy link

I see the same on Upgrading from Adobe Commerce Cloud 2.4.3-p1 to 2.4.6-p4

report.CRITICAL: Exception: Deprecated Functionality: Creation of dynamic property Magento\Framework\Session\Generic\Interceptor::$_roleRegistry is deprecated in /app//vendor/magento/framework/Session/SessionManager.php on line 197 in /app//vendor/magento/framework/App/ErrorHandler.php:62

@cbradleyacadaca
Copy link

Issue is caused by existing admin session. All you need to do is clear browser cookies and I also ran this MySQL script: delete from admin_user_session;

@engcom-Hotel engcom-Hotel self-assigned this Jul 8, 2024
Copy link

m2-assistant bot commented Jul 8, 2024

Hi @engcom-Hotel. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
  • 3. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
  • 4. Verify that the issue is reproducible on 2.4-develop branch
    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
  • 5. Add label Issue: Confirmed once verification is complete.
  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Hotel
Copy link
Contributor

Hello @gladroger,

Thanks for reporting the issue!

The issue is reproducible for us, we are getting the error after upgrading Magento to 2.4.7-p1.

@cbradleyacadaca Thanks for the resolution.

Confirming this issue for further processing.

Thanks

@engcom-Hotel engcom-Hotel reopened this Jul 8, 2024
@m2-community-project m2-community-project bot removed Progress: done Issue: ready for confirmation Issue: needs update Additional information is require, waiting for response labels Jul 8, 2024
@engcom-Hotel engcom-Hotel added Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Component: Framework/Acl Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Area: Upgrades - Upgrade Compatibility Tool and removed Progress: dev in progress labels Jul 8, 2024
@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.adobe.com/browse/AC-12343 is successfully created for this GitHub issue.

Copy link

m2-assistant bot commented Jul 8, 2024

✅ Confirmed by @engcom-Hotel. Thank you for verifying the issue.
Issue Available: @engcom-Hotel, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Upgrades - Upgrade Compatibility Tool Component: Framework/Acl Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: ready for dev Reported on 2.4.6 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Projects
Status: Ready for Development
Development

No branches or pull requests