freescout-helpdesk / freescout

FreeScout — Free self-hosted help desk & shared mailbox (Zendesk / Help Scout alternative)
https://freescout.net
GNU Affero General Public License v3.0
2.67k stars 458 forks source link

Settings not saving all of a sudden? #3998

Closed aaversa closed 2 weeks ago

aaversa commented 3 weeks ago

I've been using Freescout for a few days but as of a few hours ago, a problem started occurring where whenever I try to save settings as an admin - for example, email fetch settings for a mailbox, or IMAP sending info for a mailbox - the page refreshes and all of the fields I filled out have reverted to default values. There were no errors.

I installed Freescout 2 or 3 days ago with whatever the latest version was at that time. I did update to 1.8.137 earlier today but it's not clear exactly when this problem started happening.

There is potentially one clue here. I installed phpMyAdmin earlier today, which worked fine... But when I try to log in to that now, I'm immediately getting an error:

"Failed to set session cookie. Maybe you are using HTTP instead of HTTPS to access phpMyAdmin."

Some kind of database problem, possibly? But then again, emails DO seem to be fetching correctly for my existing mailboxes so.. the database IS working...

I'm scratching my head here. Any help or pointers appreciated.

PHP version: 8.1 FreeScout version: 1.8.137 Database: MySQL version 8.0.36 Are you using CloudFlare: Yes

diogogpinto commented 3 weeks ago

Please check if you have any Logs (other than queue-logs and fetch-emails) under:

Manage > Logs > App Logs

If you do, can you share them here? At least the ones related with the saving process. Also, can you run the following command:

php artisan freescout:after-app-update

Maybe there was some issue while upgrading, due to permissions, file ownership or something. Also, try with another browser.

aaversa commented 3 weeks ago

I ran that command, if anything things are in an even more bizarre state.

The mailbox I added last night seemingly disappeared. When I tried adding it again (the "Create a Mailbox" page), I typed in the name & email, then hit Create Inbox... and was taken to the Mailboxes page, only to see the new mailbox was NOT there.

It sometimes appears in the Mailboxes dropdown. I know how bizarre that sounds. Like sometimes I reload a page, and the new mailbox is there, sometimes not.

When I hit "Check for Updates" on the system page, I immediately get an error: "Error occurred. Please check your internet connection and try again."

I've cleared the cache, no difference.

On the server, the main cron job is continuing to run once per minute. But in Freescout, it says that the fetch-emails last successful run was yesterday.

I manually fetched emails; the fetch page refreshed with no text indicating what happened. No emails were fetched. But then briefly, it looks like they HAD fetched.

When I check phpMyAdmin, I can find a conversation - say with user john@smith.com - that does NOT show when I look at the mailbox, but DOES show if I use Freescout's search function.

(Not being able to log into phpMyAdmin thing was a red herring, I just had the wrong login information for it.)

I'm at a loss. It seems like there is some serious issue with writing or caching, I don't know. This is a relatively fresh install.

EDIT: Ok, again this is inexplicable. Visiting my installation from any browser, even from a different computer or in incognito mode, shows the same 'static' view (without the new mailboxes or newly-fetched email). So it's almost like a whole-page cache is happening or something. That shouldn't be possible, right? Even if a user has never been there before, they should have to log in first?

diogogpinto commented 3 weeks ago

Please check if you did the Cloudflare setup correctly. If you have, try to deactivate it temporarily to make sure it isn't a Cloudflare issue.

If you have: can you share /storage/logs relevant contents?

freescout-helpdesk commented 2 weeks ago

Most likely the problem is in some server configuration or proxy. It needs to be investigated on your server by someone.