Title: Angular Zones break promises in `openai` package (return null) · Issue #53380 · angular/angular · GitHub
Open Graph Title: Angular Zones break promises in `openai` package (return null) · Issue #53380 · angular/angular
X Title: Angular Zones break promises in `openai` package (return null) · Issue #53380 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? zone.js Is this a regression? No Description Users making requests with the openai package while using Zones receive null on all requests. Eg; const response = await this.openai!.cha...
Open Graph Description: Which @angular/* package(s) are the source of the bug? zone.js Is this a regression? No Description Users making requests with the openai package while using Zones receive null on all requests. Eg;...
X Description: Which @angular/* package(s) are the source of the bug? zone.js Is this a regression? No Description Users making requests with the openai package while using Zones receive null on all requests. Eg;...
Opengraph URL: https://github.com/angular/angular/issues/53380
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Angular Zones break promises in `openai` package (return null)","articleBody":"### Which @angular/* package(s) are the source of the bug?\n\nzone.js\n\n### Is this a regression?\n\nNo\n\n### Description\n\n[Users making requests](https://github.com/openai/openai-node/issues/232#issuecomment-1820088056) with the `openai` package while using Zones receive `null` on all requests.\r\n\r\nEg; \r\n\r\n```ts\r\nconst response = await this.openai!.chat.completions.create({\r\n model: 'gpt-3.5-turbo',\r\n messages: [\r\n {role: \"system\", content: \"Explain me the purpose of life\"},\r\n ],\r\n});\r\n// response === null, but shouldn't be\r\n```\r\n\r\n[Users report](https://github.com/openai/openai-node/issues/232#issuecomment-1806001114) that upgrading zone.js to ^0.14.2 allows things to work with `.then()`, but not with `await`. \r\n\r\nThis is likely related to the `openai` package [subclassing Promise](https://github.com/openai/openai-node/blob/a048174c0e53269a01993a573a10f96c4c9ec79e/src/core.ts#L79) to add helper methods, [like `.asResponse()`](https://github.com/openai/openai-node/blob/a048174c0e53269a01993a573a10f96c4c9ec79e/src/core.ts#L79).\n\n### Please provide a link to a minimal reproduction of the bug\n\nhttps://github.com/openai/openai-node/issues/232#issuecomment-1820088056\n\n### Please provide the exception or error you saw\n\n```true\ncompletion is `null`\n```\n\n\n### Please provide the environment you discovered this bug in (run `ng version`)\n\n```true\nI am a maintainer of `openai`, not an Angular user. Users have reported this with Angular v17 (and earlier) and zone.js@0.14.2 (and earlier).\n```\n\n\n### Anything else?\n\n_No response_","author":{"url":"https://github.com/rattrayalex","@type":"Person","name":"rattrayalex"},"datePublished":"2023-12-03T03:21:52.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":10},"url":"https://github.com/53380/angular/issues/53380"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:24670bac-47de-ad78-b967-93675d7ce0be |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DF34:186FB1:1E9D52:29A512:6A5B5B0D |
| html-safe-nonce | 3c7cfbfda52971479cbc8d75308734942c0f980e2c5a14487256566840af30e2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERjM0OjE4NkZCMToxRTlENTI6MjlBNTEyOjZBNUI1QjBEIiwidmlzaXRvcl9pZCI6IjgwNjQzNTg2MDgyNTQyMjkyNjIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1e370e6278f0d08764ba7e060ee8f3f58a2b7a8eb1b7fef661e51bf00a2aafa2 |
| hovercard-subject-tag | issue:2028120850 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/53380/issue_layout |
| twitter:image | https://opengraph.githubassets.com/332afe176b952bc95a43d66bb10ff7b5ea4769a7f2a69b4c59687e586b32ac97/angular/angular/issues/53380 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/332afe176b952bc95a43d66bb10ff7b5ea4769a7f2a69b4c59687e586b32ac97/angular/angular/issues/53380 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? zone.js Is this a regression? No Description Users making requests with the openai package while using Zones receive null on all requests. Eg;... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rattrayalex |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width