Universal not rendering due to 'Http failure response for (unknown url): 0 Unknown Error',
See original GitHub issueI did at one point have ssr working but somewhere along the line it’s broken and I just can’t find what’s causing the error. There are no errors client side and it renders fine but server side I get the following error which is preventing it rendering server side.
My issue is that it’s a large app I a just can’t pinpoint where the issue is.
HttpErrorResponse {
headers: HttpHeaders { normalizedNames: Map {}, lazyUpdate: null, headers: Map {} },
status: 0,
statusText: 'Unknown Error',
url: null,
ok: false,
name: 'HttpErrorResponse',
message: 'Http failure response for (unknown url): 0 Unknown Error',
error:
ProgressEvent {
type: 'error',
target:
XMLHttpRequest {
onloadstart: null,
onprogress: null,
onabort: null,
onerror: null,
onload: null,
ontimeout: null,
onloadend: null,
_listeners: [Object],
onreadystatechange: null,
_anonymous: undefined,
readyState: 4,
response: null,
responseText: '',
responseType: 'text',
responseURL: '',
status: 0,
statusText: '',
timeout: 0,
upload: [Object],
_method: 'GET',
_url: [Object],
_sync: false,
_headers: [Object],
_loweredHeaders: [Object],
_mimeOverride: null,
_request: null,
_response: null,
_responseParts: null,
_responseHeaders: null,
_aborting: null,
_error: null,
_loadedBytes: 0,
_totalBytes: 0,
_lengthComputable: false,
withCredentials: true },
currentTarget:
XMLHttpRequest {
onloadstart: null,
onprogress: null,
onabort: null,
onerror: null,
onload: null,
ontimeout: null,
onloadend: null,
_listeners: [Object],
onreadystatechange: null,
_anonymous: undefined,
readyState: 4,
response: null,
responseText: '',
responseType: 'text',
responseURL: '',
status: 0,
statusText: '',
timeout: 0,
upload: [Object],
_method: 'GET',
_url: [Object],
_sync: false,
_headers: [Object],
_loweredHeaders: [Object],
_mimeOverride: null,
_request: null,
_response: null,
_responseParts: null,
_responseHeaders: null,
_aborting: null,
_error: null,
_loadedBytes: 0,
_totalBytes: 0,
_lengthComputable: false,
withCredentials: true },
lengthComputable: false,
loaded: 0,
total: 0 } }
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:18
Top Results From Across the Web
Http failure response for (unknown url): 0 ... - Google Groups
Hi everyone I am new to angular. My first project trying to get data from an API throws this error "Http failure response...
Read more >Angular5 Server Side Rendering(Http failure response for ...
Angular5 Server Side Rendering(Http failure response for (unknown url): 0 Unknown Error). I believe the above error is something with CORS.
Read more >http failure response for 0 unknown error angular 12 - You.com
An HTTP failure response for an unknown url typically indicates that the web server is not able to resolve the domain name or...
Read more >http failure response for (unknown url) 0 unknown error in ...
HTTP 403 is a HTTP status code meaning access to the requested resource is forbidden for some reason. The server understood the request,...
Read more >HttpErrorResponse - Angular
A response that represents an error or failure, either from a non-successful HTTP status, an error while executing the request, or some other...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
What was the solution?
If you used self sign cert , the problem is the Angular Universal used Express and the security validate the ssl certification to the server , i used a self sign ssl , the solution is add the env NODE_TLS_REJECT_UNAUTHORIZED=0 to disable the verification SSL in NodeJs , warning this env is only in dev , in production is so risky