Dispatch fails with "Bad credentials" for all projects

Open Beginner friendly
#3,119 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
60/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
github-actions, php
Domain
ci-cd, tooling

Research direction

Start from the Symfony console command that implements dispatch:files in the dev-kit source and find the per-project loop that prints the [ERROR] Failed with message: line inside its catch block. That handler currently swallows the exception; make it record the failure and have the command return a non-zero exit code after the loop, then run the command's existing test to confirm the failure path. Note the other half of the report — renewing OAUTH_TOKEN_GITHUB / DEV_KIT_TOKEN — is a maintainer/secret change, not something a contributor can do, so scope your work to the exit-code fix. Done means a failing project makes the dispatch:files step go red.

Written by the indexing model from the issue text.

Description

The scheduled "Dispatch files and branches protection" workflow is green, but the
dispatch:files step fails for every project with:

doctrine-mongodb-admin-bundle
-----------------------------
 [ERROR] Failed with message: Bad credentials

The run and the step are green, the error is only visible inside the
"Dispatch files" step log. The same error appears for all 16 projects in the
latest run:
https://github.com/sonata-project/dev-kit/actions/runs/43730643908/job/132862082527#step:7:50

It looks like the GitHub token used by the workflow (OAUTH_TOKEN_GITHUB /
DEV_KIT_TOKEN) has expired or been revoked. The error is caught by the
command, so the job still succeeds and the problem goes unnoticed.

Impact:

  • No "DevKit updates" PR has been opened in any sonata-project repository
    since 2026-05-03.
  • Template fixes are not being propagated, e.g. #3101 (db46efb, removal of
    PHPUnitSetList::PHPUNIT_100). As a consequence, the Rector job fails on the
    nightly QA of the bundles, since that constant no longer exists in Rector 2.x
    (e.g. SonataDoctrineMongoDBAdminBundle 4.x).

Suggestions:

  • Renew the token secret(s).
  • Make dispatch:files return a non-zero exit code when a project fails, so
    the workflow turns red next time.
Dominant language
PHP
Stars
42
Forks
40
Avg merge
28m
Merged PRs (30d)
16

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sonata-project/dev-kit

All issues in sonata-project/dev-kit

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.