Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

Error "User is not set"

Started by Hugh Barnes 3 years ago · 5 replies · 404 views
3 years ago

I have occasionally seen this error on some installations when performing command-line operations like cache-clear recently. I don't really see a pattern, unfortunately, and can't find anything in the Grav repo. It happens both on installations with Login/Admin plugins and without.

Here's what I see in the logs:

2023-08-01 04:28:40 [CRITICAL] User is not set.

and here is the output to bin/grav cache-clear:

SHELL
In AbstractTransportFactory.php line 46:                                                                                                                                

  User is not set.                                                                                                                                                      

cache [--invalidate] [--purge] [--all] [--assets-only] [--images-only] [--cache-only] [--tmp-only] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [--env [ENV]] [--lang [LANG]] [--] <command>

AbstractTransportFactory seems to be a Symfony mailer class but that has so far not helped me track this down. I have recently started using the new mail plugins. That could be a pattern. The mailers work.

The sites serve content just fine.

I'll appreciate any clues. Please let me know if I can provide any more information.

3 years ago

@hughbris, I can only find a reference to 'User is not set' and class AbstractTransportFactory inside directory /vendor of the Email plugin.

But you'll probably have found that out already...

And I have no idea why $ bin/grav cache would run any code from the Email plugin.

3 years ago

The Email Plugin is currently under development or at least was updated recently so chances are that a new issue in the GitHub repository will get noted by it's developer.

3 years ago

I don't feel like it's convincing enough that this plugin is the source of the problem. I would like to have more confidence before submitting an issue.

[Edit: This was in response to @bleutzinn's post immediately before. Not sure why but the 'system' user removed the quote context ... "something something whole post"]

last edited 08/01/23 by Hugh Barnes
3 years ago

@pamtbaau:
But you’ll probably have found that out already…

You'd think! I didn't find the "User is not set" for some reason, I think because I got distracted by the results of searching for "AbstractTransportFactory".

@pamtbaau:
And I have no idea why $ bin/grav cache would run any code from the Email plugin.

My ignorant guess has been that this comes up from some sort of system bootstrapping before the cache is cleared. Pretty much spitballing though.

Having typed that out, I realised I should try uninstalling the email plugins. Yes, the error went away! Reinstalled them and it came back. So I guess I'll dig a little further in the morning here and think about putting together a coherent issue. Thank you @pamtbaau for indirectly getting me to try that.

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
2 50 6 hours ago
Support · by Anna, 2 days ago
2 58 9 hours ago
Support · by Justin Young, 10 hours ago
1 28 10 hours ago
Support · by Duc , 1 week ago
2 63 5 days ago
Support · by Colin Hume, 1 week ago
2 53 5 days ago