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

Fix for blank lists on upgrade from 7.1.15 ("400 Error: Header too large" or "Cannot read properties of undefined (reading 'cookieExpire')") #16136

Closed
snipe opened this issue Jan 27, 2025 · 0 comments

Comments

@snipe
Copy link
Owner

snipe commented Jan 27, 2025

We've been seeing this one a lot, so I'm pinning this.

This will address errors like 400 Error: Header too large, or in your browser console Cannot read properties of undefined (reading 'cookieExpire') TypeError: Cannot read properties of undefined (reading 'cookieExpire')

PLEASE remember to search existing issues and read the release notes. It literally tells you exactly what to do (and it's been the documentation for years in both setup and common issues.)

Per the release notes:

Note

If you end up seeing some blank table lists, do the following:

  • Clear your cookies
  • In your .env change BS_TABLE_STORAGE=cookieStorage to BS_TABLE_STORAGE=localStorage.
  • Clear your config cache (if you use it): php artisan config:clear

You can confirm that this fix was accepted by the system by going to Admin Settings and scrolling down to the summary at the bottom of the page.

Image

We're encouraging everyone to switch to localStorage for that value, as folks with a lot of custom fields, etc can end up stuffing the browser cookie full and getting errors, whereas localStorage can hold a lot more info. If for some reason you wish to stick with cookies instead of local storage, you can check to make sure you have a value for BS_TABLE_STORAGE in your .env.

This generally happens with systems that have a very large number of custom fields. The BS_TABLE_STORAGE env var determines whether it's cookies or local storage that holds your sorting, pagination, search, etc preferences within the table.

The issue is caused because the listing pages use a browser cookie to store your table preferences - what columns you have shown/hidden, search input on list pages, etc - and if you have quite a lot of custom fields, that cookie can get too large and the browser won't handle it well. (This is a browser limitation, not a limitation in Snipe-IT.)

You will lose your last stored column/table preferences, but once you've selected them again, you should not have any issues, since that information will no longer be stored in a cookie, but instead in your browser's local storage, which has a much higher data capacity. (It can often speed things up quite a bit as well.)

Because this is a browser limitation (client-side) and not a server-side fix, we cannot build that into the upgrade script to handle it for you automatically.

@snipe snipe pinned this issue Jan 27, 2025
Repository owner deleted a comment from welcome bot Jan 27, 2025
@snipe snipe closed this as completed Jan 27, 2025
@snipe snipe changed the title Fix for Blank lists on upgrade from 7.1.15 to 7.1.16 (400 Error: Header too large) Fix for blank lists on upgrade from 7.1.15 to 7.1.16 (400 Error: Header too large) Jan 27, 2025
@snipe snipe changed the title Fix for blank lists on upgrade from 7.1.15 to 7.1.16 (400 Error: Header too large) Fix for blank lists on upgrade from 7.1.15 to 7.1.16 (400 Error: Header too large or annot read properties of undefined (reading 'cookieExpire')) Jan 27, 2025
@snipe snipe changed the title Fix for blank lists on upgrade from 7.1.15 to 7.1.16 (400 Error: Header too large or annot read properties of undefined (reading 'cookieExpire')) Fix for blank lists on upgrade from 7.1.15 to 7.1.16 ("400 Error: Header too large" or "Cannot read properties of undefined (reading 'cookieExpire')") Jan 27, 2025
@snipe snipe changed the title Fix for blank lists on upgrade from 7.1.15 to 7.1.16 ("400 Error: Header too large" or "Cannot read properties of undefined (reading 'cookieExpire')") Fix for blank lists on upgrade from 7.1.15 ("400 Error: Header too large" or "Cannot read properties of undefined (reading 'cookieExpire')") Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant