{"id":18596959,"url":"https://github.com/focusaurus/raven-hapi-bug","last_synced_at":"2025-05-16T13:33:06.746Z","repository":{"id":141311675,"uuid":"137505397","full_name":"focusaurus/raven-hapi-bug","owner":"focusaurus","description":null,"archived":false,"fork":false,"pushed_at":"2018-06-15T16:03:09.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T18:02:57.116Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/focusaurus.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-15T15:43:21.000Z","updated_at":"2018-06-15T16:03:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"b81f0da2-019a-43a0-9497-14a2cfcdc25d","html_url":"https://github.com/focusaurus/raven-hapi-bug","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/focusaurus%2Fraven-hapi-bug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/focusaurus%2Fraven-hapi-bug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/focusaurus%2Fraven-hapi-bug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/focusaurus%2Fraven-hapi-bug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/focusaurus","download_url":"https://codeload.github.com/focusaurus/raven-hapi-bug/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254538477,"owners_count":22087870,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T01:26:25.997Z","updated_at":"2025-05-16T13:33:06.724Z","avatar_url":"https://github.com/focusaurus.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Raven causing havoc in hapi server\n\n## With raven sampleRate: 1\n\n```\ntime curl -v 'localhost:3000?e=1'\n* Rebuilt URL to: localhost:3000/?e=1\n*   Trying 127.0.0.1...\n* Connected to localhost (127.0.0.1) port 3000 (#0)\n\u003e GET /?e=1 HTTP/1.1\n\u003e Host: localhost:3000\n\u003e User-Agent: curl/7.47.0\n\u003e Accept: */*\n\u003e\n\u003c HTTP/1.1 200 OK\n\u003c content-type: application/json; charset=utf-8\n\u003c cache-control: no-cache\n\u003c content-length: 0\n\u003c Date: Fri, 15 Jun 2018 15:45:45 GMT\n\u003c Connection: keep-alive\n\u003c\n* Connection #0 to host localhost left intact\ncurl -v 'localhost:3000?e=1'  0.01s user 0.00s system 0% cpu 5.814 total\n```\n\n* Response status code is `200` instead of `500`\n  * I believe raven has somehow managed to delete the error from control flow\n* Process hangs for over **5 seconds**\n\n### Digging into root cause\n* It seems like in raven 2.4.2: `raven/lib/client.js:311` in the client `send` function where `stringify` is called is where chaos takes the reigns\n\n## Same request with raven sampleRate: 0\n\n```\ntime curl -v 'localhost:3000?e=1'\n* Rebuilt URL to: localhost:3000/?e=1\n*   Trying 127.0.0.1...\n* Connected to localhost (127.0.0.1) port 3000 (#0)\n\u003e GET /?e=1 HTTP/1.1\n\u003e Host: localhost:3000\n\u003e User-Agent: curl/7.47.0\n\u003e Accept: */*\n\u003e\n\u003c HTTP/1.1 500 Internal Server Error\n\u003c content-type: application/json; charset=utf-8\n\u003c cache-control: no-cache\n\u003c content-length: 96\n\u003c Date: Fri, 15 Jun 2018 15:50:00 GMT\n\u003c Connection: keep-alive\n\u003c\n* Connection #0 to host localhost left intact\n{\"statusCode\":500,\"error\":\"Internal Server Error\",\"message\":\"An internal server error occurred\"}curl -v 'localhost:3000?e=1'  0.01s user 0.01s system 24% cpu 0.071 total\n```\n\n## Environment and reproduction\n\n* Official docker `node:8.4.0` image\n* `Linux c6b747433318 4.13.0-43-generic #48~16.04.1-Ubuntu SMP Thu May 17 12:56:46 UTC 2018 x86_64 GNU/Linux`\n* node v8.4.0\n* raven 2.4.2 and 2.6.2 (latest)\n* Also reproduced in google kubernetes engine\n  * `Linux server-7559c49564-wwcwc 4.14.22+ #1 SMP Thu May 10 17:54:42 PDT 2018 x86_64 GNU/Linux`\n\n### npm ls output\n```\nraven-hapi-bug@0.0.1 /opt\n+-- boom@5.2.0\n| `-- hoek@4.2.1\n+-- hapi@13.5.3\n| +-- accept@2.1.1\n| | +-- boom@3.2.0 deduped\n| | `-- hoek@4.0.0 deduped\n| +-- ammo@2.0.1\n| | +-- boom@3.2.0 deduped\n| | `-- hoek@4.0.0 deduped\n| +-- boom@3.2.0\n| | `-- hoek@4.0.0 deduped\n| +-- call@3.0.2\n| | +-- boom@3.2.0 deduped\n| | `-- hoek@4.0.0 deduped\n| +-- catbox@7.1.1\n| | +-- boom@3.2.0 deduped\n| | +-- hoek@4.0.0 deduped\n| | `-- joi@8.1.0 deduped\n| +-- catbox-memory@2.0.2\n| | `-- hoek@4.0.0 deduped\n| +-- cryptiles@3.0.1\n| | `-- boom@3.2.0 deduped\n| +-- heavy@4.0.1\n| | +-- boom@3.2.0 deduped\n| | +-- hoek@4.0.0 deduped\n| | `-- joi@8.1.0 deduped\n| +-- hoek@4.0.0\n| +-- iron@4.0.1\n| | +-- boom@3.2.0 deduped\n| | +-- cryptiles@3.0.1 deduped\n| | `-- hoek@4.0.0 deduped\n| +-- items@2.1.0\n| +-- joi@8.1.0\n| | +-- hoek@4.0.0 deduped\n| | +-- isemail@2.1.2\n| | +-- moment@2.13.0\n| | `-- topo@2.0.1 deduped\n| +-- kilt@2.0.1\n| | `-- hoek@4.0.0 deduped\n| +-- mimos@3.0.1\n| | +-- hoek@4.0.0 deduped\n| | `-- mime-db@1.23.0\n| +-- peekaboo@2.0.1\n| +-- shot@3.1.0\n| +-- statehood@4.0.1\n| | +-- boom@3.2.0 deduped\n| | +-- cryptiles@3.0.1 deduped\n| | +-- hoek@4.0.0 deduped\n| | +-- iron@4.0.1 deduped\n| | +-- items@2.1.0 deduped\n| | `-- joi@8.1.0 deduped\n| +-- subtext@4.0.3\n| | +-- boom@3.2.0 deduped\n| | +-- content@3.0.1\n| | | `-- boom@3.2.0 deduped\n| | +-- hoek@4.0.0 deduped\n| | +-- pez@2.1.1\n| | | +-- b64@3.0.1\n| | | | `-- hoek@4.0.0 deduped\n| | | +-- boom@3.2.0 deduped\n| | | +-- content@3.0.1 deduped\n| | | +-- hoek@4.0.0 deduped\n| | | `-- nigel@2.0.1\n| | |   +-- hoek@4.0.0 deduped\n| | |   `-- vise@2.0.1\n| | |     `-- hoek@4.0.0 deduped\n| | `-- wreck@7.2.1\n| |   +-- boom@3.2.0 deduped\n| |   `-- hoek@4.0.0 deduped\n| `-- topo@2.0.1\n|   `-- hoek@4.0.0 deduped\n`-- raven@2.6.2\n  +-- cookie@0.3.1\n  +-- md5@2.2.1\n  | +-- charenc@0.0.2\n  | +-- crypt@0.0.2\n  | `-- is-buffer@1.1.6\n  +-- stack-trace@0.0.10\n  +-- timed-out@4.0.1\n  `-- uuid@3.0.0\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffocusaurus%2Fraven-hapi-bug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffocusaurus%2Fraven-hapi-bug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffocusaurus%2Fraven-hapi-bug/lists"}