Skip to content

v19.1 with SSR not building/responding in dev mode: The operation was aborted due to timeout #29400

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 task done
zip-fa opened this issue Jan 19, 2025 · 9 comments · Fixed by #29411
Closed
1 task done

Comments

@zip-fa
Copy link

zip-fa commented Jan 19, 2025

Command

build

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

19.0

Description

Hey. Updating v19.0.x app to v19.1.x breaks build with this error:

✘ [ERROR] An error occurred while extracting routes.

Routes extraction was aborted.
TimeoutError: The operation was aborted due to timeout

No routes, no code, no logic.
Minimal repro available here: https://github.com/zip-fa/19-1-endless-build

Switching from server config:

"server": "src/main.server.ts",
        "outputMode": "server",
        "ssr": {
          "entry": "src/server.ts"
        }

To static config:

"outputMode": "static"

immediately helps

Minimal Reproduction

nx build 19-1-endless-build

Exception or Error


Your Environment

ng version

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 19.1.2
Node: 22.13.0
Package Manager: npm 10.9.2
OS: darwin arm64

Angular: 19.1.1
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1901.2
@angular-devkit/build-angular   19.1.2
@angular-devkit/core            19.1.2
@angular-devkit/schematics      19.1.2
@angular/cli                    19.1.2
@angular/ssr                    19.1.2
@schematics/angular             19.1.2
rxjs                            7.8.1
typescript                      5.7.3
zone.js                         0.15.0

Anything else relevant?

No response

@zip-fa zip-fa changed the title Routes extraction was aborted: TimeoutError: The operation was aborted due to timeout v19.1 with SSR not building/responding in dev mode: The operation was aborted due to timeout Jan 19, 2025
@Releef
Copy link

Releef commented Jan 19, 2025

I have the same issue. Setting my node version to 20.11.1 seems to work for me. It could be worth trying out for yourself as a temporary fix.

@xidedix
Copy link

xidedix commented Jan 19, 2025

The same here. Setting outputMode: "static" doesn’t help either.

@SaeedDev94
Copy link

An error occurred while extracting routes.

Routes extraction was aborted.
TimeoutError: The operation was aborted due to timeout

Image

"@angular/cli": "^19.1.2"
"@angular/ssr": "^19.1.2"
"@angular/core": "^19.1.1"

nodejs: v22.13.0

@SaeedDev94
Copy link

It's not just build command, ng serve also doesn't work for me, I'm getting timeout error !!
I can't do anything with new version, wt... !!

@SaeedDev94
Copy link

I have the same issue. Setting my node version to 20.11.1 seems to work for me. It could be worth trying out for yourself as a temporary fix.

I prefer to downgrade the ng version instead of node !! -_-

@alan-agius4
Copy link
Collaborator

This issue doesn't appear to be related to the Node.js version. Upon investigation, I observed that the problem arises specifically when using withEnabledBlockingInitialNavigation. In general, it is not recommended to use this feature together with hydration.

@SaeedDev94
Copy link

This issue doesn't appear to be related to the Node.js version. Upon investigation, I observed that the problem arises specifically when using withEnabledBlockingInitialNavigation. In general, it is not recommended to use this feature together with hydration.

I removed withEnabledBlockingInitialNavigation and the problem solved but this breaking change shouldn't have a migration ?
withEnabledBlockingInitialNavigation and provideClientHydration was working in v19.0.x together ...

@alan-agius4 alan-agius4 added type: bug/fix freq2: medium severity5: regression merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note area: @angular/ssr and removed merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note labels Jan 20, 2025
@alan-agius4 alan-agius4 self-assigned this Jan 20, 2025
@alan-agius4
Copy link
Collaborator

I have a fix in progress that should address this issue and unblock it. As a side note, withEnabledBlockingInitialNavigation should generally not be used alongside provideClientHydration. We should consider issuing a warning about this, as this method is intended specifically for use in scenarios involving SSR with destructive hydration.

alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Jan 20, 2025
…InitialNavigation`

This fix ensures that route extraction is not blocked when `withEnabledBlockingInitialNavigation` is used.

Closes angular#29400
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Jan 20, 2025
…InitialNavigation`

This fix ensures that route extraction is not blocked when `withEnabledBlockingInitialNavigation` is used.

Closes angular#29400
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Jan 20, 2025
…InitialNavigation`

This fix ensures that route extraction is not blocked when `withEnabledBlockingInitialNavigation` is used.

Closes angular#29400
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Jan 20, 2025
…InitialNavigation`

This fix ensures that route extraction is not blocked when `withEnabledBlockingInitialNavigation` is used.

Closes angular#29400
alan-agius4 added a commit that referenced this issue Jan 20, 2025
…InitialNavigation`

This fix ensures that route extraction is not blocked when `withEnabledBlockingInitialNavigation` is used.

Closes #29400
alan-agius4 added a commit that referenced this issue Jan 20, 2025
…InitialNavigation`

This fix ensures that route extraction is not blocked when `withEnabledBlockingInitialNavigation` is used.

Closes #29400

(cherry picked from commit 4a1833d)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Feb 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.