OrcaSlicer icon indicating copy to clipboard operation
OrcaSlicer copied to clipboard

2.4.1 Doesn't jump to device tab after file upload to printer anymore

Open nifty1a opened this issue 2 weeks ago • 8 comments

Is there an existing issue for this problem?

  • [x] I have searched the existing issues

Snapmaker_Orca Version

2.4.1

Operating System (OS)

Windows

OS Version

WIndows 11 Pro 25H2

Additional system information

No response

Printer

Snapmaker U1

How to reproduce

  1. Slice a model
  2. click Print- Upload
  3. click Send

Actual results

When upload reaches 100% Snorca used to close upload dialog box after a countdown bar across the top, and jump to the device tab.... Now it just sits like this.. image

Expected results

When upload reaches 100% ,close upload dialog box after a countdown bar across the top, and jump to the device tab....

Like previous version used to.

Project file & Debug log uploads

vase mode test.zip

Checklist of files to include

  • [ ] Log file
  • [x] Project file

Anything else?

No response

nifty1a avatar Nov 12 '26 18:11 nifty1a

I do not have a U1 here to reproduce this, but I compared the source of the two tags and it narrows down where the regression can be.

How the dialog is supposed to end (same in both versions):

  1. the upload page calls sw_SetFilamentMappingComplete with status: "success", which sets the dialog's finish flag;
  2. the page calls sw_FinishFilamentMapping, which closes the dialog (SafeEndModal);
  3. back in Plater::send_gcode_legacy, if (dialog->is_finish()) select_tab(tpMonitor) jumps to the Device tab.

So the slicer never closes the dialog on its own: both calls come from the page. I extracted sw_SetFilamentMappingComplete, sw_FinishFilamentMapping and sw_FinishPreprint from src/slic3r/GUI/SSWCP.cpp at v2.4.0 and v2.4.1 and they are byte-identical (same md5), and step 3 in Plater.cpp is unchanged too.

What did change is which page is loaded. In WebPreprintDialog.cpp:

  • 2.4.0: http://localhost:<port>/web/flutter_web/index.html?path=5, the page bundled with the slicer;
  • 2.4.1: wxGetApp().gateway_web_url("pre_paint_upload_page") plus ?id=<store_id>, served by the new gateway service.

That points at the upload page the gateway serves in 2.4.1 not sending those two commands after reaching 100%, rather than at the C++ in this repository. A dialog that stays open at 100%, as in the screenshot, is what you get when step 2 never arrives.

@nifty1a if you can attach the log of a session where this happens, two things would confirm it: whether sw_SetFilamentMappingComplete / sw_FinishFilamentMapping show up after the upload, and whether there is a line with [FLUTTER_FLOW] [gateway] [url_fallback] (the slicer logs it when the gateway gives no URL for the page).

Limits: source reading only, nothing run against a printer, and I have not read the page code itself (it is not in this repository).

alandebortolo avatar Nov 15 '26 02:11 alandebortolo

I have attached a trimmed down log file (removed all of last months session data), so the file was less than 90MB... There seems to be references to old files not loading, which is confusing... (Maybe moved/deleted files in recent files list?, not sure...)

logs_20261116_150548.zip

nifty1a avatar Nov 16 '26 15:11 nifty1a

Thanks, the log helps, and it also shows that part of what I asked for was wrong. I read the three files against the source of both tags.

What the log settles

The zip has one 2.4.0 session (12 Nov 16:06) and the rest are 2.4.1, so it is a before/after on the same machine:

2.4.0 session 2.4.1 sessions
pages served by the slicer itself, 127.0.0.1:13619, Orca Web: flutter_version 2.3.38 Snapmaker Connect 1.8.5 (build 20261023182959), 127.0.0.1:30996
upload page bundled index.html?path=5 pre_paint_upload_page=/web/flutter_web/prepare_print?mode=2, listed in the health_ready line

So on your machine the upload dialog in 2.4.1 really is a different page, served by Connect, as the source comparison suggested. And the usual failure paths are ruled out, because none of these lines appear in any 2.4.1 session:

  • [url_fallback]: the gateway did hand out the page URL;
  • preprint store failed / G-code path does not exist: the context for the upload was stored;
  • WebPreprintDialog error loading page: the page loaded;
  • unknown command: the page is not calling a command the slicer does not know.

What it cannot settle (my mistake)

I asked whether sw_SetFilamentMappingComplete / sw_FinishFilamentMapping show up after the upload. I have now checked: in 2.4.1 the slicer does not log incoming page commands at any level (WebPreprintDialog::OnScriptMessage has its trace line commented out, and the three handlers have no log line). So their absence in your log proves nothing, and a debug-level log would not show them either. Sorry for the extra work on that point.

A check that needs no log

The code gives a way to tell the two halves apart. When the dialog is stuck at 100%, close it yourself with the window X and watch what happens:

  • it jumps to the Device tab: the page did report success (sw_SetFilamentMappingComplete) and only the closing call (sw_FinishFilamentMapping) is missing;
  • it stays on Prepare/Preview: the page never reported success to the slicer at all.

Either answer points at the prepare_print?mode=2 page shipped with Connect 1.8.5, which is not in this repository, so it tells the maintainers which call to look for.

