// Parse runtime bytecode
const cbor = extractCBOR(bytecode);
+ if (cbor.includes(NaN)) {
+ result.insertAdjacentText('beforeend', '❌ Failed to extract CBOR metadata from bytecode.');
+ button.disabled = false;
+ spinner.style.setProperty('visibility', 'hidden');
+ return;
+ }
logOutput(result, '✅ Successfully extracted CBOR metadata.', cbor.map(v => v.toString(16).padStart(2, '0')).join(''));
const metadata = decodeCBOR(cbor);
logOutput(result, '✅ Successfully decoded CBOR metadata.', JSON.stringify(metadata, null, 2));