Repository navigation
build: unhandled exception error during prerender #29884
Copy link
Copy link
Labels
angular/build:applicationarea: @angular/buildfreq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarelyseverity3: brokentype: bug/fix
Description
Activity
additional info: API url was starting with
undefinedinstead ofhttps://, due to one code error, it works correctly if api server fails to respond or returns an incorrect responseAre you using
withFetch?yes this is the related code, it also uses tanstack query:
countriesQuery = injectQuery(() => ({ queryKey: ['countryList'], queryFn: () => { return lastValueFrom(this.#profileService.getCountryList()); }, }));
- addedfreq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarelyand removed
on Mar 19, 2025 - added 4 commits that reference this issue
on Mar 20, 2025 - added a commit that references this issue
on Mar 20, 2025 - added a commit that references this issue
on Mar 20, 2025 angular-automatic-lock-bot commented
on Apr 20, 2025 More actionsThis 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.
- locked and limited conversation to collaborators
on Apr 20, 2025
Metadata
Metadata
Assignees
Labels
angular/build:applicationarea: @angular/buildfreq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarelyseverity3: brokentype: bug/fix
Command
build
Is this a regression?
The previous version in which this bug was not present was
No response
Description
if route fails to prerender due to invalid http url during prerender, it gives following error, so we cannot find route having the error.
Minimal Reproduction
add route with
RenderMode.Prerenderin new app, & call api with invalid http url in that component.(not adding app as bug is clear in existing code, see anything else section)
Exception or Error
Your Environment
Anything else relevant?
See following code:
angular-cli/packages/angular/build/src/utils/server-rendering/prerender.ts
Lines 259 to 262 in c0de723
in this code if err obj is
undefinedit won't log exact error, & error is actually undefined in this case.