question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Flash instantly fails with linux AppImage and some function in ~/.bashrc

See original GitHub issue
  • Etcher version: ./balenaEtcher-1.5.63-x64.AppImage

  • Operating system and architecture: ubuntu 18.04.3 amd64

  • Image flashed: raspberrypi3-2.43.0+rev1-v10.2.2.img.zip

  • Do you see any meaningful error information in the DevTools?

error 
OperationalError {cause: Error: Command failed: cd "/home/thomas/Downloads"; "/usr/bin/pkexec" --disable-internal-agent /bin/…, isOperational: true, killed: false, code: 2, signal: null, …}
cause
:
Error: Command failed: cd "/home/thomas/Downloads"; "/usr/bin/pkexec" --disable-internal-agent /bin/bash -c "echo SUDOPROMPT; sh '/tmp/tmp-19334YmI5Y68PjJ8v.cmd'" /tmp/tmp-19334YmI5Y68PjJ8v.cmd: 113: export: BASH_FUNC_grep_custom%%: bad variable name 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)
cmd
:
"cd "/home/thomas/Downloads"; "/usr/bin/pkexec" --disable-internal-agent /bin/bash -c "echo SUDOPROMPT; sh '/tmp/tmp-19334YmI5Y68PjJ8v.cmd'""
code
:
2
isOperational
:
true
killed
:
false
signal
:
null
message
:
"Command failed: cd "/home/thomas/Downloads"; "/usr/bin/pkexec" --disable-internal-agent /bin/bash -c "echo SUDOPROMPT; sh '/tmp/tmp-19334YmI5Y68PjJ8v.cmd'"↵/tmp/tmp-19334YmI5Y68PjJ8v.cmd: 113: export: BASH_FUNC_grep_custom%%: bad variable name↵"
name
:
"Error"

The interesting part is:

/tmp/tmp-19334YmI5Y68PjJ8v.cmd: 113: export: BASH_FUNC_grep_custom%%: bad variable name

The generated tmp cmd file contains a list of variables EXPORT coming from my ~/.bashrc:

export BASH_FUNC_declare_grep_exclude_arguments%%='() { <some work> }'

In my ~/.bashrc:

function grep_custom() { <some work> }
export -f grep_custom

The export -f seems to break the script generation which assumes sh and not bash.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
zvincommented, Nov 21, 2019
1reaction
zvincommented, Nov 27, 2019

@thomas-riccardi fixed in v1.5.64

Read more comments on GitHub >

github_iconTop Results From Across the Web

Linux oh-shit moments : r/linux - Reddit
As a hacker and not wanting to download a new Raspbian, I came up with a hacky solution: update dpkg manually, then use...
Read more >
Getting started with the proxmark3 easy - DT Info
This is a Getting Started walk-through for our Proxmark3 Easy hardware. Video Guide Walkthrough I walk through the process outlined in this ...
Read more >
Bash script error: "function: not found". Why would this appear?
A likely cause is that the script doesn't have the execute bit set for the executing user, meaning that it's being read as...
Read more >
Dotfile madness | Hacker News
dotfiles in the home folder are not a new thing on Linux (e.g. .bashrc, .profile, .emacs, etc.), even if it would be better...
Read more >
How To Setup The Perfect Linux Workstation With Xubuntu ...
Every installation is increasingly easy, complete, stable, and fast. It is a great pleasure to use it. I am trying to keep my...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found