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/newIt 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#L92We 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?
). Definitely something the devs would be interested in looking into.