Skip to content

[2.4.8] No callbacks found for cron job catalog_product_alert #39800

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 of 5 tasks
gwharton opened this issue Apr 10, 2025 · 11 comments
Closed
1 of 5 tasks

[2.4.8] No callbacks found for cron job catalog_product_alert #39800

gwharton opened this issue Apr 10, 2025 · 11 comments
Assignees
Labels
Area: Product Component: Cron Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: done Progress: PR Created Indicates that Pull Request has been created to fix issue Reported on 2.4.8 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch

Comments

@gwharton
Copy link
Contributor

gwharton commented Apr 10, 2025

Preconditions and environment

  • 2.4.8

Steps to reproduce

  • Deploy 2.4.8 and setup cron jobs
  • Go to Store -> Configuration -> Catalog -> Catalog -> Product Alerts Run Settings and set a schedule to run at some time about 20 minutes in the future.
  • Verify in core_config_data table that the entry "crontab/default/jobs/catalog_product_alert/schedule/cron_expr" now exists
  • Wait until the allotted run time.

Expected result

  • No errors are reported when running cronjob

Actual result

Magento_Cron.CRITICAL: Exception: No callbacks found for cron job catalog_product_alert in /home/ubuntu/production/vendor/magento/module-cron/Observer/ProcessCronQueueObserver.php:351 Stack trace: #0 /home/ubuntu/production/vendor/magento/module-cron/Observer/ProcessCronQueueObserver.php(906): Magento\Cron\Observer\ProcessCronQueueObserver->_runJob() #1 /home/ubuntu/production/vendor/magento/module-cron/Observer/ProcessCronQueueObserver.php(867): Magento\Cron\Observer\ProcessCronQueueObserver->tryRunJob() #2 /home/ubuntu/production/vendor/magento/module-cron/Observer/ProcessCronQueueObserver.php(299): Magento\Cron\Observer\ProcessCronQueueObserver->processPendingJobs() #3 /home/ubuntu/production/vendor/magento/framework/Event/Invoker/InvokerDefault.php(88): Magento\Cron\Observer\ProcessCronQueueObserver->execute() #4 /home/ubuntu/production/vendor/magento/framework/Event/Invoker/InvokerDefault.php(74): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod() #5 /home/ubuntu/production/vendor/magento/framework/Event/Manager.php(65): Magento\Framework\Event\Invoker\InvokerDefault->dispatch() #6 /home/ubuntu/production/generated/code/Magento/Framework/Event/Manager/Proxy.php(105): Magento\Framework\Event\Manager->dispatch() #7 /home/ubuntu/production/vendor/magento/framework/App/Cron.php(86): Magento\Framework\Event\Manager\Proxy->dispatch() #8 /home/ubuntu/production/vendor/magento/module-cron/Console/Command/CronCommand.php(142): Magento\Framework\App\Cron->launch() #9 /home/ubuntu/production/vendor/symfony/console/Command/Command.php(326): Magento\Cron\Console\Command\CronCommand->execute() #10 /home/ubuntu/production/vendor/symfony/console/Application.php(1078): Symfony\Component\Console\Command\Command->run() #11 /home/ubuntu/production/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand() #12 /home/ubuntu/production/vendor/magento/framework/Console/Cli.php(122): Symfony\Component\Console\Application->doRun() #13 /home/ubuntu/production/vendor/symfony/console/Application.php(175): Magento\Framework\Console\Cli->doRun() #14 /home/ubuntu/production/bin/magento(23): Symfony\Component\Console\Application->run() #15 {main} [] []

Additional information

This is new in 2.4.8

A quick look at the code and it would appear that the cron job name has been changed to product_alert in 2.4.8 but the path to the cronjob config has not been changed to match the new job name.

<job name="product_alert" instance="Magento\ProductAlert\Model\Observer" method="process">
<config_path>crontab/default/jobs/catalog_product_alert/schedule/cron_expr</config_path>
</job>

Debugging the generateSchedules code shows that an extra job is added to the jobs list with incomplete contents, with the name of "catalog_product_alert" which is causing the error.

Image

The correct "product_alert" jobs are scheduled and run correctly, so this is just an annoyance more than anything having a failed erroneously scheduled job run every day.

Release note

erroneous "catalog_product_alert" cron jobs are no longer scheduled after "product_alert" job name change.

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Copy link

m2-assistant bot commented Apr 10, 2025

Hi @gwharton. Thank you for your report.
To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce.


Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
🕙 You can find the schedule on the Magento Community Calendar page.
📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

@gwharton gwharton changed the title [2.4.8] Cron: No callbacks found for cron job catalog_product_alert [2.4.8] No callbacks found for cron job catalog_product_alert Apr 10, 2025
@gwharton gwharton reopened this Apr 12, 2025
@gwharton
Copy link
Contributor Author

