Replies: 5 comments 1 reply
-
@rmsgit Could you post some code example that we can test and reproduce your issue? |
Beta Was this translation helpful? Give feedback.
-
TLDR: Here is the example code from the forked example project: Long version: Description of the issue and the example code: This problem is not happening for vanilla loopback 3 application or vanilla loopback 4 endpoints You can see the specific code under the "The Change" link. Steps to reproduce:
|
Beta Was this translation helpful? Give feedback.
-
I'm running into this same issue. Any updates? |
Beta Was this translation helpful? Give feedback.
-
#8802 has been opened to track this as a bug. I'm not familiar with LB3 so it's been placed in the icebox to be picked up at some point with no ETA at the moment. We're always open to merging community contributions to fix this at the LB4-side. |
Beta Was this translation helpful? Give feedback.
-
Any update on this issue, I am also facing similar issue using loopback 3 |
Beta Was this translation helpful? Give feedback.
-
Hi all, I'm trying to mount loopback 3 app into loopback 4 app. Currently, I successfully mounted according to the official documentation. But when I trying to do a load test (virtual users: 300 / sec, timeout: 10s), "ERR_HTTP_HEADERS_SENT" error is throwing. When I trying with lb3 or lb4 individually it's never happening for this load. Additionally, when I increase timeout duration in load test, the rate of error accruing is decreasing.
(node:10426) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag
--unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 117)2021-01-05T07:23:07.000Z - info: IP: ::ffff:127.0.0.1, CustomerId: XXXXXXXXXXXXXXXX, login. User
(node:10426) UnhandledPromiseRejectionWarning: Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
at ServerResponse.setHeader (_http_outgoing.js:526:11)
at ServerResponse.header (<project_path>/node_modules/express/lib/response.js:771:10)
at ServerResponse.json (<project_path>/node_modules/express/lib/response.js:264:10)
at <project_path>/lb3app/server/boot/user.js:47:8
at tokenHandler (<project_path>/node_modules/loopback/common/models/user.js:287:9)
at <project_path>/node_modules/loopback/node_modules/loopback-datasource-juggler/lib/relation-definition.js:1919:13
at <project_path>/node_modules/loopback/node_modules/loopback-datasource-juggler/lib/dao.js:427:21
at doNotify (<project_path>/node_modules/loopback/node_modules/loopback-datasource-juggler/lib/observer.js:155:49)
at doNotify (<project_path>/node_modules/loopback/node_modules/loopback-datasource-juggler/lib/observer.js:155:49)
at doNotify (<project_path>/node_modules/loopback/node_modules/loopback-datasource-juggler/lib/observer.js:155:49)
at doNotify (<project_path>/node_modules/loopback/node_modules/loopback-datasource-juggler/lib/observer.js:155:49)
at Function.ObserverMixin._notifyBaseObservers (<project_path>/node_modules/loopback/node_modules/loopback-datasource-juggler/lib/observer.js:178:5)
at Function.ObserverMixin.notifyObserversOf (<project_path>/node_modules/loopback/node_modules/loopback-datasource-juggler/lib/observer.js:153:8)
at Function.ObserverMixin._notifyBaseObservers (<project_path>/node_modules/loopback/node_modules/loopback-datasource-juggler/lib/observer.js:176:15)
at Function.ObserverMixin.notifyObserversOf (<project_path>/node_modules/loopback/node_modules/loopback-datasource-juggler/lib/observer.js:153:8)
at Function.ObserverMixin._notifyBaseObservers (<project_path>/node_modules/loopback/node_modules/loopback-datasource-juggler/lib/observer.js:176:15)
at Function.ObserverMixin.notifyObserversOf (<project_path>/node_modules/loopback/node_modules/loopback-datasource-juggler/lib/observer.js:153:8)
at Function.ObserverMixin._notifyBaseObservers (<project_path>/node_modules/loopback/node_modules/loopback-datasource-juggler/lib/observer.js:176:15)
at Function.ObserverMixin.notifyObserversOf (<project_path>/node_modules/loopback/node_modules/loopback-datasource-juggler/lib/observer.js:153:8)
at AccessToken. (<project_path>/node_modules/loopback/node_modules/loopback-datasource-juggler/lib/dao.js:426:25)
at AccessToken.next (<project_path>/node_modules/loopback/node_modules/loopback-datasource-juggler/lib/hooks.js:93:12)
at AccessToken. (<project_path>/node_modules/loopback/node_modules/loopback-datasource-juggler/lib/dao.js:414:26)
Beta Was this translation helpful? Give feedback.
All reactions