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

Cannot open or save files with Beta 5 in Ubuntu #11874

Closed
2 tasks
chipmunk1977 opened this issue Apr 22, 2022 · 22 comments
Closed
2 tasks

Cannot open or save files with Beta 5 in Ubuntu #11874

chipmunk1977 opened this issue Apr 22, 2022 · 22 comments
Labels
Type: Bug The code does not produce the intended behavior.

Comments

@chipmunk1977
Copy link

Application Version

5.0 Beta

Platform

Linux - Ubuntu

Printer

Custom Printer - (Creality CR-X)

Reproduction steps

After running the Appimage file, I got a series of messages about plugins needing to be removed. Followed those instructions. Final message regarding configuration errors was as attached. I could not open a file using the Open File menu item or the button, but drag and drop worked, as did Open Recent Files (which appears to be a list carried over from a previous installation).
It was possible to use and change slicing profiles, but it was not possible to use the Save to Disk function - nothing happens (no dialogue appears) but the system doesn't freeze. Save Project is the same. I have several instances of Cura installed (including Betas) and all work as expected.
Closing the configuration error dialogue and clicking on reset both appeared to do nothing, even with a restart of Cura after those actions.
I deleted the Appimage file and the folder named 5.0 in ~/.config/Cura
I then downloaded the file again and went through the same process with exactly the same results.

Actual results

