Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

"Cannot create file", "Cannot save session" - unknown error, macOS



  • Hi,

    I'm having a hard time
    with my qt creator that I've tried googling the error message with no avail.

    error message:
    Cannot create file /Users/"username"/.config/QtProject/qtcreator/devices.xml: Unknown error

    which is weird because the functionality of the creator works fine, and I am able push the create
    project button and start making windows with the build working successfully. The error message will
    just pop up multiple times in a row all the time and sometimes the message will say the same thing but instead
    of "cannot create file", it will say "cannot save session" which makes me wonder if I need to change
    my file path config. I've already tried sudo mkdir -p /Users/"username"/... in the terminal
    I've also found the Qt creator files in finder-->go-->go to files-->"username"directory and I'm not sure what I'm looking for with all of the installed files so I haven't done anything to those.

    Thank you for any advice



  • @wawo9193
    Possibility: be careful with sudo mkdir -p /Users/"username"/..., because of sudo (you should not have used/needed to use that) you may get permissions on directories which do not allow your username read, or more likely write, access? Have a look at just how much of /Users/"username"/.config/QtProject/qtcreator/devices.xml path exists, and what permissions you have on final file/directory?



  • I know this is an older post but I just ran into the same issue and was able to solve it. At least in my case, the problem was that I did not have permissions for the /Users/"username"/.config folder. In terminal I just used:

    sudo chown -R <username> .config

    And then when prompted, enter my system password.

    Here's the stack exchange post that gave me the tip:
    https://apple.stackexchange.com/questions/320682/ownership-of-the-config-folder-in-home-directory

    Hope this helps someone in the future!


Log in to reply