ostark / craft-async-queue

Async Queue Handler for Craft 3 and 4
MIT License
93 stars 7 forks source link

Async Queue breaks Entry auto-save in Craft 3.7.21 #48

Closed MattWilcox closed 2 years ago

MattWilcox commented 2 years ago

Tracked this (very weird) issue down to something with this plugin and some sort of change related to Symphony "Process"?

Since running a composer update going from Craft 3.7.19.1 to Craft 3.7.21, when editing any Entry there is now an error (screenshot attached) - until AsyncQueue is disabled; when things begin to work properly again.

Attached is a web.log of the output of this error when it happens. Andrew Welch managed to track it down as failing on this bit of code in the /cms/vendor/symphony/process/Process.php file

        $envPairs = [];
        foreach ($env as $k => $v) {
            if (false !== $v) {
                $envPairs[] = $k.'='.$v;
            }
        }
Screenshot 2021-11-23 at 14 59 15

web.log.txt

stevecomrie commented 2 years ago

I'm experiencing the same issue.

I have two sites on Craft 3.7.21, both with Async Queue, one is working and one is failing.

Screenshot from 2021-11-23 12-32-51

The site that's working has symfony/process 5.3.7 installed, the one that's failing is using 5.3.11

Looks like about 19 hours ago, a change was made to symfony/process right at the spot where my error is occuring.

https://github.com/symfony/process/commit/c2098705326addae6e6742151dfade47ac71da1b#diff-a82f1f0b74256d93193ad7436778b39972f484e9286f70f203ef5b2aab052bc7

MattWilcox commented 2 years ago

I can confirm that I have a project on Craft 3.7.21 which works and the composer.lock for that one is using symphony/process 5.3.7

"name": "symfony/process",
            "version": "v5.3.7",
            "source": {
                "type": "git",
                "url": "https://github.com/symfony/process.git",
                "reference": "38f26c7d6ed535217ea393e05634cb0b244a1967"
            },

and the one that is broken with Craft 3.7.21 is locked at symphony/process 5.3.11

"name": "symfony/process",
            "version": "v5.3.11",
            "source": {
                "type": "git",
                "url": "https://github.com/symfony/process.git",
                "reference": "6c99204de85d04ca17f16c466fc61896960b0636"
            },
MattWilcox commented 2 years ago

This looks like a Symphony bug which they are addressing; just something in AsyncQueue that was exposing (but not causing) the issue.

https://github.com/symfony/symfony/issues/44197

ostark commented 2 years ago

Thanks for debugging this!

ostark commented 2 years ago

Symfony/Process 4.4.35 and 5.3.12 should work https://github.com/symfony/symfony/pull/44208

Check: composer info Symfony/Process | grep version Update: composer u Symfony/Process

ostark commented 2 years ago

I'll keep the ticket open for a few days even if I consider this solved.

stevecomrie commented 2 years ago

Symfony/Process 4.4.35 and 5.3.12 should work symfony/symfony#44208

Check: composer info Symfony/Process | grep version Update: composer u Symfony/Process

Confirmed this worked for me to force update my symfony/process version and re-install Async Queue without an issue.

MattWilcox commented 2 years ago

Also confirming that a forced update to Symphony resolves this issue for me too. Nice work all!