It is possible to continue working with the slicer, but impossible to save anything either as gcode or project.
The Configuration Error notice appears after every restart and closing it or using the reset button has not effect. (For clarity, clicking on the Reset button generates the following warning - "Reset will remove all your current printers and profiles! Are you sure you want to reset?" Clicking on yes or no has no effect, though I can continue working with the slicer.

Expected results

That i can open files using the menu item, and save files.

Checklist of files to include

  • Log file
  • Project file

Additional information & file uploads

Cura_5_Beta

@chipmunk1977 chipmunk1977 added the Type: Bug The code does not produce the intended behavior. label Apr 22, 2022
@breeegz
Copy link

breeegz commented Apr 22, 2022

Ubuntu 20.04 Mate has same issue. I can open the configuration folder under the Help Menu and it opens 2 folders, ~/.local/share/cura/5.0 and ~/.config/cura/5.0, but the "Save to Disk" button isn't saving.

Clicking on "Save Project" brings up the project summary, but not a save dialog.
Clicking on "Open Recent" loads a recent project, which was drag-n-dropped on previous session of Cura 5.0
--Looks like it used legacy code to load the recent project, see below

2022-04-22 09:58:39,922 - INFO - [MainThread] cura.CuraApplication.readLocalFile [1752]: Attempting to read file file:///Data/3D_Files/STL_Models/recent.stl
2022-04-22 09:58:39,925 - INFO - [JobQueueWorker [2]] STLReader.STLReader.load_file [61]: Using legacy code to load STL data.
2022-04-22 09:58:41,263 - DEBUG - [JobQueueWorker [2]] UM.Mesh.MeshData.calculateNormalsFromVertices [558]: Calculating normals took 0.015967130661010742 seconds
2022-04-22 09:58:41,268 - DEBUG - [JobQueueWorker [2]] STLReader.STLReader._read [105]: Loaded a mesh with 739668 vertices
2022-04-22 09:58:41,393 - DEBUG - [JobQueueWorker [2]] UM.Mesh.MeshData.approximateConvexHull [505]: approximateConvexHull(target_count=1024) Calculating 3D convex hull took 0.12416672706604004 seconds. 1025 input vertices. 1025 output vertices.
2022-04-22 09:58:41,480 - DEBUG - [JobQueueWorker [2]] UM.FileHandler.ReadFileJob.run [83]: Loading file took 1.6 seconds
2022-04-22 09:58:41,603 - DEBUG - [JobQueueWorker [2]] UM.Mesh.MeshData.approximateConvexHull [505]: approximateConvexHull(target_count=1024) Calculating 3D convex hull took 0.12248349189758301 seconds. 1026 input vertices. 1026 output vertices.
2022-04-22 09:58:41,614 - DEBUG - [MainThread] UM.Operations.OperationStack.push [72]: <UM.Operations.AddSceneNodeOperation.AddSceneNodeOperation object at 0x7f75e01269e0>, took 1ms
2022-04-22 09:58:41,624 - DEBUG - [MainThread] UM.Operations.OperationStack.push [72]: GroupedOp.(#=2) RotateOp.(node=<CuraSceneNode object: 'rocktopus.stl'>,rot.=Q<0.0,0.0,0.0,w=4.0>) TranslateOp.(node=<CuraSceneNode object: 'rocktopus.stl'>,trans.=<0.000,0.000,0.000>), took 1ms
2022-04-22 09:58:41,895 - DEBUG - [MainThread] UM.View.GL.ShaderProgram.load [61]: Loading [/tmp/.mount_UltimaabiPpM/share/cura/resources/shaders/transparent_object.shader]...

@jffmichi
Copy link

Same issue on fully updated Arch Linux.

Workaround:
Insert a USB-stick which gives you a working "Save to Removable Drive"-button.

@chipmunk1977
Copy link
Author

Good catcht with the USB Stick! Can confirm that also functions as a workaround in Ubuntu.

@gleonard3
Copy link

Same. Chromebook Linux (Debian)

@breeegz
Copy link

breeegz commented Apr 22, 2022 via email

@jellespijker
Copy link
Member

This sound familiar with the behaviour some of the developers where experiencing. Setting the QT_QPA_PLATFORMTHEME in the AppRun seemed to solve that, but it might have broken it for other Linux desktops.

It would be help to know the desktop environment you guys use.

@fvrmr can you add to the ticket a reminder to make the value of the following export as an argument with a default value? That way we can at least provide people with a hotfix if this was indeed the culprit.
https://github.com/Ultimaker/cura-build-environment/blob/a179158890d65583d97ab9d03454fd498c54ce75/packaging/AppRun#L10

We should also keep in mind that we might need to compile Qt6 and PyQt6 from source if this problem persist. Since the old file dialogs we used, made use of the ListDir QML object. Which is unfortunately not part of the precompiled PyQt6-Qt6 binaries

another alternative solution is to to use the same way how we construct the FileDialog (in Python) in the USB Writer

@jffmichi
Copy link

jffmichi commented Apr 26, 2022

It would be help to know the desktop environment you guys use.

I'm using KDE with X11. Please let me know if you need anything else.

@breeegz
Copy link

breeegz commented Apr 26, 2022 via email

@chipmunk1977
Copy link
Author

Ubuntu 20.04 with XFCE desktop
also Ubuntu 22.04 with Plasma

@wernight
Copy link

wernight commented May 1, 2022

For Crostini using the AppImage I tried setting QT_QPA_PLATFORMTHEME to qt5ct / gtk2 / wayland and a few others (in the AppRun file) without any effect.

Logs:

qt.qpa.wayland: Ignoring unexpected wl_surface.enter received for output with id: 7 screen name: "Screen5" screen model: "0663" This is most likely a bug in the compositor.
Cyclic dependency detected between "file:///home/john/Cura/squashfs-root/share/cura/resources/qml/Actions.qml" and "file:///home/john/Cura/squashfs-root/share/cura/resources/qml/Actions.qml"
QQmlEngine::setContextForObject(): Object already has a QQmlContext
qt.qpa.wayland: Ignoring unexpected wl_surface.enter received for output with id: 7 screen name: "Screen5" screen model: "0663" This is most likely a bug in the compositor.

However after running those tests, Cura 4 didn't start without a reboot giving:

qt.qpa.xcb: could not connect to display :0
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: linuxfb, minimal, offscreen, vnc, webgl, xcb.

I don't think it's related, but the initial welcome tutorial (shown after each upgrade) keeps showing again and again each time.

Noticed the same issue on Arch running KDE.

@wernight
Copy link

wernight commented May 1, 2022

Workaround for Crostini (and probably a bunch more):

  1. Start Cura without the export from AppRun:
    1. ./Ultimaker-Cura-5.0.0-beta+1-linux.AppImage --appimage-extract
    2. cd squashfs-root
    3. ./Ultimaker-Cura
  2. Drag & drop the STL to Cura to load a model (the load/open dialog will still not work)
  3. Save and export dialog will now work

@jellespijker
Copy link
Member

@wernight this is an indication that the export we set in AppRun is the root cause of this. Can you try setting them one by one, to narrow down the one causing problems?

@breeegz
Copy link

breeegz commented May 1, 2022

I'm no expert, and this is the first time I have ever exported an appimage, but I'm willing to try, what's the worst that can happen.

I tried to run Ultimaker directly like wernight, I can open files with drag-n-drop. I can get my file browser to open with File-Open from the menu, but the my file browser hangs. If I try to slice and save from the "Save to Disk" button, my file browser starts to open, but hangs/locks up like the File-Open from the menu. So I'm not really functional with this workaround.

If I make changes to ./AppRun, do I need to repackage Ultimaker in order for those to take effect? What would be the preferred way to repackage the app in order to make changes?

I tried running AppRun with this extra line,
echo $(dirname $0) and I'm getting "." so it looks like the export is trying to get to "./qt/plugins" (and all the other exports) but those folders doesn't exist for me.

Of course, I could be getting beat by my own newbness.

@wernight
Copy link

wernight commented May 1, 2022

@breeegz I'd just extra (using --appimage-extract) and change the AppRun file locally in the extracted directory for now.

@jellespijker Only removing QT_QPA_PLATFORMTHEME on AppRun or setting it to gtk2 (default value in my Crostini environment) works.

@jellespijker
Copy link
Member

QT_QPA_PLATFORMTHEME was added because on other systems the file dialogs wouldn't show. It seems we need a more intelligent way of determining when to set it to which value.

@wernight
Copy link

wernight commented May 1, 2022

I agree. Still the 'open" dialog remains broken for some reason. Good that drag&drop works (frequently it doesn't on Crostini).

@pconroy328
Copy link

Just downloaded and tried V5. I too cannot save gcode after slicing. Went back to 4.13.x and can save. Have not tried inserting a USB stick to see if that's a workaround.

$ uname -a
Linux 5.13.0-40-generic #45-Ubuntu SMP Tue Mar 29 14:48:14 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

$ cat /etc/os-release
PRETTY_NAME="Ubuntu 21.10"
NAME="Ubuntu"
VERSION_ID="21.10"
VERSION="21.10 (Impish Indri)"
VERSION_CODENAME=impish
ID=ubuntu
ID_LIKE=debian

@lf94
Copy link

lf94 commented Jun 1, 2022

I'm having this issue too on Arch Linux. Exact same symptoms.

@Triffen
Copy link

Triffen commented Jun 1, 2022

Same for me on Manjaro with KDE Plasma. Won't save to disk but usually I save to an inserted SD card and that works fine.

@dgsardina
Copy link

dgsardina commented Jun 2, 2022

Same issue on Arch with KDE and intel video. I manage to start cura with the following but I am unable to get the open dialogues to work:
QT_QPA_PLATFORM=xcb LD_PRELOAD=/usr/lib64/libstdc++.so.6 ./Ultimaker-Cura-5.0.0-linux.AppImage
Note, I have also extracted the appimage and tried commenting out QT_QPA_PLATFORMTHEME and setting it to gtk2, still failing.
EDIT: I am on wayland.

@MariMakes
Copy link
Contributor

Hey all,

Thanks for reporting. Opening files is essential to using Cura, so this is very unfortunate.
We are aware of the issue and added an issue to our backlog.
I will close this issue since it seems to be a duplicate.

You can follow the progress at #12266

@wernight
Copy link

wernight commented Jan 23, 2023

For some reason on clean Crostini (Ubuntu-based) the file open doesn't show, however I found a way.

  • Use the *linux.AppImage (not the *linux-modern.AppImage), required for Crostini.
  • sudo apt install xdg-desktop-portal-gtk

Here is what it installs with this (I'm trying to find the smallest set of packages required and libgnome-desktop-3-19 isn't sufficient):

The following NEW packages will be installed:
  bubblewrap gnome-desktop3-data libgnome-desktop-3-19 libpipewire-0.3-0 libpipewire-0.3-modules libspa-0.2-modules libxkbregistry0 pipewire
  pipewire-bin xdg-desktop-portal xdg-desktop-portal-gtk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug The code does not produce the intended behavior.
Projects
None yet
Development

No branches or pull requests