eveseat / seat

🌀✳️ SeAT: A Simple, EVE Online API Tool and Corporation Manager

Home Page:https://eveseat.github.io/docs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Discord slack notifications stopped working

muzixa opened this issue · comments

commented

Hi. Few month ago a lot of slack notifications stopped working in Discord (corporation leave, squad change, user registration etc.)
Calendar slack notifications works fine.

Error log:

GuzzleHttp\Exception\ClientException: Client error: `POST https://discord.com/api/webhooks/993242738948587640/taxCVGwvgttnMmQpwCNb6BlDucNojgsyaPBvjOh88gJOnvvCJYC5LStVYeLYrgprcvcW/slack` resulted in a `400 Bad Request` response:
--
{"attachments": ["0"]}
in /var/www/seat/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113

Notifications setup:
image

image

Versions:

| Vendor    | Package Name           | Installed Version        |
| --------- | ---------------------- | ------------------------ |
| eveseat   | api                    | 4.8.0                    |
| eveseat   | console                | 4.8.0                    |
| eveseat   | eveapi                 | 4.16.1                   |
| eveseat   | notifications          | 4.3.1                    |
| eveseat   | services               | 4.2.0                    |
| eveseat   | web                    | 4.18.2                   |
| cryptaeve | seat-squad-sync        | 4.0.2                    |
| cryptaeve | seat-strict            | 0.1.4                    |
| denngarr  | seat-fitting           | 4.0.5                    |
| denngarr  | seat-srp               | 4.3.0                    |
| kassie    | calendar               | 4.0.6                    |
| warlof    | seat-connector         | 2.3.1                    |
| warlof    | seat-discord-connector | 5.1.1                    |
| ccp       | eve_online_sde         | sde-20220628-TRANQUILITY |

please remove the webhook url. It allows everyone to send messages on your discord

besides that, i think you only provided the top level of the stack trace. Can you include the full stack trace?

commented

please remove the webhook url. It allows everyone to send messages on your discord

I know that and already deleted webhook in discord, it's was just test webhook.

besides that, i think you only provided the top level of the stack trace. Can you include the full stack trace?

Sure:

