Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read properties of undefined (reading 'hasher') #488

Closed
breachedvince opened this issue May 6, 2022 · 9 comments
Closed
Labels
obsolete This issue or pull request had already been fixed or implemented

Comments

@breachedvince
Copy link

Can you help me with this error.

`[2022-05-06 22:20:52] TypeError: Cannot read properties of undefined (reading 'hasher')
at /root/lolisafe/controllers/uploadController.js:575:42
at async Promise.all (index 0)
at async Object.self.actuallyFinishChunks (/root/lolisafe/controllers/uploadController.js:529:5)
at async Object.self.finishChunks (/root/lolisafe/controllers/uploadController.js:511:5)

@breachedvince breachedvince changed the title Error TypeError: Cannot read properties of undefined (reading 'hasher') May 6, 2022
@BobbyWibowo
Copy link
Owner

Seems to be a relatively old commit, try updating

@BobbyWibowo BobbyWibowo added the in progress This issue or pull request is still currently being handled and still in progress label May 6, 2022
@breachedvince
Copy link
Author

Ok.

@BobbyWibowo
Copy link
Owner

It's likely due to chunks temporary data timing out

The default timeout in config is 30 minutes
If someone happened to only finish uploading their chunks when the timer was about to run out, it could indeed potentially throw that error

If you can confirm it isn't something else, a temporary workaround is to simply increase the timeout
I'll add some potential fixes tomorrow

@breachedvince
Copy link
Author

I'm on a VPN so the IP doesn't matter if your worrying!

@BobbyWibowo
Copy link
Owner

BobbyWibowo commented May 7, 2022

I think you probably misconfigured that domain in your nginx config

For some reason nginx thinks domainnamehere.com/api/upload is a static path located at /lolisafestore/api/upload

If it was lolisafe itself that was having a file permission issue, you basically wouldn't be seeing that on your nginx logs (at most you'd see it reporting that the request ended with http error code 500 or equivalent), since nginx is simply routing the requests from clients to/from lolisafe


Meaning it's likely unrelated with the undefined hasher errors

@breachedvince
Copy link
Author

Keep in mind this is only for files 2gb> all the other files that are like 900mb or 1gb work perfectly fine.

@breachedvince
Copy link
Author

Update: No more hasher errors after updating. Its failing to send the last POST request to api/uploads/finishchunks. Maybe you could try to upload something 1GB and see if it works.

@BobbyWibowo
Copy link
Owner

BobbyWibowo commented May 7, 2022

Tested some files ranging from ~1.8GB to ~7.84GB at 95MB chunk size (the latter was split up to 89 chunks), all worked fine

Re-uploaded the latter to test if hasher still worked properly with files that size, and it did indeed detect duplicate properly


~22GB file at 1MB chunk size just for the heck of it
image
This later succeeded

@breachedvince
Copy link
Author

Hmm, I will just re-install/ redo all my configs and lolisafe you can close this.

@BobbyWibowo BobbyWibowo added not a bug Not a bug obsolete This issue or pull request had already been fixed or implemented and removed in progress This issue or pull request is still currently being handled and still in progress not a bug Not a bug labels Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
obsolete This issue or pull request had already been fixed or implemented
Projects
None yet
Development

No branches or pull requests

2 participants