-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Problem reading session file #3572
Comments
I also see this behavior, and it's really worrying me because as long as this persists I cannot possibly put any site live! |
Same issues here and only after upgrading from 2.0.0. to 2.0.2. |
@bb8d clearing cookies should be performed after upgrading. @sengaigibon there are two internal tickets that should solve your problem and will be delivered soon (MAGETWO-46014 and MAGETWO-49449) |
@sevos1984 cookies and local storage was cleaned. |
Now I noticed two more issues, one is kind of the opposite of this one: I'm adding custom fields to the address, then in the checkout step 1, after I update the page pressing F5 suddenly I see a page telling me I have no items in my cart, customer name in the top menu bar, item amount in the orange square. If I click into My Account I get redirected to Sign in page... Should I open a new issue describing all the details? |
@sevos1984 Great! Thanks! 👍 |
@sengaigibon Check that your system permissions set correctly http://devdocs.magento.com/guides/v2.0/install-gde/prereq/file-system-perms.html, also try clearing everything in var folder. |
I found that if I clean var/session* but don't clean browser cookies is when I get the behavior of the last comment with the customer name in the bar but logged out. |
@sevos1984 what is the status on those MAGETWO-46014 and MAGETWO-49449? Also, will this lead to a new release or will I need to use the dev branch to get it fixed? |
Another week has gone by, so I'm going to ask again: Is this fixed now @sevos1984 and @slavvka ? We'd really like to show Magento2 in client meetings, but as long as a simple customer login doesn't work properly we just can't do that. |
@bb8d can you share with us some details about your installation environment? such as operating system, running a virtual machine or containers? any special software running on your Magento instance? Thanks! |
Sure: OS: Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u6 (2015-11-09) x86_64 GNU/Linux (debian 8.2 - jessie) |
MAGETWO-46014 is regarding delayed messages and will be delivered later, @pantaoran @bb8d I can't recreate your problem, looks like some issues with your environment |
@sevos1984 what does that mean "MAGETWO-46014 will be delivered later"? How much later? Regarding environment, I'm running this in Docker containers, so there isn't necessarily a single one OS, but all the official containers run debian 8 (jessie). nginx: https://hub.docker.com/_/nginx/ (I'm using the nginx:1.9 image, version output says nginx/1.9.10) edit: added full php config details |
@pantaoran later after release. I have nginx1.8.1 and php7.0.6-dev. I see you don't have bcmath extension that is required. |
The same weird behaviour as @sengaigibon mentioned, here on Magento 2.0.4. |
@sevos1984 thanks for this info. According to the official documentation, bcmath is only required for the enterprise edition, and I'm using the CE and the readiness check at installation said that I had everything I needed. @sengaigibon , @devhn , @moe-kayali , I was able to get this to work now and want to share my observations. It appears to have something to do with the used OS. I previously noticed that the problem didn't appear on my Ubuntu-based development machine, but on my Debian server it failed as described. This is despite the fact that I'm running it all in docker containers, which should abstract away the host OS for all I know, but that doesn't seem to be happening. All my containers were using the official images as detailed in my last comment, and those are all Debian-based. So Debian containers on Ubuntu host worked, but Debian containers on Debian host didn't work. I now created my own php and nginx containers to replace the official ones, and mine are based on Ubuntu. Lo and behold, this now works. Ubuntu containers work on Ubuntu host and on Debian host, the problem is gone. All this is of course way too little data to be sure that this is the real reason, but my problem seems solved for now so I won't invest any more time. I guess the Magento team wasn't kidding when they state that Ubuntu is the supported OS. |
I'm back again to report more problems. The issue doesn't happen on my desktop anymore, but now I started testing mobile clients and here it's still the same behavior as described above, after logging in I see the "My Account" page but without my name in the menu, and when I try to checkout it says I'm not logged in. It happens consistently on my android phone in firefox and chrome, and also on an iphone's safari. On desktop it never happens, regardless if I enable "device mode" to simulate mobile clients or not. The mystery continues, guess my previous theory isn't that credible anymore :-( |
I believe I am having the same issue on 2 different sites as well. |
I am getting session issues on staging server. Like not getting current page, customer data etc from the session object. |
The issue was because of full page cache. After disabling, session is working fine. |
I can reproduce the bug, if is it useful I can post the code. |
I have full page cache turned off and still having the issue. I even rebuilt the site thinking the composer install was the issue, it is the same with a downloaded zip install. |
Hello, I have found one cause for the two problems below:
When using Google Chrome in "private browsing" state, no data is saved to the local storage therefore the needed data is not available for Magento. In this situation you will never see cart count and username. But it still does occur in normal browsing state to but less often. |
@slavvka I got permission from my bosses to share our code/settings/environment with you for best possible cooperation on this problem. Please reach out to me by mail at [edited out] and I will see if I can supply you with anything useful. |
Just to report back on my current status for everyone: I've upgraded to Magento 2.1.0 pretty much right after it came out, but I still see these session problems. It's tricky because even after all this time I don't know a reliable way to always reproduce it. Not all users of my system see the problem, but some do. |
Problem of reading customer name still exists in Magento CE 2.1.0. It works in firefox[notrmal mode] but not in chrome[latest version]. |
It is not browser-dependent. I did some more debugging on 2.1.0 just now and it looks like it's all about the presence/absence of a cookie with name(key)="section_data_ids". When the cookie is there, everything works fine. When I delete all cookies in my browser then the problem appears; even after customer login I cannot go to the checkout. That cookie does not get recreated, or at least not always. @slavvka for reproducing the described problem, please check if deleting that cookie will lead to the expected result. Probably you need to find out why that cookie doesn't get set under some circumstances... |
My DebugI think it comes down to this comment. #3357 (comment) Once we set FPC, everything is working fine and fast. But during the development its really a big issue. We cant set FPC and problem persist. Cookie check happens here: /Magento_Customer/js/customer-data.js line number 192 in init() function. |
Hey Guys, I have found a temporary solution: To solve cart count/content update issue modify below file: find this line: and add below code :
After adding above lines your function looks like below:
Please test the changes on your code, and confirm if it is working. This is very temporary solution. |
The comment from @sky4git is interesting and helped me a little bit. Enabling FPC allowed me to not be blocked from going to the checkout anymore. Before this I would login, add a product to cart but when I wanted to go to the checkout (through minicart) it would show the login popup as if I wasn't logged in. This doesn't happen anymore even after clearing cookies. But I still have another problem which persists, and the change from the comment from @100php didn't change anything in that regard. After logging in I'm redirected to MyAccount page and I see my username in the header. However, as soon as I go to any product overview or details page my name disappears in the header, and if I now want to add a product to my wishlist I get that login popup again. Now I have all caches enabled, and the minicart items are always visible now from what I can tell, so that's progress compared to before. |
@pantaoran is your full page cache on? |
It's weird... Same problem as @pantaoran. |
@100php my last sentence specifically answered your question. I said "now I have all caches enabled". |
@pantaoran Thank you for confirmation. As we see in the admin pf Magento 2.0.7 built-in caching is not recommended for Production Use(check the image below). There are two parts to this issue ::
Temporary Solution :: Stop using Magento inbuilt FPC and use Varnish instead. And the above code given by me will allow us to resolve the minicart issue temporarily. |
@pantaoran @sengaigibon For me, everything working fine after I enable FPC. I know its not recommended to use in Dev mode, but that is the solution for now. For your mincart issue, I recommend to check any broken layout issue in related XML files in system log. Sometimes even if everything is right, it can make stop things working properly. This would be the case if your working on custom theme not on standard luma theme. @100php Not sure, but in your temporary solution, should we need to add customer section also? |
@sky4git this is totally dependent on your environment and requirement. We needed on session messages and cart(minicart) you can add other sections also. This will load all these section on every action ex. pageload, add to cart, remove from cart etc... |
Updating my status here... It's still weird that in product overview page and product detail page, the session file is empty for the object class Anyway, so far I'm not experiencing this bug anymore... until further notice! |
We will close this issue as not updated more than 2 weeks if this issue still reproducible please feel free to create the new one. |
@sevos1984 I was able to work around the issue by modifying several core files. This is a hackish workaround which is not a real solution. If I remove those modifications then the issue is definitely still reproducible. I feel that the solution would need to come in form of a patch or a new release, and this issue should not be closed yet. |
+1 |
Magento Dev, I have the issue - After login, the name do not get set in the welcome string, the cart shows no items and we have no clue what is causing this. We are live on production and is causing us a lot of pain because of this. Please get this fixed and get me a workaround on this asap. Appreciate your help. |
@apurv-anand this ticket is closed. Per the last comment, can you open a new ticket that has full information in terms of version, system info, and steps so we can reproduce? |
This issue is closed without anyone ack that issue is indeed resolved. Everyone is trying to have a workaround and somehow make things work. I have opened a new ticket anyway. |
@apurv-anand correct--closed has several possible resolutions. We can close an issue because it is resolved or close an issue because it is not an issue at all. One other common source is when we do not have enough info to reproduce a reported issue. When this happens we ask for updates to the ticket and IF we receive no updates to help reproduce we will close the issue. If you look above that is what happened here when the original reporter did not provide details needed so the issue report was closed. |
For me @100php 's solution worked. Customer name was not loading for me in top menu. So I added these lines in my JS file: and it started working :) |
Fixed issues: - MAGETWO-90469: Added posibility to use captcha on share wishlist page - MAGETWO-88651: Wrong swatches behavior - MAGETWO-92727: Fixed wrong admin notifications behavior - MAGETWO-95401: Fixed incorrect flow of send-friend feature - MAGETWO-95440: Fixed incorrect sitemap request flow
I'm getting a weird behavior using Magento 2.0.2, it's described here as steps:
I'm working on customize Magento for specific needs, I added a field to customer_entity table, 'mobile' field which has the same attributes as 'email' field. I disabled email as requiered field in the database. I added three custom fields stored in customer_entity_varchar. I had preferences of many files of Magento/Customer module. Even if I disable all my modules, rollback all my commits, clearing cache, var/generation, var/session and puc/static/frontend/*, I'm still getting this behavior. I have two instances, one running in production mode and one as developer, both has the same behavior.
I'm using Opera, Firefox and Chrome for the tests, clearing the browser history and cache makes no difference.
Also, I get this messages in the system.log file:
[2016-02-29 07:05:45] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_2c7461af04bb11fe209659d7147d2c579: Please correct the XML data and try again. [] []
[2016-02-29 07:05:45] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_20a98983867a1770682b48d9a0ad63441: Please correct the XML data and try again. [] []
[2016-02-29 07:05:45] main.CRITICAL: Broken reference: the 'catalog.compare.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-02-29 07:05:45] main.CRITICAL: Broken reference: the 'sale.reorder.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-02-29 07:05:45] main.CRITICAL: Broken reference: the 'wishlist_sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-02-29 07:05:45] main.CRITICAL: Broken reference: the 'paypal.partner.right.logo' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-02-29 07:05:45] main.CRITICAL: Broken reference: the 'bml.right.logo' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-02-29 07:05:45] main.CRITICAL: Broken reference: the 'store.settings.currency' tries to reorder itself towards 'store_language', but their parents are different: 'store.settings' and 'header.panel' respectively. [] []
[2016-02-29 07:05:45] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_26f1b068ec7ccf4878f9284dd1137afd1: Please correct the XML data and try again. [] []
Sometimes, for an unknown reason the error disappear and the users can login and go to checkout normally. But this error is getting more persistent since 5 days ago.
Any advice to fix it? Thank you so much!
EDIT:
I must add something I read from a different issue: I also see the red/orange square next to the cart icon but empty, before and after login, only shows an amount after add something to the cart and adds this new item to those added in previous sessions.
UPDATE:
After step (5) take place, every access to magento site (e.g. in the browser, if I close the tab and reopen it from index.php or any other section of the store) is rendering correctly the customer name on top bar and items in the cart.
The text was updated successfully, but these errors were encountered: