steelbrain / steelbrain/node-ssh
Seek fault when downloading some files
Open
Nobody has claimed this yet.
unconfirmed bug
- Dominant language
- TypeScript
- Stars
- 1k
- Forks
- 94
- PR merge metrics
- No merged PRs in 30d
Description
I try to download a directory, for some files I get an seek faul error. Always the same files failing.
// Function to download a directory
async function backupDirectory(backupDir) {
try {
await sftp.connect(server);
console.log('Connected to SFTP server');
const failed = []
const successful = []
const status = await sftp.getDirectory(backupDir, '/0g564be4cbaMfUx3', {
recursive: true,
concurrency: 2,
tick: function(localPath, remotePath, error) {
if (error) {
console.log(`Failed to download ${remotePath}: ${error}`);
failed.push(localPath)
} else {
console.log(`Successfully downloaded ${remotePath}`);
successful.push(localPath)
}
}
});
console.log('the directory transfer was', status ? 'successful' : 'unsuccessful')
console.log('failed transfers', failed.length);
console.log('successful transfers', successful.length);
} catch (err) {
console.error('SFTP error:', err);
} finally {
await sftp.dispose();
}
}
Console output:
Connected to SFTP server
Failed to download \0g564be4cbaMfUx3\_foundUrlsWithoutStatus.json: Error: Seek fault.
Successfully downloaded \0g564be4cbaMfUx3\config.json
Failed to download \0g564be4cbaMfUx3\foundUrls.json: Error: Seek fault.
Successfully downloaded \0g564be4cbaMfUx3\foundUrlsHistory.json
Successfully downloaded \0g564be4cbaMfUx3\history.json
Successfully downloaded \0g564be4cbaMfUx3\pdfs.json
Successfully downloaded \0g564be4cbaMfUx3\report.json
Successfully downloaded \0g564be4cbaMfUx3\sitemap.json
Failed to download \0g564be4cbaMfUx3\reports\hio-eh-prod-hispro-de-.json: Error: Seek fault.
Failed to download \0g564be4cbaMfUx3\reports\hio-eh-prod-hispro-de-qisserver-pages-cs-sys-error-error-faces-code-404.json: Error: Seek fault.
Failed to download \0g564be4cbaMfUx3\reports\hio-eh-prod-hispro-de-qisserver-pages-cs-sys-error-error-faces.json: Error: Seek fault.
Failed to download \0g564be4cbaMfUx3\reports\hio-eh-prod-hispro-de-qisserver-pages-cs-sys-portal-imprint-imprint-faces.json: Error: Seek fault.
Failed to download \0g564be4cbaMfUx3\reports\hio-eh-prod-hispro-de-qisserver-pages-cs-sys-portal-imprint-licenseinfo-faces.json: Error: Seek fault.
Failed to download \0g564be4cbaMfUx3\reports\hio-eh-prod-hispro-de-qisserver-pages-cs-sys-portal-imprint-privacy-faces.json: Error: Seek fault.
Failed to download \0g564be4cbaMfUx3\reports\hio-eh-prod-hispro-de-qisserver-pages-cs-sys-portal-sitemap-sitemap-faces.json: Error: Seek fault.
Failed to download \0g564be4cbaMfUx3\reports\hio-eh-prod-hispro-de-qisserver-pages-cs-sys-portal-subMenu-faces.json: Error: Seek fault.
Failed to download \0g564be4cbaMfUx3\reports\hio-eh-prod-hispro-de-qisserver-pages-cs-sys-portal-utilities-accessibilityHelp-faces.json: Error: Seek fault.
Failed to download \0g564be4cbaMfUx3\reports\hio-eh-prod-hispro-de-qisserver-pages-cs-sys-portal-utilities-accessibilityStatement-faces.json: Error: Seek fault.
Failed to download \0g564be4cbaMfUx3\reports\hio-eh-prod-hispro-de-qisserver-pages-cs-sys-portal-utilities-easyLanguageHelp-faces.json: Error: Seek fault.
Failed to download \0g564be4cbaMfUx3\screenshots\Full_hio-eh-prod-hispro-de-.jpeg: Error: Seek fault.
Failed to download \0g564be4cbaMfUx3\screenshots\Full_hio-eh-prod-hispro-de-qisserver-pages-cs-sys-error-error-faces-code-404.jpeg: Error: Seek fault.
Successfully downloaded \0g564be4cbaMfUx3\screenshots\Full_hio-eh-prod-hispro-de-qisserver-pages-cs-sys-error-error-faces.jpeg
Failed to download \0g564be4cbaMfUx3\screenshots\Full_hio-eh-prod-hispro-de-qisserver-pages-cs-sys-portal-imprint-imprint-faces.jpeg: Error: Seek fault.
Failed to download \0g564be4cbaMfUx3\screenshots\Full_hio-eh-prod-hispro-de-qisserver-pages-cs-sys-portal-imprint-licenseinfo-faces.jpeg: Error: Seek fault.
Failed to download \0g564be4cbaMfUx3\screenshots\Full_hio-eh-prod-hispro-de-qisserver-pages-cs-sys-portal-imprint-privacy-faces.jpeg: Error: Seek fault.
Failed to download \0g564be4cbaMfUx3\screenshots\Full_hio-eh-prod-hispro-de-qisserver-pages-cs-sys-portal-sitemap-sitemap-faces.jpeg: Error: Seek fault.
Successfully downloaded \0g564be4cbaMfUx3\screenshots\Full_hio-eh-prod-hispro-de-qisserver-pages-cs-sys-portal-subMenu-faces.jpeg
Failed to download \0g564be4cbaMfUx3\screenshots\Full_hio-eh-prod-hispro-de-qisserver-pages-cs-sys-portal-utilities-accessibilityHelp-faces.jpeg: Error: Seek fault.
Failed to download \0g564be4cbaMfUx3\screenshots\Full_hio-eh-prod-hispro-de-qisserver-pages-cs-sys-portal-utilities-accessibilityStatement-faces.jpeg: Error: Seek fault.
Failed to download \0g564be4cbaMfUx3\screenshots\Full_hio-eh-prod-hispro-de-qisserver-pages-cs-sys-portal-utilities-easyLanguageHelp-faces.jpeg: Error: Seek fault.
the directory transfer was unsuccessful
failed transfers 22
successful transfers 8
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with getDirectory using the listed files and concurrency: 2, then trace the transfer path responsible for the Seek fault. Compare the failing and successful files and inspect how the tick callback receives errors. Done means the affected files download successfully and the behavior has regression coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100