fusio icon indicating copy to clipboard operation
fusio copied to clipboard

Subscription endpoint for system event is not executed

Open GNazar opened this issue 2 years ago • 2 comments

Steps:

  1. Configure system events like it described here https://groups.google.com/g/fusio/c/W4o9kPJceZY
  2. Create subscription for fusio.operation.create, as endpoint specify bean created at https://mockbin.io/
  3. Go to operation and create new operation

Expected: Create event is described in Subscription section Event payload logged at mockbin

Got: Create event is described in Subscription section, status pending. No record at mockbin. Error in logs:

PHP Fatal error:  Uncaught Error: Typed property PSX\Record\Record::$properties must not be accessed before initialization in /var/www/html/fusio/vendor/psx/record/src/Record.php:90
Stack trace:
#0 /var/www/html/fusio/vendor/psx/record/src/Record.php(242): PSX\Record\Record->getAll()
#1 [internal function]: PSX\Record\Record->__serialize()
#2 /var/www/html/fusio/vendor/symfony/messenger/Transport/Serialization/PhpSerializer.php(61): serialize()
#3 /var/www/html/fusio/vendor/symfony/doctrine-messenger/Transport/DoctrineSender.php(39): Symfony\Component\Messenger\Transport\Serialization\PhpSerializer->encode()
#4 /var/www/html/fusio/vendor/symfony/doctrine-messenger/Transport/DoctrineTransport.php(72): Symfony\Component\Messenger\Bridge\Doctrine\Transport\DoctrineSender->send()
#5 /var/www/html/fusio/vendor/symfony/messenger/EventListener/SendFailedMessageForRetryListener.php(81): 

GNazar avatar Jan 18 '24 07:01 GNazar

Hi @GNazar ok this looks like it is a problem if you put a PSX\Record\Record instance in the queue. I have just released a new version v3.0.6 of https://github.com/apioo/psx-record which should fix this problem, if its possible try to run composer update psx/record to install the latest version

chriskapp avatar Jan 18 '24 20:01 chriskapp

Cool! Thank you!

Will try that. I there any plans to include that fix into docker image?

GNazar avatar Jan 19 '24 07:01 GNazar