Skip to content

Combinations of middleware series with "app.all" is broken since 4.18.0 #6579

Description

@YuliaNormanHarambam

looks like #4913 is not fixed in 4.18.2
this is part of my code:

app.use(middleware.a);

app.get('/*', getter.a);

app.post('/*', poster.a);

app.use(middleware.b);

app.use('/somepath/otherpath',
  middleware.c,
  middleware.d,
  middleware.e);

app.get('/*', getter.b);

app.all(
  '/unicorn',
  poster.b,
  poster.c,
  poster.d
);

POST /unicorn is not hitting app.all() but will work if changed to app.post()

what am I missing?

Activity

  1. YuliaNormanHarambam commented on Jun 17, 2025

    @YuliaNormanHarambam
    Author

    after short investigation, if I change the max sync stack to 1000, it works with my code
    (

    if (++sync > 100) {

    if (++sync > 100) {
    )

    we have many app.all() routes in our code and this limit is not enough in our case

  2. changed the title [-]issue #4913 is not fixed in 4.18.2[/-] [+]Combinations of middleware series with "app.all" is broken since 4.18.0[/+] on Jun 22, 2025
  3. bjohansebas commented on Jul 12, 2025

    @bjohansebas
    Member

    I can't reproduce your issue with the limited information you provided. Could you create a minimal reproducible example to help us? There are tests for the problem you're describing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions