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

jobs: hide .mru files #1503

Closed
thijstriemstra opened this issue Oct 8, 2024 · 9 comments · Fixed by #1507
Closed

jobs: hide .mru files #1503

thijstriemstra opened this issue Oct 8, 2024 · 9 comments · Fixed by #1507
Assignees
Labels
FR - Enhancement New feature or request
Milestone

Comments

@thijstriemstra
Copy link
Contributor

Fluidd Version

1.30.4

Browser

Firefox

Device

Desktop PC

Operating System

Windows

What happened

The jobs page has .mru files in it:

afbeelding

I enabled the hidden files filter.

What did you expect to happen

That .mru files are hidden.

How to reproduce

Not sure..!

Additional information

No response

@thijstriemstra thijstriemstra added GH - Bug Something isn't working GH - Evaluation Needed This topic needs to be discussed to evaluate it's aspects and feasability labels Oct 8, 2024
@pedrolamas
Copy link
Member

Hi @thijstriemstra, thanks for opening this ticket.

To be honest, I am a bit skeptical of adding "random" file types or extensions that I don't know of... I assume "mru" here referes to "most recently used", but the question is what actually created these files in the first place? Possibly some app you are using?

@pedrolamas pedrolamas added FR - Enhancement New feature or request and removed GH - Bug Something isn't working labels Oct 10, 2024
@thijstriemstra
Copy link
Contributor Author

my guess is mru stands for moonraker upload? i'll try to search moonraker codebase.

@pedrolamas
Copy link
Member

my guess is mru stands for moonraker upload? i'll try to search moonraker codebase.

Oh, good call!!

https://github.com/Arksine/moonraker/blob/71f9e677b81afcc6b99dd5002f595025c38edc7b/moonraker/components/file_manager/file_manager.py#L810

Given this I think it does make sense to add a new entry to hide these files (as they are created by Moonraker)

@pedrolamas pedrolamas removed the GH - Evaluation Needed This topic needs to be discussed to evaluate it's aspects and feasability label Oct 10, 2024
@pedrolamas pedrolamas added this to the 1.30.5 milestone Oct 10, 2024
@thijstriemstra
Copy link
Contributor Author

my guess is they're unprocessed or failed moonraker uploads? not sure how they ended up in this state though.

@thijstriemstra
Copy link
Contributor Author

thijstriemstra commented Oct 21, 2024

my guess is they're unprocessed or failed moonraker uploads? not sure how they ended up in this state though.

cc @Arksine

@Arksine
Copy link

Arksine commented Oct 22, 2024

Moonraker streams uploads to the system temp folder with a temporary file name (with the .mru extension). Once the upload is complete, the file is moved to the destination path and renamed. The only way I'm aware that a .mru file could be moved without being renamed is if the upload request either omitted the multipart filename or passed an empty value. Its very unlikely that Fluidd did this unless its a browser bug, however it may be possible that some other software did.

I added a check to the upload method to make sure it receives a valid file name. That said, if this behavior continues moonraker.log might be useful in tracking down what would cause this.

@thijstriemstra
Copy link
Contributor Author

thijstriemstra commented Oct 23, 2024

thanks for the feedback @Arksine!

Its very unlikely that Fluidd did this unless its a browser bug, however it may be possible that some other software did.

I'm using OrcaSlicer so sounds like the bug's there..

@thijstriemstra
Copy link
Contributor Author

thijstriemstra commented Nov 19, 2024

That said, if this behavior continues moonraker.log might be useful in tracking down what would cause this.

@Arksine I got the new 400 error you added recently while uploading a file from OrcaSlicer. It showed up in a OrcaSlicer popup:

Error uploading to print host:
dd0b:319:6e26::130: curl:Couldn't connect to server:
Failed to connect to dd0b:319:6e26::130 port 80: Connection refused
[Error 7]
192.168.2.181: HTTP 400: {"error":{"code":400,"message":"Bad Request","traceback":"Traceback
(most recent call last):\n\n File
\"/home/foo/moonraker-env/lib/python3.11/site-packages/tornado/web.py\", line 1790, in
_execute\n result = await result\n ^^^^^^^^^^^^\n\n File
\"/home/foo/moonraker/moonraker/components/application.py\", line 1001, in post\n raise
tornado.web.HTTPError(400, \"Multipart filename omitted\")\n\ntornado.web.HTTPError: HTTP
400: Bad Request (Multipart filename omitted)\n"}}

I uploaded a file with title: Z-Stepper Spacer_ASA_23m6s.gcode It would fail everytime I uploaded.

After changing the name to Z-Stepper_Spacer_ASA_23m6s.gcode, thus eliminating the space in filename, it worked properly.

I'm using OrcaSlicer so sounds like the bug's there..

So where is the issue, Moonraker or OrcaSlicer?

@Arksine
Copy link

Arksine commented Nov 19, 2024

Sounds like an issue in Orcaslicer. Its uploading a file without properly setting the filename in the Content-Disposition header.

FWIW, I uploaded a file with PrusaSlicer 2.8.1 using the same file name and it proceeded successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FR - Enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants