Comments (12)
I had similar issue and in my case there were some bad-characters in my bash-history, it looks like:
$ cat .bash_history
1 │ �^Awhich psql
2 │ ^@exit
3 │ ^@ksh
4 | ls -l
5 | mkdir rex
6 | ..
So I performed following steps:
- Removed bad lines in ~/.bash_history (i.e. 1,2,3 in this case)
- Deleted ~/.mcfly/history.db
- source "$(brew --prefix)/opt/mcfly/mcfly.bash" ## For me, it was installed via homebrew
- RUST_BACKTRACE=1 mcfly -d search
and then mcfly was working just fine, I guess it has issue in importing non-ASCII characters from .bash_history.
from mcfly.
Woah, very weird. If you rm ~/.mcfly/history.db
, does it happen again?
from mcfly.
Now it's this error:
RUST_BACKTRACE=1 mcfly -d search
thread 'main' panicked at 'Please ensure that MCFLY_SESSION_ID contains a random session ID.: NotPresent', libcore/result.rs:1009:5
stack backtrace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
1: std::panicking::default_hook::{{closure}}
at libstd/sys_common/backtrace.rs:71
2: std::panicking::rust_panic_with_hook
at libstd/panicking.rs:227
at libstd/panicking.rs:476
3: std::panicking::continue_panic_fmt
at libstd/panicking.rs:390
4: rust_begin_unwind
at libstd/panicking.rs:325
5: core::panicking::panic_fmt
at libcore/panicking.rs:77
6: core::result::unwrap_failed
7: mcfly::settings::Settings::parse_args
8: mcfly::main
9: std::rt::lang_start::{{closure}}
10: main
11: __libc_start_main
12: _start
from mcfly.
It sounds like mcfly.bash
isn't loaded in your shell? That should be setting MCFLY_SESSION_ID
from mcfly.
You're right. Initially, i had a similar error when loading the mcfly.bash.
Afterwards i only tested with "mcfly search".
Anyway, after removing the db file it seems to work :)
from mcfly.
Glad it's working!
from mcfly.
@mehta, were you on v0.2.4 or newer when this happened?
from mcfly.
@mehta, were you on v0.2.4 or newer when this happened?
$ brew info mcfly
cantino/mcfly/mcfly: stable v0.3.1
...
from mcfly.
I'm trying McFly 0.3.3
(binary release x64 and manual install) on Debian 9 and I'm encountering the same error
McFly: Upgrading McFly DB to version 3, please wait...thread 'main' panicked at 'McFly error: Unable to add cmd_tpl to commands: SqliteFailure(Error { code: Unknown, extended_code: 1 }, Some("duplicate column name: cmd_tpl"))', src/libcore/result.rs:1009:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
Setting export RUST_BACKTRACE=1
adds the following backtrace
stack backtrace:
0: <unknown>
1: <unknown>
2: <unknown>
3: <unknown>
4: <unknown>
5: <unknown>
6: <unknown>
7: <unknown>
8: <unknown>
9: main
10: __libc_start_main
11: <unknown>
For me mcfly.bash
is properly sourced (MCFLY_SESSION_ID and MCFLY_HISTORY are set)
Here is the result of export RUST_BACKTRACE=1 && rm ~/.mcfly/history.db
McFly: Importing Bash history for the first time. This may take a minute or two...thread 'main' panicked at 'McFly error: Insert to work: NulError(NulError(0, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 49, 53, 51, 56, 56, 49, 51, 53, 49, 54]))', src/libcore/result.rs:1009:5
stack backtrace:
0: <unknown>
1: <unknown>
2: <unknown>
3: <unknown>
4: <unknown>
5: <unknown>
6: <unknown>
7: <unknown>
8: <unknown>
9: main
10: __libc_start_main
11: <unknown>
Fixed like in #17 (comment), had non-printable characters in my history, they would show up in less
like @^^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@#1553851840
. For whatever reason they wouldn't show with grep -aPn '[^\x00-\x7F]' ~/.bash_history
or any similar command, but I could find the right line with cat -en ~/.bash_history | grep "@^"
from mcfly.
That looks like a new error, @Lomanic. I'll make a new issue for it.
from mcfly.
Hi @cantino, could we add this to the readme.md
or something like troubleshooting.md
?
- Removed bad lines in ~/.bash_history (i.e. 1,2,3 in this case)
- Deleted ~/.mcfly/history.db
- source "$(brew --prefix)/opt/mcfly/mcfly.bash" ## For me, it was installed via homebrew
- RUST_BACKTRACE=1 mcfly -d search
from mcfly.
@jesusfj710 Sure, would you mind sending a PR?
from mcfly.
Related Issues (20)
- MCFLY_DISABLE_MENU is not used in any way since v0.8.0 HOT 1
- mcfly crashes when used inside IntelliJ terminal
- please update new version to fixed error HOT 1
- [QUESTION] is there anyway to reduce padding from the terminal border on mcfly version >= 0.8.0 ? HOT 1
- Introduce rhis, A Modified Version of McFly HOT 1
- Failed Installation via homebrew HOT 1
- Visibility Issue with colorscheme
- mcfly stopped working (kernel issue) HOT 15
- feature request - CLI option to dump the sqlite3 db HOT 7
- Integrate with Atuin HOT 5
- thread 'main' panicked : database disk image is malformed HOT 2
- thread 'main' panicked at 'McFly error occurs each time I run some command. HOT 2
- Can't search command with '-' arguments in PowerShell
- have sane default colors HOT 1
- mcfly prints arguments when moving files around HOT 2
- Draft releases messed up HOT 4
- zsh-vi-mode conflict
- Allow <TAB> to cycle through options instead of select HOT 3
- Allow ENTER to select the command and put it on commandline
- Handle multiple commands separated by "\n" in Fish shell HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mcfly.