JhumanJ / OpnForm

Beautiful Open-Source Form Builder
https://opnform.com
GNU Affero General Public License v3.0
2.19k stars 289 forks source link

[Self Hosted] SMTP E-mail issues (valid cache path error) #594

Closed duplaja closed 2 weeks ago

duplaja commented 2 weeks ago

Describe the issue

I am deploying via Docker. I'm attempting to send emails via AWS SES, using SMTP. I'm unable to send emails, and am getting errors regarding "valid cache path"

Deployment Environment

Deployment Method

Steps Taken Describe the steps you've taken to deploy the application:

  1. Setup via docker, as described: https://docs.opnform.com/deployment/docker
  2. Nginx reverse proxy in front, for custom URL
  3. All tested appears to be working, apart from this and S3 buckets (OpenAI integration works, form creation, submission, Discord webhooks, etc)

Error Messages

api-worker-1  |   2024-10-17 03:49:28 App\Listeners\Forms\NotifyFormSubmission .. 10.30ms DONE
api-worker-1  |   2024-10-17 03:49:28 App\Notifications\Forms\FormSubmissionNotification  RUNNING
api-worker-1  |   2024-10-17 03:49:28 App\Notifications\Forms\FormSubmissionNotification  9.90ms FAIL
api-worker-1  | [2024-10-17 03:49:28] local.DEBUG: Un-handled Exception: Please provide a valid cache path. {"exception":"[object] (InvalidArgumentException(code: 0): Please provide a valid cache path. at /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/View/Compilers/Compiler.php:67)

-------------

api-worker-1  | [2024-10-17 04:36:02] local.ERROR: Please provide a valid cache path. {"exception":"[object] (InvalidArgumentException(code: 0): Please provide a valid cache path. at /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/View/Compilers/Compiler.php:67)
api-worker-1  | [stacktrace]
api-worker-1  | #0 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/View/ViewServiceProvider.php(97): Illuminate\\View\\Compilers\\Compiler->__construct(Object(Illuminate\\Filesystem\\Filesystem), false, '', true, 'php')
api-worker-1  | #1 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(931): Illuminate\\View\\ViewServiceProvider->Illuminate\\View\\{closure}(Object(Illuminate\\Foundation\\Application), Array)
api-worker-1  | #2 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(815): Illuminate\\Container\\Container->build(Object(Closure))
api-worker-1  | #3 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1046): Illuminate\\Container\\Container->resolve('blade.compiler', Array, true)
api-worker-1  | #4 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(751): Illuminate\\Foundation\\Application->resolve('blade.compiler', Array)
api-worker-1  | #5 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1028): Illuminate\\Container\\Container->make('blade.compiler', Array)
api-worker-1  | #6 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/View/ViewServiceProvider.php(168): Illuminate\\Foundation\\Application->make('blade.compiler')
api-worker-1  | #7 [internal function]: Illuminate\\View\\ViewServiceProvider->Illuminate\\View\\{closure}()
api-worker-1  | #8 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/View/Engines/EngineResolver.php(55): call_user_func(Object(Closure))
api-worker-1  | #9 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/View/Factory.php(326): Illuminate\\View\\Engines\\EngineResolver->resolve('blade')
api-worker-1  | #10 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/View/Factory.php(288): Illuminate\\View\\Factory->getEngineFromPath('/usr/share/ngin...')
api-worker-1  | #11 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/View/Factory.php(160): Illuminate\\View\\Factory->viewInstance('mail.form.confi...', '/usr/share/ngin...', Array)
api-worker-1  | #12 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Mail/Markdown.php(65): Illuminate\\View\\Factory->make('mail.form.confi...', Array)
api-worker-1  | #13 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Mail/Mailable.php(366): Illuminate\\Mail\\Markdown->render('mail.form.confi...', Array)
api-worker-1  | #14 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Collections/helpers.php(236): Illuminate\\Mail\\Mailable->Illuminate\\Mail\\{closure}(Array)
api-worker-1  | #15 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php(441): value(Object(Closure), Array)
api-worker-1  | #16 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php(420): Illuminate\\Mail\\Mailer->renderView(Object(Closure), Array)
api-worker-1  | #17 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php(313): Illuminate\\Mail\\Mailer->addContent(Object(Illuminate\\Mail\\Message), Object(Closure), Object(Closure), NULL, Array)
api-worker-1  | #18 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Mail/Mailable.php(205): Illuminate\\Mail\\Mailer->send(Object(Closure), Array, Object(Closure))
api-worker-1  | #19 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Support/Traits/Localizable.php(19): Illuminate\\Mail\\Mailable->Illuminate\\Mail\\{closure}()
api-worker-1  | #20 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Mail/Mailable.php(198): Illuminate\\Mail\\Mailable->withLocale(NULL, Object(Closure))
api-worker-1  | #21 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Mail/SendQueuedMailable.php(83): Illuminate\\Mail\\Mailable->send(Object(Illuminate\\Mail\\MailManager))
api-worker-1  | #22 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Mail\\SendQueuedMailable->handle(Object(Illuminate\\Mail\\MailManager))
api-worker-1  | #23 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(43): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
api-worker-1  | #24 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(95): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
api-worker-1  | #25 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
api-worker-1  | #26 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(690): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
api-worker-1  | #27 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(128): Illuminate\\Container\\Container->call(Array)
api-worker-1  | #28 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Bus\\Dispatcher->Illuminate\\Bus\\{closure}(Object(Illuminate\\Mail\\SendQueuedMailable))
api-worker-1  | #29 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Mail\\SendQueuedMailable))
api-worker-1  | #30 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(132): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
api-worker-1  | #31 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(124): Illuminate\\Bus\\Dispatcher->dispatchNow(Object(Illuminate\\Mail\\SendQueuedMailable), false)
api-worker-1  | #32 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Queue\\CallQueuedHandler->Illuminate\\Queue\\{closure}(Object(Illuminate\\Mail\\SendQueuedMailable))
api-worker-1  | #33 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Mail\\SendQueuedMailable))
api-worker-1  | #34 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(123): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
api-worker-1  | #35 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(71): Illuminate\\Queue\\CallQueuedHandler->dispatchThroughMiddleware(Object(Illuminate\\Queue\\Jobs\\RedisJob), Object(Illuminate\\Mail\\SendQueuedMailable))
api-worker-1  | #36 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(102): Illuminate\\Queue\\CallQueuedHandler->call(Object(Illuminate\\Queue\\Jobs\\RedisJob), Array)
api-worker-1  | #37 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(440): Illuminate\\Queue\\Jobs\\Job->fire()
api-worker-1  | #38 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(390): Illuminate\\Queue\\Worker->process('redis', Object(Illuminate\\Queue\\Jobs\\RedisJob), Object(Illuminate\\Queue\\WorkerOptions))
api-worker-1  | #39 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(177): Illuminate\\Queue\\Worker->runJob(Object(Illuminate\\Queue\\Jobs\\RedisJob), 'redis', Object(Illuminate\\Queue\\WorkerOptions))
api-worker-1  | #40 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(139): Illuminate\\Queue\\Worker->daemon('redis', 'default', Object(Illuminate\\Queue\\WorkerOptions))
api-worker-1  | #41 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(122): Illuminate\\Queue\\Console\\WorkCommand->runWorker('redis', 'default')
api-worker-1  | #42 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Queue\\Console\\WorkCommand->handle()
api-worker-1  | #43 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(43): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
api-worker-1  | #44 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(95): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
api-worker-1  | #45 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
api-worker-1  | #46 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(690): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
api-worker-1  | #47 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(213): Illuminate\\Container\\Container->call(Array)
api-worker-1  | #48 /usr/share/nginx/html/vendor/symfony/console/Command/Command.php(279): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
api-worker-1  | #49 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(182): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
api-worker-1  | #50 /usr/share/nginx/html/vendor/symfony/console/Application.php(1047): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
api-worker-1  | #51 /usr/share/nginx/html/vendor/symfony/console/Application.php(316): Symfony\\Component\\Console\\Application->doRunCommand(Object(Illuminate\\Queue\\Console\\WorkCommand), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
api-worker-1  | #52 /usr/share/nginx/html/vendor/symfony/console/Application.php(167): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
api-worker-1  | #53 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(197): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
api-worker-1  | #54 /usr/share/nginx/html/artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
api-worker-1  | #55 {main}
api-worker-1  | "} 

Configuration Files

CACHE_STORE=redis
CACHE_DRIVER=redis

QUEUE_CONNECTION=redis
SESSION_DRIVER=redis
SESSION_LIFETIME=120

MAIL_MAILER=smtp
MAIL_HOST="email-smtp.us-west-2.amazonaws.com"
MAIL_PORT=587
MAIL_USERNAME="AKIxxxxxxxxxxxxxxxxxxT"
MAIL_PASSWORD="BGxxxxxxxxxxxxxxxxxxxxxxxxxKL2ib"
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS="noreply@myurl.com"
MAIL_FROM_NAME="Form Response"

Logs To help us diagnose the issue, please provide the following logs:

Additional context I've tried both the notification, and the response. Have tried various combinations of things in quotes, and things not.

duplaja commented 2 weeks ago

Nevermind, my bad. It didn't like me making opnform_storage a bind mount.