balena-io / etcher

Flash OS images to SD cards & USB drives, safely and easily.
https://etcher.io/
Apache License 2.0
29.65k stars 2.1k forks source link

[SOLVED] Error using Etcher (AppImage) on manjaro linux (Permission Denied) #2881

Closed Niceplace closed 5 years ago

Niceplace commented 5 years ago

Summary (includes solution):

When trying to flash an SD card using the AppImage packaged version of Etcher, running on Manjaro Linux, the process fails with a generic error message. Opening the DevTools console gives more details into the error and suggests this is a permissions issue

"Command failed: cd "/home/simon"; "/usr/bin/pkexec" --disable-internal-agent /bin/bash -c "echo SUDOPROMPT; sh '/tmp/tmp-1683OiD12Fzl2VQu.cmd'"
/tmp/tmp-1683OiD12Fzl2VQu.cmd: line 64: /run/user/1000/appimagelauncherfs/0000.AppImage: Permission denied
"

The issue is solved by deleting the package appimagelauncher and rebooting the system (not sure if the reboot is really necessary, but I did it and it worked). Others might need to also remove libappimage (from extra) but that was not the case for me.

Referenced forum solution: https://forum.manjaro.org/t/solved-appimage-woes-when-building-package/86654/6

Steps to reproduce:

Note: You need to have DevTools open in etcher before doing these steps in order to see the logs (CTRL+SHIFT+I) (I, not L)

  1. Ensure community/appimagelauncher is installed (the issue could arise because of extra/libappimage as well, given the forum post that I read but it was not installed in my case; 1.1 To verify if one (or both) of these packages is installed, run sudo pacman -Ss appimage;
  2. Follow the steps to flash an external device in etcher's UI with any valid combination of external drive & image (you can use the image I linked in this post);
  3. Notice the following error:

image

The devtools shows the following stacktrace:

"Error: Command failed: cd "/home/simon"; "/usr/bin/pkexec" --disable-internal-agent /bin/bash -c "echo SUDOPROMPT; sh '/tmp/tmp-1683OiD12Fzl2VQu.cmd'"
/tmp/tmp-1683OiD12Fzl2VQu.cmd: line 64: /run/user/1000/appimagelauncherfs/0000.AppImage: Permission denied

    at ChildProcess.exithandler (child_process.js:303:12)
    at ChildProcess.emit (events.js:182:13)
    at maybeClose (internal/child_process.js:961:16)
    at Socket.stream.socket.on (internal/child_process.js:380:11)
    at Socket.emit (events.js:182:13)
    at Pipe._handle.close [as _onclose] (net.js:596:12)"

I didn't push further to understand exactly what was going on but I thought I'd document it for others because finding out the solution was a very frustrating process for me.

Cheers !

Niceplace commented 5 years ago

Since this is solved I believe it can be closed but I'll leave it open for a few days in case people need to see it. If the project contributors decide differently, I fully understand.

thundron commented 5 years ago

Thanks for the report, very detailed and useful. Closing, will reference if other users encounter the same issue

endorama commented 3 years ago

I had the same issue today, and solved as described.

I reinstalled appimagelauncher (version 2.2.0) afterwards and is now working as expected even with it installed. balenaEtcher version 1.5.116.

cmfcruz commented 3 years ago

A user in this forum thread suggests that the etcher package from pacman works for him.

jellyfish-bot commented 3 years ago

[cmfcruz] This issue has attached support thread https://jel.ly.fish/a8f51918-8cb0-4b26-99ee-8dfddd98f07f

Ghanajoke commented 2 years ago

file:///home/Hassan/Downloads/%01%90F@@%E8%D7%02@8%08@ when i run etcher, a file appears with 'invalid encoding' and nothing happens.