Two other things in the log

  • Unable to open the file C:\Users\...\Downloads\*.3mf: these are in the 2.4.0 session too, for the same files, a few seconds after start. They come from the 3MF reader and match the recent-files list trying to read thumbnails of files that were moved or deleted, as you guessed. Not related to this issue.
  • New in 2.4.1, once per connection (7 times in the zip): [gateway][device-status] failed to watch device <sn>: Method not found, twice with device objects cannot build machine slots. That is the slicer asking Connect for action.device.watch (GUI_App::query_gateway_current_device) and Connect 1.8.5 answering that it has no such method. By the code it is not on the path that closes the dialog, so I am not claiming it causes this bug, but it does show this slicer build and this Connect build disagree on the gateway API, which may be worth a look from someone who can see the Connect side.

Limits: source and log reading only, nothing run against a printer, and I cannot see the Connect page code.

alandebortolo avatar Nov 16 '26 15:11 alandebortolo

Thanks for your prompt response... I maybe should mention, that I am using LAN mode, both on 2.4.0 and 2.4.1.

Having watched the behaviour more closely, I get the countdown at the bottom saying that device tab will open in 5,4,3,2,1.... and then nothing happens... Manually closing (with X) the modal Upload dialog, leaves the Prepare or Preview tab open.

nifty1a avatar Nov 16 '26 19:11 nifty1a

Thanks, that is exactly the check I needed, and the countdown detail adds to it.

What your two observations mean, by the 2.4.1 source

  • Closing with X leaves you on Prepare/Preview: after the dialog ends, Plater::send_gcode_legacy jumps to Device only if (dialog->is_finish()), and that flag is set in one place, the handler of sw_SetFilamentMappingComplete with status: "success". So the slicer never received the success report from the page.
  • The countdown runs to 1 and nothing happens: the page itself did reach its "done, going to Device" state, so the upload side is fine. But none of the ways it could act on the slicer took effect: no success flag (above), no sw_FinishFilamentMapping (the dialog would close), and no sw_SwitchTab either (that one only queues a tab change on the main window, so you would find yourself on Device after closing the dialog).

Put together: on the prepare_print?mode=2 page served by Snapmaker Connect 1.8.5, the step that runs when the countdown ends is not reaching the slicer at all in this setup. The receiving side in the slicer (SSWCP.cpp handlers, WebPreprintDialog::OnScriptMessage, MainFrame::request_select_tab) is the same code as 2.4.0, where it works for you.

LAN mode is a useful detail for whoever picks this up: the 2.4.0 session in your zip was also LAN and closed correctly with the bundled page, so the difference is the page, not the connection mode on the slicer side.

For the maintainers, in one line: Windows 11, U1, LAN mode, OrcaSlicer 2.4.1 + Connect 1.8.5 (build 20261023182959): the upload page finishes, shows the 5 s countdown, then sends neither sw_SetFilamentMappingComplete(success) nor sw_FinishFilamentMapping to the host webview (is_finish() stays false, confirmed by closing with X).

Until it is fixed: by the code, closing the dialog with X after it shows 100% does not undo anything on the slicer side (WebPreprintDialog::OnClose only dismisses the upload notification and ends the dialog), so closing it and clicking Device by hand should be a safe workaround.

Limits: source and log reading only, nothing run against a printer, and I cannot see the Connect page code, so I cannot say why the page's last step fails (LAN-specific branch, an exception after the countdown, or a missing bridge call).

alandebortolo avatar Nov 16 '26 21:11 alandebortolo

Thanks Alan, as a possibly useful differential diagnostic, I repeated an upload in cloud mode, and the result is the same, it also 'hangs' on the upload dialog, if I click "Upload and print" instead of just "Upload", so to me, it seems it should be affecting everybody?

If anyone who picks this bug up needs any extra data/tests run, then let me know in this thread and I'll upload it here. I'll monitor my email notifications as best I can.

nifty1a avatar Nov 17 '26 10:11 nifty1a

Thanks, the cloud test is useful: it rules out the LAN-specific branch I listed as one possible cause.

Your mention of the two buttons made me recheck the source, and I need to correct one thing I wrote. The dialog loads a different page depending on the button (Plater::send_gcode_legacy, dialog->set_send_page(post_action == None) in 2.4.1):

button gateway key URL in your log (health_ready line)
Upload pre_paint_upload_page /web/flutter_web/prepare_print?mode=2
Upload and print pre_paint_page /web/flutter_web/prepare_print?mode=1

In my earlier comments I only named mode=2. If your hangs were with "Upload and print", the page involved is mode=1. Everything else stands for both: same slicer-side handlers, same is_finish() check, both pages served by Snapmaker Connect 1.8.5.

One question, since your last comment can be read both ways: in 2.4.1, does plain "Upload" (without print) also stay open at 100%, or does only "Upload and print" hang? If only one of them hangs, the maintainers have a single mode to look at; if both do, it is the step shared by the two modes that runs after the countdown.

Limits as before: source and log reading only, nothing run against a printer, and I cannot see the Connect page code.

alandebortolo avatar Nov 17 '26 11:11 alandebortolo

@alandebortolo @nifty1a Thanks for the feedback. This issue has been fixed in 2.4.2alpha, and 2.4.2 alpha has now been released: https://github.com/Snapmaker/OrcaSlicer/releases/tag/v2.4.2-alpha If it still reproduces on 2.4.2 alpha, comment with your version and steps and we'll reopen.

LuckZAE avatar Nov 17 '26 11:11 LuckZAE