GuzzleHttp\Exception\ClientException: Client error: `POST https://discord.com/api/webhooks/993242738948587640/taxCVGwvgttnMmQpwCNb6BlDucNojgsyaPBvjOh88gJOnvvCJYC5LStVYeLYrgprcvcW/slack` resulted in a `400 Bad Request` response:
--
{"attachments": ["0"]}
in /var/www/seat/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113
Stack trace:
#0 /var/www/seat/vendor/guzzlehttp/guzzle/src/Middleware.php(65): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response))
#1 /var/www/seat/vendor/guzzlehttp/promises/src/Promise.php(204): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response))
#2 /var/www/seat/vendor/guzzlehttp/promises/src/Promise.php(153): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), NULL)
#3 /var/www/seat/vendor/guzzlehttp/promises/src/TaskQueue.php(48): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}()
#4 /var/www/seat/vendor/guzzlehttp/promises/src/Promise.php(248): GuzzleHttp\Promise\TaskQueue->run(true)
#5 /var/www/seat/vendor/guzzlehttp/promises/src/Promise.php(224): GuzzleHttp\Promise\Promise->invokeWaitFn()
#6 /var/www/seat/vendor/guzzlehttp/promises/src/Promise.php(269): GuzzleHttp\Promise\Promise->waitIfPending()
#7 /var/www/seat/vendor/guzzlehttp/promises/src/Promise.php(226): GuzzleHttp\Promise\Promise->invokeWaitList()
#8 /var/www/seat/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending()
#9 /var/www/seat/vendor/guzzlehttp/guzzle/src/Client.php(182): GuzzleHttp\Promise\Promise->wait()
#10 /var/www/seat/vendor/guzzlehttp/guzzle/src/Client.php(95): GuzzleHttp\Client->request('post', 'https://discord...', Array)
#11 /var/www/seat/vendor/laravel/slack-notification-channel/src/Channels/SlackWebhookChannel.php(45): GuzzleHttp\Client->__call('post', Array)
#12 /var/www/seat/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php(148): Illuminate\Notifications\Channels\SlackWebhookChannel->send(Object(Illuminate\Notifications\AnonymousNotifiable), Object(Seat\Notifications\Notifications\Seat\Slack\SquadMemberRemovedNotification))
#13 /var/www/seat/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php(106): Illuminate\Notifications\NotificationSender->sendToNotifiable(Object(Illuminate\Notifications\AnonymousNotifiable), '4fb66beb-6ea2-4...', Object(Seat\Notifications\Notifications\Seat\Slack\SquadMemberRemovedNotification), 'slack')
#14 /var/www/seat/vendor/laravel/framework/src/Illuminate/Support/Traits/Localizable.php(19): Illuminate\Notifications\NotificationSender->Illuminate\Notifications\{closure}()
#15 /var/www/seat/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php(109): Illuminate\Notifications\NotificationSender->withLocale(NULL, Object(Closure))
#16 /var/www/seat/vendor/laravel/framework/src/Illuminate/Notifications/ChannelManager.php(54): Illuminate\Notifications\NotificationSender->sendNow(Array, Object(Seat\Notifications\Notifications\Seat\Slack\SquadMemberRemovedNotification), Array)
#17 /var/www/seat/vendor/laravel/framework/src/Illuminate/Notifications/SendQueuedNotifications.php(74): Illuminate\Notifications\ChannelManager->sendNow(Object(Illuminate\Notifications\AnonymousNotifiable), Object(Seat\Notifications\Notifications\Seat\Slack\SquadMemberRemovedNotification), Array)
#18 /var/www/seat/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\Notifications\SendQueuedNotifications->handle(Object(Illuminate\Notifications\ChannelManager))
#19 /var/www/seat/vendor/laravel/framework/src/Illuminate/Container/Util.php(37): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#20 /var/www/seat/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#21 /var/www/seat/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#22 /var/www/seat/vendor/laravel/framework/src/Illuminate/Container/Container.php(590): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#23 /var/www/seat/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(94): Illuminate\Container\Container->call(Array)
#24 /var/www/seat/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}(Object(Illuminate\Notifications\SendQueuedNotifications))
#25 /var/www/seat/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Notifications\SendQueuedNotifications))
#26 /var/www/seat/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(98): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#27 /var/www/seat/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(83): Illuminate\Bus\Dispatcher->dispatchNow(Object(Illuminate\Notifications\SendQueuedNotifications), false)
#28 /var/www/seat/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\Queue\CallQueuedHandler->Illuminate\Queue\{closure}(Object(Illuminate\Notifications\SendQueuedNotifications))
#29 /var/www/seat/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Notifications\SendQueuedNotifications))
#30 /var/www/seat/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(85): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#31 /var/www/seat/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(59): Illuminate\Queue\CallQueuedHandler->dispatchThroughMiddleware(Object(Illuminate\Queue\Jobs\RedisJob), Object(Illuminate\Notifications\SendQueuedNotifications))
#32 /var/www/seat/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(88): Illuminate\Queue\CallQueuedHandler->call(Object(Illuminate\Queue\Jobs\RedisJob), Array)
#33 /var/www/seat/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(368): Illuminate\Queue\Jobs\Job->fire()
#34 /var/www/seat/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(314): Illuminate\Queue\Worker->process('redis', Object(Illuminate\Queue\Jobs\RedisJob), Object(Illuminate\Queue\WorkerOptions))
#35 /var/www/seat/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(134): Illuminate\Queue\Worker->runJob(Object(Illuminate\Queue\Jobs\RedisJob), 'redis', Object(Illuminate\Queue\WorkerOptions))
#36 /var/www/seat/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(112): Illuminate\Queue\Worker->daemon('redis', 'notifications', Object(Illuminate\Queue\WorkerOptions))
#37 /var/www/seat/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(96): Illuminate\Queue\Console\WorkCommand->runWorker('redis', 'notifications')
#38 /var/www/seat/vendor/laravel/horizon/src/Console/WorkCommand.php(46): Illuminate\Queue\Console\WorkCommand->handle()
#39 /var/www/seat/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Laravel\Horizon\Console\WorkCommand->handle()
#40 /var/www/seat/vendor/laravel/framework/src/Illuminate/Container/Util.php(37): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#41 /var/www/seat/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#42 /var/www/seat/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#43 /var/www/seat/vendor/laravel/framework/src/Illuminate/Container/Container.php(590): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#44 /var/www/seat/vendor/laravel/framework/src/Illuminate/Console/Command.php(134): Illuminate\Container\Container->call(Array)
#45 /var/www/seat/vendor/symfony/console/Command/Command.php(255): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#46 /var/www/seat/vendor/laravel/framework/src/Illuminate/Console/Command.php(121): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#47 /var/www/seat/vendor/symfony/console/Application.php(1009): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#48 /var/www/seat/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(Laravel\Horizon\Console\WorkCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#49 /var/www/seat/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#50 /var/www/seat/vendor/laravel/framework/src/Illuminate/Console/Application.php(93): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#51 /var/www/seat/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(131): Illuminate\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#52 /var/www/seat/artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#53 {main}
Data
{
notifiables: {
routes: {
slack: "https://discord.com/api/webhooks/993242738948587640/taxCVGwvgttnMmQpwCNb6BlDucNojgsyaPBvjOh88gJOnvvCJYC5LStVYeLYrgprcvcW/slack"
}
},
notification: {
squad: {
class: "Seat\Web\Models\Squads\Squad",
id: 18,
relations: [
],
connection: "mysql"
},
user: {
class: "Seat\Web\Models\User",
id: 472,
relations: [
],
connection: "mysql"
},
queue: "notifications",
id: "5b286add-e764-4e5d-bcbe-bedbd016cbb5",
locale: null,
job: null,
connection: null,
chainConnection: null,
chainQueue: null,
delay: null,
middleware: [
],
chained: [
]
},
channels: [
"slack"
],
tries: null,
timeout: null,
job: null,
connection: null,
queue: "notifications",
chainConnection: null,
chainQueue: null,
delay: null,
middleware: [
],
chained: [
]
}

commented

Ok, im tried same notifications in slack app (without /slack) and it works fine, but discord webhooks still don't work.
Some people say this because discord blocking some incorrect data, have no idea how to check it.

Also for some reason the link to squad (in slack) is broken and looks like this:
https://squads/18
with no domain name

Also for some reason the link to squad (in slack) is broken and looks like this:
https://squads/18
with no domain name

Did you set your domain next to APP_URL in your .env file ?

Is there anybody else experimenting such issues with squads notifications ? Otherwise, high chance it's tied to misconfigured from that app_url value which Discord is filtering and not Slack

commented

Did you set your domain next to APP_URL in your .env file ?

Yesterday changed:
APP_URL=https://${SEAT_SUBDOMAIN}.${TRAEFIK_DOMAIN}
to
APP_URL=my.domain.name

That fixed both problems (with discrord notifications too), strange, all was working fine with variables few month ago.
Can be closed.