Title: createWriteStream has problems in a CIFS mount path with node 20.x.x and node 18.18.0 · Issue #50061 · nodejs/node · GitHub
Open Graph Title: createWriteStream has problems in a CIFS mount path with node 20.x.x and node 18.18.0 · Issue #50061 · nodejs/node
X Title: createWriteStream has problems in a CIFS mount path with node 20.x.x and node 18.18.0 · Issue #50061 · nodejs/node
Description: Version 18.18.0 and 20.x.x Platform Linux iob-node20 6.2.16-5-pve #1 SMP PREEMPT_DYNAMIC PVE 6.2.16-6 (2023-07-25T15:33Z) x86_64 GNU/Linux Subsystem iobroker What steps will reproduce the bug? writestream into a cifs share How often does...
Open Graph Description: Version 18.18.0 and 20.x.x Platform Linux iob-node20 6.2.16-5-pve #1 SMP PREEMPT_DYNAMIC PVE 6.2.16-6 (2023-07-25T15:33Z) x86_64 GNU/Linux Subsystem iobroker What steps will reproduce the bug? writ...
X Description: Version 18.18.0 and 20.x.x Platform Linux iob-node20 6.2.16-5-pve #1 SMP PREEMPT_DYNAMIC PVE 6.2.16-6 (2023-07-25T15:33Z) x86_64 GNU/Linux Subsystem iobroker What steps will reproduce the bug? writ...
Opengraph URL: https://github.com/nodejs/node/issues/50061
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"createWriteStream has problems in a CIFS mount path with node 20.x.x and node 18.18.0","articleBody":"### Version\r\n\r\n18.18.0 and 20.x.x\r\n\r\n### Platform\r\n\r\nLinux iob-node20 6.2.16-5-pve #1 SMP PREEMPT_DYNAMIC PVE 6.2.16-6 (2023-07-25T15:33Z) x86_64 GNU/Linux\r\n\r\n### Subsystem\r\n\r\niobroker\r\n\r\n### What steps will reproduce the bug?\r\n\r\nwritestream into a cifs share \r\n\r\n### How often does it reproduce? Is there a required condition?\r\n\r\nError always occurs\r\n\r\n### What is the expected behavior? Why is that the expected behavior?\r\n\r\nThe file created with writestream should be written to the remote file system (CIFS share), but it is only 16Kb in size and corrupted\r\n\r\n### What do you see instead?\r\n\r\nA corrupted file with 16Kb instead of about 5-10 Mb\r\n\r\n### Additional information\r\n\r\nHello all,\r\n\r\nI hope you can help here... We use the package among other things for backups in the [iobroker project](https://github.com/ioBroker/ioBroker) and have with current node 20 versions and from node 18.18.0 problems with many users who write their backup directly with a CIFS mount on the Fritzbox NAS.\r\nCurrently, I am only aware of problems in connection with Fitzbox and CIFS.\r\n\r\nIt seems that all attempts since Node 18.18.0 have problems with \"fs.createWriteStream\" or with .pipe.\r\nLocally on the system there are no problems. The error only occurs when the backup is to be written to the CIFS mount point.\r\n\r\nHere is an excerpt of how the create of the backup is constructed.\r\n\r\n```\r\nreturn new Promise((resolve, reject) => {\r\n const f = fs.createWriteStream(name);\r\n f.on('finish', () => {\r\n this.removeTempBackupDir();\r\n resolve(path.normalize(name));\r\n });\r\n\r\n f.on('error', e => {\r\n console.error(`host.${this.hostname} Cannot pack directory ${this.tmpDir}/backup: ${e.message}`);\r\n reject(new IoBrokerError({ message: e.message, code: EXIT_CODES.CANNOT_GZIP_DIRECTORY }));\r\n });\r\n\r\n try {\r\n tar.create({ gzip: true, cwd: `${this.tmpDir}/` }, ['backup']).pipe(f);\r\n } catch (e) {\r\n console.error(`host.${this.hostname} Cannot pack directory ${this.tmpDir}/backup: ${e.message}`);\r\n reject(new IoBrokerError({ message: e.message, code: EXIT_CODES.CANNOT_GZIP_DIRECTORY }));\r\n }\r\n });\r\n```\r\n","author":{"url":"https://github.com/simatec","@type":"Person","name":"simatec"},"datePublished":"2023-10-06T09:15:27Z","url":"https://github.com/nodejs/node/issues/50061"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:d156248f-1e59-2092-1499-198935133ebc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 85F0:12B33:C563D5:FFA8C7:6B063F26 |
| html-safe-nonce | 23d073aa419f4642d85797049f75bc7acdf0249e2cbb4fefc95d3d07696bcd0a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NUYwOjEyQjMzOkM1NjNENTpGRkE4Qzc6NkIwNjNGMjYiLCJ2aXNpdG9yX2lkIjoiMTM2MjcyNTkwODU3ODE4OTA5NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 031c9d90081830f122642390ab4587f3bd458a27161eeb74ad7972c33cbe46bd |
| hovercard-subject-tag | issue:1929753541 |
| 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/nodejs/node/50061/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4de03e2173608c453b1fec455d7b9ad36363cdd1e7d75f54a153444969ab4b56/nodejs/node/issues/50061 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4de03e2173608c453b1fec455d7b9ad36363cdd1e7d75f54a153444969ab4b56/nodejs/node/issues/50061 |
| og:image:alt | Version 18.18.0 and 20.x.x Platform Linux iob-node20 6.2.16-5-pve #1 SMP PREEMPT_DYNAMIC PVE 6.2.16-6 (2023-07-25T15:33Z) x86_64 GNU/Linux Subsystem iobroker What steps will reproduce the bug? writ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | simatec |
| hostname | github.com |
| expected-hostname | github.com |
| None | dcf72c457c022486d23c3cbb0dd21aba537a87611ca9ddabd1799cf2eaa9b297 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| 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 | 0f38f5735226749ec5e08a8649dce4cb2613d9ad |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width