Reopened and updated description following further diagnosis. It wasn't opcache.

@engcom-Bravo engcom-Bravo added the Reported on 2.4.8 Indicates original Magento version for the Issue report. label Apr 14, 2025
@github-project-automation github-project-automation bot moved this to Ready for Confirmation in Issue Confirmation and Triage Board Apr 21, 2025
@engcom-November engcom-November self-assigned this Apr 21, 2025
Copy link

m2-assistant bot commented Apr 21, 2025

Hi @engcom-November. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
  • 3. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
  • 4. Verify that the issue is reproducible on 2.4-develop branch
    Details- If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
  • 5. Add label Issue: Confirmed once verification is complete.
  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-November
Copy link
Contributor

Hello @gwharton ,

Thank you for your report and collaboration.

We attempted to reproduce the issue in the latest 2.4.8 instances, We are able to reproduce the issue. Please refer to the attached screenshot for details.

Image

Steps to Reproduce:

  • Deploy 2.4.8 and setup cron jobs
  • Go to Store -> Configuration -> Catalog -> Catalog -> Product Alerts Run Settings and set a schedule to run at some time about 20 minutes in the future.

Image

  • Verify in core_config_data table that the entry "crontab/default/jobs/catalog_product_alert/schedule/cron_expr" now exists
  • Wait until the allotted run time.

Note: This issue is not reproducable in 2.4-develop, please try from your end to reproduce this in 2.4-develop.

We followed the preconditions and steps as provided and encountered the issue. Therefore, we are marking this ticket as "Issue: Confirmed."

Thank you!

@engcom-November engcom-November added Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Area: Product Component: Cron Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Apr 23, 2025
@ct-prd-projects-boards-automation ct-prd-projects-boards-automation bot moved this from Ready for Confirmation to Confirmed in Issue Confirmation and Triage Board Apr 23, 2025
@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.adobe.com/browse/AC-14494 is successfully created for this GitHub issue.

Copy link

m2-assistant bot commented Apr 23, 2025

✅ Confirmed by @engcom-November. Thank you for verifying the issue.
Issue Available: @engcom-November, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@gwharton
Copy link
Contributor Author

Just to confirm, I see this issue on both 2.4.8 and 2.4-develop

2.4.8

Image

2.4-develop

Image

@engcom-Hotel engcom-Hotel added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Apr 29, 2025
@ct-prd-projects-boards-automation ct-prd-projects-boards-automation bot moved this to Ready for Development in High Priority Backlog Apr 29, 2025
@hostep
Copy link
Contributor

hostep commented May 2, 2025

Seeing this problem as well, I think this change should be reverted: 82f6a01 I really don't see how that change was needed based on the commit message. It makes not much sense.

Also, on Magento 2.4.8:

$ php n98-magerun2.phar sys:cron:list | grep alert
| catalog_product_alert                                     | default              | 3    | 0    | * | * | *  |
| product_alert                                             | default              | -    | -    | - | - | -  |


$ php n98-magerun2.phar sys:cron:run catalog_product_alert

In AbstractCronCommand.php line 257:

  No job config found!


sys:cron:run [<job>]

$ php n98-magerun2.phar sys:cron:run product_alert
Run Magento\ProductAlert\Model\Observer::process done

Note that the "new" product_alert job can be executed but has no crontab expression, which means it's not executed ever.
And that the "old" catalog_product_alert job can no longer be executed, but has a valid crontab expression, so this job fails every day now.

I also found this old thread that tried discussing this change as "probably" not a good idea, and it looks like we were right ...

@KrasnoshchokBohdan
Copy link
Contributor

@magento I am working on this

KrasnoshchokBohdan added a commit to KrasnoshchokBohdan/magento2 that referenced this issue May 2, 2025
@engcom-Bravo
Copy link
Contributor

Hi @gwharton,

Adobe Commerce Engineering team started working on this issue. We will reach out to you if we need more information and you will get notified once the issue is fixed. Please leave comments for any further questions.

Thank you!

@github-jira-sync-bot github-jira-sync-bot added Progress: PR Created Indicates that Pull Request has been created to fix issue Progress: done and removed Progress: dev in progress labels May 8, 2025
@engcom-Bravo
Copy link
Contributor

Hi @gwharton,

This issue has been resolved under the internal Jira ticket AC-14494 by the internal team. According to the ticket, the fix is targeted for release in version 2.4.9-alpha1.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Product Component: Cron Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: done Progress: PR Created Indicates that Pull Request has been created to fix issue Reported on 2.4.8 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Projects
Status: Ready for Development
7 participants