Error on dashboard login: Invalid security or form key. Please refresh the page.
Preconditions (*)
- v2.4.3
Steps to reproduce (*)
- Install magento v2.4.3 by using composer
- Go to /admin_XXXXXX which is a unique admin url that generated by magento
- Login with your admin credentials
Expected result (*)
- If login successful, it should show dashboard without any error
Actual result (*)
- Dashboard loads with an error -> Invalid security or form key. Please refresh the page.
- https://www.dropbox.com/s/i5c3epqcuh5mhjw/Screen%20Shot%202021-08-11%20at%2014.42.11.png?dl=0
Network section of browser, filtered by doc
- /admin_XXXXXX POST 302 found
- /admin_XXXXXX/admin_XXXXXX/index/index/key/XXXXXX/ GET 302 found
- /admin_XXXXXX/admin/dashboard/index/key/XXXXXX/ GET 200 OK
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
- [ ] 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.
- [x] Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- [X] Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Hi @alitopaloglu. Thank you for your report. To help us process this issue please make sure that you provided the following information:
- Summary of the issue
- Information on your environment
- Steps to reproduce
- Expected and actual results
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
@magento give me 2.4-develop instance - upcoming 2.4.x release
For more details, please, review the Magento Contributor Assistant documentation.
Please, add a comment to assign the issue: @magento I am working on this
- Join Magento Community Engineering Slack and ask your questions in #github channel.
:warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
:clock10: You can find the schedule on the Magento Community Calendar page.
:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.
:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel
:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel
Isnt this the same issue as #33748 ? Check your logs if it says session size is exceeded.
No, this is not the same issue. After exceeding session size (solving issue #33748), the warning is still being diplayed:
Invalid security or form key. Please refresh the page.
Hi @achatpc. Thank you for your request. I'm working on Magento instance for you.
No, this is not the same issue. After exceeding session size (solving issue #33748), the warning is still being diplayed:
Invalid security or form key. Please refresh the page.
Mm for me it went away after exceeding the session size (I disabled it with "0").
Hi @achatpc, here is your Magento Instance: https://ccd28d956a54ce11d872ea27d25f9b05-2-4-develop.instances.magento-community.engineering Admin access: https://ccd28d956a54ce11d872ea27d25f9b05-2-4-develop.instances.magento-community.engineering/admin_99a1 Login: 8da6a650 Password: c29246f8fb4d
We also see this, the error appears on first entry to the admin panel but after a page refresh or navigating away from the initial screen it disappears.
Hi, I see the same error after upgrade my magento 2.4.2-p1 to 2.4.3. The error happens after admin login as @devchris79 said
I had the same error after upgrading from 2.4.2-p1 to 2.4.3, sessions on Redis.
Solved with the following queries, as default values are too strict and I couldn't modify them from admin panel, before setting them higher.
insert into core_config_data set scope="default", scope_id=0, path="system/security/max_session_size_admin", value=NULL;
insert into core_config_data set scope="default", scope_id=0, path="system/security/max_session_size_storefront", value="512000";
Edit: I'm still having the same issue after logging in in admin, without any log recorded, but it disappears while navigating and I'm able to fully use the admin panel.
@magento give me 2.4-develop instance
Hi @TheRealHunzik. Thank you for your request. I'm working on Magento instance for you.
Hi @TheRealHunzik, here is your Magento Instance: https://ccd28d956a54ce11d872ea27d25f9b05-2-4-develop.instances.magento-community.engineering Admin access: https://ccd28d956a54ce11d872ea27d25f9b05-2-4-develop.instances.magento-community.engineering/admin_615a Login: 68502e5b Password: 94a22f51a977
Hi @engcom-November. 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: :point_down:
-
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
Details
If the issue has a valid description, the labelIssue: Format is validwill be added to the issue automatically. Please, edit issue description if needed, until labelIssue: Format is validappears. -
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add
Issue: Clear Descriptionlabel to the issue by yourself. -
[ ] 3. Add
Component: XXXXXlabel(s) to the ticket, indicating the components it may be related to. -
[ ] 4. Verify that the issue is reproducible on
2.4-developbranchDetails
- Add the comment@magento give me 2.4-develop instanceto deploy test instance on Magento infrastructure.
- If the issue is reproducible on2.4-developbranch, please, add the labelReproduced 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: Confirmedonce verification is complete. -
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
Verified the issue on Magento 2.4.3 version after upgrading from 2.4.2-p1 to 2.4.3 and the issue is reproducible:
Steps to reproduce:
Upgrade Magento version from 2.4.2-p1 to 2.4.3
Login to Magento Admin using admin credentials
Issue: Invalid security or form key. Please refresh the page. Error message is getting displayed on Admin Dashboard
User have to refresh the page to remove the error message
Logout and Login again - Issue: Above error message is displayed always after every login
:white_check_mark: Confirmed by @engcom-November
Thank you for verifying the issue. Based on the provided information internal tickets MC-43085 were created
Issue Available: @engcom-November, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
Verified the issue on Magento 2.4.3 version after upgrading from 2.4.2-p1 to 2.4.3 and the issue is reproducible: Steps to reproduce: Upgrade Magento version from 2.4.2-p1 to 2.4.3 Login to Magento Admin using admin credentials Issue: Invalid security or form key. Please refresh the page. Error message is getting displayed on Admin Dashboard User have to refresh the page to remove the error message Logout and Login again - Issue: Above error message is displayed always after every login
Not isolated to upgrading from 2.4.2-p1 to 2.4.3. This has also occured for me when upgrading from 2.3.6 P-1
I meet this issues,too. When I upgrade 2.4.2 --> 2.4.3.
This message nerver disappears weather I refresh or no in my env.
Same issue. Fresh Installation of 2.4.3
Not only 2.4.3. I see this issue sometimes after login to admin from version 2.3.3. Got forever loading but after reload page once again seem error messages not visible
When we upgraded to 2.4.3 this also happened. Put in a ticket from support they said they couldnt replicate it. Nice to see others are having the same issue
