Title: Unexpected magic characters Post by: kryptopojken on August 19, 2017, 10:56:07 AM I have a wallet file, that is protected by Trezor. However, after an update (which resulted in a split to 2 wallet files) I get "Unexpected magic characters" everytime I open the wallet in Electrum. When trying to send the funds to another wallet I get:
Electrum cannot pair with your TREZOR. Before you request bitcoins to be sent to addresses in this wallet, ensure you can pair with your device, or that you have its seed (and passphrase, if any). Otherwise all bitcoins you receive will be unspendable. Would appreciate any help! I use the newest Electrum wallet on OSX Title: Re: Unexpected magic characters Post by: jackg on August 19, 2017, 05:27:17 PM I have a wallet file, that is protected by Trezor. However, after an update (which resulted in a split to 2 wallet files) I get "Unexpected magic characters" everytime I open the wallet in Electrum. When trying to send the funds to another wallet I get: Electrum cannot pair with your TREZOR. Before you request bitcoins to be sent to addresses in this wallet, ensure you can pair with your device, or that you have its seed (and passphrase, if any). Otherwise all bitcoins you receive will be unspendable. Would appreciate any help! I use the newest Electrum wallet on OSX Is your trezor wallet the latest version? Do you have a backup of your wallet when there was just one wallet file (not the files that split). I don't know how they can split as they both use HD wallets so splitting the files would do nothing. If not, and you have the seed, try restarting on a new paring if you haven't already. Title: Re: Unexpected magic characters Post by: kryptopojken on August 20, 2017, 06:20:46 AM I have a wallet file, that is protected by Trezor. However, after an update (which resulted in a split to 2 wallet files) I get "Unexpected magic characters" everytime I open the wallet in Electrum. When trying to send the funds to another wallet I get: Electrum cannot pair with your TREZOR. Before you request bitcoins to be sent to addresses in this wallet, ensure you can pair with your device, or that you have its seed (and passphrase, if any). Otherwise all bitcoins you receive will be unspendable. Would appreciate any help! I use the newest Electrum wallet on OSX Is your trezor wallet the latest version? Do you have a backup of your wallet when there was just one wallet file (not the files that split). I don't know how they can split as they both use HD wallets so splitting the files would do nothing. If not, and you have the seed, try restarting on a new paring if you haven't already. It's the previous version of trezor wallet (the update just came out a few days ago so it's irrelevant) I don't have the one wallet backup file, and I don't really see why wiping the trezor would help? please advise Title: Re: Unexpected magic characters Post by: jackg on August 20, 2017, 12:17:36 PM I have a wallet file, that is protected by Trezor. However, after an update (which resulted in a split to 2 wallet files) I get "Unexpected magic characters" everytime I open the wallet in Electrum. When trying to send the funds to another wallet I get: Electrum cannot pair with your TREZOR. Before you request bitcoins to be sent to addresses in this wallet, ensure you can pair with your device, or that you have its seed (and passphrase, if any). Otherwise all bitcoins you receive will be unspendable. Would appreciate any help! I use the newest Electrum wallet on OSX Is your trezor wallet the latest version? Do you have a backup of your wallet when there was just one wallet file (not the files that split). I don't know how they can split as they both use HD wallets so splitting the files would do nothing. If not, and you have the seed, try restarting on a new paring if you haven't already. It's the previous version of trezor wallet (the update just came out a few days ago so it's irrelevant) I don't have the one wallet backup file, and I don't really see why wiping the trezor would help? please advise IF you have the seed, resetting both files could get your one wallet file back and produce the one HD walet that is needed instead of having two HD wallets under what I assume is the same seed (unless both have different seeds)? Title: Re: Unexpected magic characters Post by: kryptopojken on August 20, 2017, 07:07:14 PM I have a wallet file, that is protected by Trezor. However, after an update (which resulted in a split to 2 wallet files) I get "Unexpected magic characters" everytime I open the wallet in Electrum. When trying to send the funds to another wallet I get: Electrum cannot pair with your TREZOR. Before you request bitcoins to be sent to addresses in this wallet, ensure you can pair with your device, or that you have its seed (and passphrase, if any). Otherwise all bitcoins you receive will be unspendable. Would appreciate any help! I use the newest Electrum wallet on OSX Is your trezor wallet the latest version? Do you have a backup of your wallet when there was just one wallet file (not the files that split). I don't know how they can split as they both use HD wallets so splitting the files would do nothing. If not, and you have the seed, try restarting on a new paring if you haven't already. IF you have the seed, resetting both files could get your one wallet file back and produce the one HD walet that is needed instead of having two HD wallets under what I assume is the same seed (unless both have different seeds)? First off, thanks so much for your responses! I have a brand new Trezor here, what do u suggest I do? Just reset it with my seed and then connect to Electrum? It's the previous version of trezor wallet (the update just came out a few days ago so it's irrelevant) I don't have the one wallet backup file, and I don't really see why wiping the trezor would help? please advise Title: Re: Unexpected magic characters Post by: kryptopojken on August 22, 2017, 05:08:56 PM Anyone had this problem?
$20 in btc to anyone who can solve this problem Title: Re: Unexpected magic characters Post by: jackg on August 22, 2017, 06:06:49 PM I have a wallet file, that is protected by Trezor. However, after an update (which resulted in a split to 2 wallet files) I get "Unexpected magic characters" everytime I open the wallet in Electrum. When trying to send the funds to another wallet I get: Electrum cannot pair with your TREZOR. Before you request bitcoins to be sent to addresses in this wallet, ensure you can pair with your device, or that you have its seed (and passphrase, if any). Otherwise all bitcoins you receive will be unspendable. Would appreciate any help! I use the newest Electrum wallet on OSX Is your trezor wallet the latest version? Do you have a backup of your wallet when there was just one wallet file (not the files that split). I don't know how they can split as they both use HD wallets so splitting the files would do nothing. If not, and you have the seed, try restarting on a new paring if you haven't already. IF you have the seed, resetting both files could get your one wallet file back and produce the one HD walet that is needed instead of having two HD wallets under what I assume is the same seed (unless both have different seeds)? First off, thanks so much for your responses! I have a brand new Trezor here, what do u suggest I do? Just reset it with my seed and then connect to Electrum? It's the previous version of trezor wallet (the update just came out a few days ago so it's irrelevant) I don't have the one wallet backup file, and I don't really see why wiping the trezor would help? please advise Try to do it. You should be able to recover it from your seed anyway. Unless you know the format of the seed and can import it into a wallet on your computer and get the coins out so you can troubleshoot the trezor without risk of losing your funds. It's BIP39 so look for BitcoinJ on this forum and put it on a USB stick with the seed in just so you know the seed was definitely copied correctly in case it was copied wrong. I'm not particularly sure why it would make two wallet files as they're either different wallets or they both share a seed, either way, it seems a little odd. Title: Re: Unexpected magic characters Post by: kryptopojken on August 22, 2017, 11:25:54 PM Don't mess around with your Trezor seed words - the problem is not with your Trezor. There is no need to wipe it either. I would suggest to first ensure that you have the latest Electrum.dmg file from electrum.org Next, open Finder, then select GO --> GO to Folder Enter ~/.electrum in the window that appears. Within the ./electrum directory, erase the config file. Also move (or rename) all the wallets in the wallet sub-directory. Don't worry, your private keys are in your Trezor, not on your computer. The only thing you may loose by erasing an electrum wallet file that was created for a Trezor, are the labels you gave to each transactions. If you don't want to loose that info, just rename or move the file(s) somewhere else. Start Electrum and create a new Standard wallet, with the Hardware wallet option. If Electrum can communicate with your Trezor and create a new wallet at this step, your problem is solved and you should be good to go. If not, you have a problem with your USB cable. The cable supplied with the Trezor is notorious to be of bad quality. Spend a couple of $$ and go buy a good one and that should fix your problem. EDIT: If the creation of the main account (m/44'/0'/0') worked, then you can proceed to create the second account of your Trezor (since it looks like you had setup two accounts on it). The second one should have the derivation of m/44'/0'/1', if you have a third account, m/44'/0'/2', etc. They now have to be different files for each account, make sure you name them accordingly, when you create each new Electrum wallet file. I already did this, every wallet after m/44'/0'/2' is empty :( Title: Re: Unexpected magic characters Post by: kryptopojken on August 23, 2017, 05:49:46 AM Do you have a laptop or iMac? How old is it and which version of macOS it runs? Did you try to install Electrum on another computer? Does the website wallet.trezor.io (http://wallet.trezor.io) works with your Trezor? I have a Macbook Pro, from 2012 and runs El Capitan. I did try Electrum on my Win10 PC as well but didn't work. The website wallet works fine, as my main wallet is there and has never had any problem, it's just this specific wallet that won't work Title: Re: Unexpected magic characters Post by: kryptopojken on August 23, 2017, 11:27:16 AM It only leaves the Trezor firmware that we haven't checked. You should be at version 1.5.2. But i would doubt that it is the problem since wallet.trezor.io works. One thing i don't understand from your responses, is that you said that you were able to create new wallet files following my instructions, up to m'/44'/0'/2'. If that is correct, than your Trezor does communicate with Electrum and your problem should be fixed. ??? Firmware is updated too. No, what I meant was, I can create wallets up to any number, but after m'/44'/0'/2 they are all empty. I haven't tried like m'/44'/0'/9 or so, can it be hiding that high? Title: Re: Unexpected magic characters Post by: kryptopojken on August 27, 2017, 01:10:31 AM Bounty raised to $30 for anyone who solves my problem
Title: Re: Unexpected magic characters Post by: HCP on August 27, 2017, 01:38:07 AM Apologies for coming in late, but I'm a bit confused as to what the exact issue is here... You can connect the Trezor to your computer and it is recognised, but you are unable to get Electrum to show your Trezor wallet correctly?
Can you confirm that you're using Electrum v2.9.3? Title: Re: Unexpected magic characters Post by: celes8 on August 30, 2017, 02:01:37 AM same issue.
fw 1.5.2 electrum v 2.9.3 & 2.9.0 fix: use mytrezor.com wallet and downgraded to 2.8.3 worked for me. Title: Re: Unexpected magic characters Post by: celes8 on August 31, 2017, 01:25:38 AM i can confirm 2.8.2 also works with 1.5.2
just downgrade. Title: Re: Unexpected magic characters Post by: oitdmser on September 29, 2017, 09:51:50 PM I'm having the same issue. Downgrading didn't work for me :(
Title: Re: Unexpected magic characters Post by: nomnomnom on October 09, 2017, 04:43:06 AM I just had this problem on my linux laptop after upgrading python-trezor, protobuf3 and so on.
Turns out in my case the error only happens if the TREZOR is plugged into the USB3 port, in that case trezorctl get_features works the first time, but if called again complains about Unexpected magic characters. After some trial and error it turns out it works fine if I use one of the USB2 ports. So if someone has that problem, try a different USB port. Still feels to me that this is some kind of software issue, because it works with the first call. That was also the symptom in electrum it would detect the trezor (first connection), but then fails when it connects again (magic error). Maybe this bug https://github.com/trezor/python-trezor/issues/76 is not completely fixed? Title: Re: Unexpected magic characters Post by: VincentV on November 01, 2017, 03:17:35 PM Bounty raised to $30 for anyone who solves my problem I can't solve the problem completely, but try this:
It works for me in Electrum 2.9.3 and Electrum-LTC 2.9.3.1 on OSX. Maybe Electrum wants to open/initialize Trezor or USB port too fast during loading of the wallet? Title: Re: Unexpected magic characters Post by: celes8 on November 20, 2017, 05:29:26 AM bump, same issue....
Someone told me that electrum uses an old python library for trezor in its binaries. I tried PMing thomasV to confirm but no reply. ive temporarily moved my hot btc to nano S. Slightly more annoying to use... but it works atleast. Title: Re: Unexpected magic characters Post by: jddebug on November 26, 2017, 02:52:16 AM bump, same issue.... Someone told me that electrum uses an old python library for trezor in its binaries. I tried PMing thomasV to confirm but no reply. ive temporarily moved my hot btc to nano S. Slightly more annoying to use... but it works atleast. Did you ever hear back? I am having the same problem. Electrum 3.0.2 Firmware 1.5.2 Title: Re: Unexpected magic characters Post by: celes8 on November 28, 2017, 12:41:33 AM bump, same issue.... Someone told me that electrum uses an old python library for trezor in its binaries. I tried PMing thomasV to confirm but no reply. ive temporarily moved my hot btc to nano S. Slightly more annoying to use... but it works atleast. Did you ever hear back? I am having the same problem. Electrum 3.0.2 Firmware 1.5.2 negative. im just using my nano s fine. when trezor works again ill re-evaluate. you can roll back your electrum to version 2.7x or something. It works fine Title: Re: Unexpected magic characters Post by: jddebug on November 28, 2017, 11:37:58 PM bump, same issue.... Someone told me that electrum uses an old python library for trezor in its binaries. I tried PMing thomasV to confirm but no reply. ive temporarily moved my hot btc to nano S. Slightly more annoying to use... but it works atleast. Did you ever hear back? I am having the same problem. Electrum 3.0.2 Firmware 1.5.2 negative. im just using my nano s fine. when trezor works again ill re-evaluate. you can roll back your electrum to version 2.7x or something. It works fine kryptopojken and others here. Talking with kyuupichan on irc at #electrum and he suggested enabling the addresses tab in the view menu and then right click an address and choose show on trezor. This worked and the red dot on the trezor icon turned green. Everything seemed to work after that. Maybe give it a try yourself but please, if you send some btc to it, do a very small test amount first to make sure all is well for you too. Title: Re: Unexpected magic characters Post by: Roy Badami on December 03, 2017, 11:40:35 PM The following workaround seems to be giving me some success:
If you get the "unexpected magic characters" error, make sure you have a non-hardware wallet window open in Electrum (create a dummy wallet for this purpose if you don't already have one) and then close your hardware wallet window (or all your hardware wallet windows if you have multiple open - although IME having multiple HW wallets open in Electrum tends not to work well). Then re-open the offending hardware wallet using Electrum's "Open" menu. This seems to work for me quite well (on OS X). YMMV... (EDITED because the above seems to work better than my first suggestion. For the record, my previous suggestion was: "It seems to be that the "unexpected magic characters" message is, at least sometimes, not fatal. Try doing something that requires authentication with the Trezor (such as signing a message) and Electrum might recover....") Title: Re: Unexpected magic characters Post by: celes8 on December 04, 2017, 06:43:00 AM bump, same issue.... Someone told me that electrum uses an old python library for trezor in its binaries. I tried PMing thomasV to confirm but no reply. ive temporarily moved my hot btc to nano S. Slightly more annoying to use... but it works atleast. Did you ever hear back? I am having the same problem. Electrum 3.0.2 Firmware 1.5.2 negative. im just using my nano s fine. when trezor works again ill re-evaluate. you can roll back your electrum to version 2.7x or something. It works fine kryptopojken and others here. Talking with kyuupichan on irc at #electrum and he suggested enabling the addresses tab in the view menu and then right click an address and choose show on trezor. This worked and the red dot on the trezor icon turned green. Everything seemed to work after that. Maybe give it a try yourself but please, if you send some btc to it, do a very small test amount first to make sure all is well for you too. i can confirm this works for me on 3.02 & 1.52 firmware Title: Re: Unexpected magic characters Post by: spiccioli on January 08, 2018, 06:58:16 PM Hi all,
it seems this problem has been identified https://github.com/spesmilo/electrum/issues/3131 Let's hope it gets fixed. I'm on a mac os as well (10.5.x) Regards. spiccioli |