If one of the UTXOs for a transaction comes from a segwit transaction, and the transaction itself is non-segwit, then an internal error is triggered on the Ledger app.
I believe this is caused by the JS library sending a segwit formatted TX to the hardware device for preparing a trusted input. I only tested this with P2SH transactions, but I believe it to be the case for the normal P2PKH transactions as well (it looks like it makes the same assumption that all inputs to a P2PKH transaction will be non-segwit).
If one of the UTXOs for a transaction comes from a segwit transaction, and the transaction itself is non-segwit, then an internal error is triggered on the Ledger app.
See this issue:
https://github.com/LedgerHQ/ledger-app-btc/issues/57
I am pretty sure that the issue is somewhere around here for single-sig TXs:
https://github.com/LedgerHQ/ledgerjs/blob/master/packages/hw-app-btc/src/Btc.js#L561
And here for P2SH TXs:
https://github.com/LedgerHQ/ledgerjs/blob/master/packages/hw-app-btc/src/Btc.js#L832
I believe this is caused by the JS library sending a segwit formatted TX to the hardware device for preparing a trusted input. I only tested this with P2SH transactions, but I believe it to be the case for the normal P2PKH transactions as well (it looks like it makes the same assumption that all inputs to a P2PKH transaction will be non-segwit).