os-js / osjs-server

OS.js Server Module
https://manual.os-js.org
Other
19 stars 21 forks source link

Crashing the osjs when uploading a file in dynamic mountpoints that not found #87

Closed maryam4s26 closed 9 months ago

maryam4s26 commented 9 months ago

hi @andersevenrud .

When the server is restarted, the dynamic mountpoints will be deleted from the server. And the client doesn't notice this change.

If the user clicks on the mountpoints, gets a 403 error: image

image

But if the user uploads a file in the mountpoint client at the same time when mountpoint is not on the server, the server will crash: image

image

andersevenrud commented 9 months ago

When the server is restarted, the dynamic mountpoints will be deleted from the server. And the client doesn't notice this change.

Maybe you can recover from this ? Like having the service where you set up these mountpoint store the current state somewhere, and this is loaded when the service starts up ?

maryam4s26 commented 9 months ago

thank you @andersevenrud.

I have used this here as well and it has not crashed Do you think this solution is wrong?

andersevenrud commented 9 months ago

Try this instead: https://github.com/os-js/osjs-server/pull/88

maryam4s26 commented 9 months ago

Thank you very much. I have tested this and it solved my problem.

andersevenrud commented 9 months ago

Excellent! I really should have seen that edge case when I worked on the previous fix... but at least now I think we have every hole patched up. Thanks for all the reports!

I published a new version with the patch.

Can this issue be closed now ? It was kind of a discovery and a bug combined, and I'm not sure if my response to the mountpoint stuff answered your needs 😅

maryam4s26 commented 9 months ago

Thank you @andersevenrud . Yes, your answer has completely solved my problem.

maryam4s26 commented 9 months ago

I am impatiently waiting for your patch version update. @andersevenrud.

andersevenrud commented 9 months ago

Oh... I forgot to push my changes to github and only published to npm. Repo has been updated!