Author

Topic: Mycelium error when trying send coins with ledger nano s (Read 221 times)

HCP
legendary
Activity: 2086
Merit: 4361
As the error said "No script code for com.mrd.bitlib.model.scriptinput" so I think the issue is not from mycelium. The error seems no script code comes from ledger nano to import to com.mrd.bitlib.model.

I suggest you report this on ledger support https://support.ledger.com/hc/en-us/requests/new

It seems that there is something wrong with java source code from the ledger that is why you are getting this error.
That's not how it works... wallets don't import java source code from a Ledger device...

What is happening is that Mycelium is finding something "unexpected" when attempting to create the transaction via the Ledger, so it throws this "No scriptcode" error. The error is thrown here in the getScriptCode() method of the TransactionInput Class:
https://github.com/mycelium-com/wallet-android/blob/master/bitlib/src/main/java/com/mrd/bitlib/model/TransactionInput.java#L92

We can see from the code that it is checking if the "script" that it is trying to process is either "P2WSH" or "P2WPKH":
...
      if (script instanceof ScriptInputP2WSH) {
         throw new NotImplementedError();
      } else if (script instanceof ScriptInputP2WPKH) {
...
#doStuff
...
      } else {
         throw new IllegalArgumentException("No scriptcode for " + script.getClass().getCanonicalName());
      }
...
If it is neither of those script "types"... it throws the IllegalArgumentException and we get the "no scriptcode" error.


Again, I suggest that you contact the Mycelium devs using their GitHub issues register and log this error... it seems like the wallet is doing something that results in getting an "unexpected" script type (possibly trying to combine legacy and SegWit inputs? Huh). Definitely something the devs would be interested in looking into.
legendary
Activity: 3374
Merit: 3095
Playbet.io - Crypto Casino and Sportsbook
As the error said "No script code for com.mrd.bitlib.model.scriptinput" so I think the issue is not from mycelium. The error seems no script code comes from ledger nano to import to com.mrd.bitlib.model.

I suggest you report this on ledger support https://support.ledger.com/hc/en-us/requests/new

It seems that there is something wrong with java source code from the ledger that is why you are getting this error.
sr. member
Activity: 459
Merit: 251
-snip-


-snip-

Thanks for reply, i tried 1 option and not working. After i connect ledger to PC, at the time i open this thread i not was home,  the coins was on both legacy, and segwit address.

Last time when i send coins from ledger nano s with mycelium app coins went from segwit "3" Bitcoin starting address to a legacy bitcoin address "1" and there was two inputs when i try to send from mycelium app 2 inputs / 2 outputs so i think mycelium try to combine both (segwit, legacy ) and because of this not working.

Mycelium app is up to date.

I send after coins from ledger live once i get home and works, i had coins on both legacy, and segwit. I think the problem is mycelium app because when i send coins from mycelium goes from segwit to legacy address.
copper member
Activity: 2142
Merit: 1305
Limited in number. Limitless in potential.
Just an update, I just faced this issue in mycelium, tried to clear cache the app, then still that error pops, after I click the send button or after I confirm the transaction in my ledger. So using electrum helps me with this.
copper member
Activity: 2142
Merit: 1305
Limited in number. Limitless in potential.
Try to double check if your mycelium app is up to date, if yes try to follow what HCP said. Also, are you sure that the ledger is the correct wallet for the account on your mycelium? Coz one time I encountered some error while I'm going to send using ledger and mycelium, as a bit lazy I didn't notice yet until such time that I use a different ledger (coz i'm using 2 of them).
HCP
legendary
Activity: 2086
Merit: 4361
Do you have to know if the coins in your Nano S wallet are in legacy address(es) (starts with "1")... or in a SegWit address(es) (starts with "3")?

The only things I can suggest are relatively obvious:

1. Try and reset the Mycelium app on your device (clear cache only first... then try cache+data if that doesn't work)... note that clearing data will wipe ALL of the data for Mycelium app
2. Try your Nano S with another device (laptop/desktop etc) and try using the Ledger Live software.

If #1 doesn't work, and #2 isn't an option... then you might be better off logging the issue on the Mycelium GitHub...
sr. member
Activity: 459
Merit: 251
Hi. I have some coins on my ledger nano s and want to send some of them to a website but after i press send on mycelium i get this error



What i should do?
Jump to: