sparrowwallet / sparrow

Desktop Bitcoin Wallet focused on security and privacy. Free and open source.
https://sparrowwallet.com/
Apache License 2.0
1.36k stars 192 forks source link

BBQr zlib issue #1412

Closed scgbckbone closed 6 months ago

scgbckbone commented 6 months ago

Based on this https://twitter.com/w_s_bitcoin/status/1784990543514062946 (error can be seen in video).

Screenshot 2024-05-03 at 08 56 51

2024-05-03 08:56:14,953 ERROR [Thread-1382] c.s.s.i.b.BBQRDecoder [null:-1] Could not parse received QR of type PSBT
com.sparrowwallet.sparrow.io.bbqr.BBQREncodingException: Error inflating with zlib
    at com.sparrowwallet.sparrow@1.8.4/com.sparrowwallet.sparrow.io.bbqr.BBQREncoding$3.decode(Unknown Source)
    at com.sparrowwallet.sparrow@1.8.4/com.sparrowwallet.sparrow.io.bbqr.BBQRHeader.decode(Unknown Source)
    at com.sparrowwallet.sparrow@1.8.4/com.sparrowwallet.sparrow.io.bbqr.BBQRDecoder.receivePart(Unknown Source)
    at com.sparrowwallet.sparrow@1.8.4/com.sparrowwallet.sparrow.control.QRScanDialog$QRResultListener.changed(Unknown Source)
    at com.sparrowwallet.sparrow@1.8.4/com.sparrowwallet.sparrow.control.QRScanDialog$QRResultListener.changed(Unknown Source)
    at javafx.base@18/com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(Unknown Source)
    at javafx.base@18/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(Unknown Source)
    at javafx.base@18/javafx.beans.property.ObjectPropertyBase.fireValueChangedEvent(Unknown Source)
    at javafx.base@18/javafx.beans.property.ObjectPropertyBase.markInvalid(Unknown Source)
    at javafx.base@18/javafx.beans.property.ObjectPropertyBase.set(Unknown Source)
    at com.sparrowwallet.sparrow@1.8.4/com.sparrowwallet.sparrow.control.WebcamService.readQR(Unknown Source)
    at com.sparrowwallet.sparrow@1.8.4/com.sparrowwallet.sparrow.control.WebcamService$1.call(Unknown Source)
    at com.sparrowwallet.sparrow@1.8.4/com.sparrowwallet.sparrow.control.WebcamService$1.call(Unknown Source)
    at javafx.graphics@18/javafx.concurrent.Task$TaskCallable.call(Unknown Source)
    at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
    at javafx.graphics@18/javafx.concurrent.Service.lambda$executeTask$6(Unknown Source)
    at java.base/java.security.AccessController.doPrivileged(Unknown Source)
    at javafx.graphics@18/javafx.concurrent.Service.lambda$executeTask$7(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: invalid block type
    at com.jcraft.jzlib@1.1.3/com.jcraft.jzlib.InflaterInputStream.read(Unknown Source)
    at java.base/java.io.InputStream.readNBytes(Unknown Source)
    at java.base/java.io.InputStream.readAllBytes(Unknown Source)
    ... 21 common frames omitted
2024-05-03 08:56:15,558 ERROR [Thread-1388] c.s.s.i.b.BBQRDecoder [null:-1] Could not parse received QR of type PSBT
com.sparrowwallet.sparrow.io.bbqr.BBQREncodingException: Error inflating with zlib
    at com.sparrowwallet.sparrow@1.8.4/com.sparrowwallet.sparrow.io.bbqr.BBQREncoding$3.decode(Unknown Source)
    at com.sparrowwallet.sparrow@1.8.4/com.sparrowwallet.sparrow.io.bbqr.BBQRHeader.decode(Unknown Source)
    at com.sparrowwallet.sparrow@1.8.4/com.sparrowwallet.sparrow.io.bbqr.BBQRDecoder.receivePart(Unknown Source)
    at com.sparrowwallet.sparrow@1.8.4/com.sparrowwallet.sparrow.control.QRScanDialog$QRResultListener.changed(Unknown Source)
    at com.sparrowwallet.sparrow@1.8.4/com.sparrowwallet.sparrow.control.QRScanDialog$QRResultListener.changed(Unknown Source)
    at javafx.base@18/com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(Unknown Source)
    at javafx.base@18/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(Unknown Source)
    at javafx.base@18/javafx.beans.property.ObjectPropertyBase.fireValueChangedEvent(Unknown Source)
    at javafx.base@18/javafx.beans.property.ObjectPropertyBase.markInvalid(Unknown Source)
    at javafx.base@18/javafx.beans.property.ObjectPropertyBase.set(Unknown Source)
    at com.sparrowwallet.sparrow@1.8.4/com.sparrowwallet.sparrow.control.WebcamService.readQR(Unknown Source)
    at com.sparrowwallet.sparrow@1.8.4/com.sparrowwallet.sparrow.control.WebcamService$1.call(Unknown Source)
    at com.sparrowwallet.sparrow@1.8.4/com.sparrowwallet.sparrow.control.WebcamService$1.call(Unknown Source)
    at javafx.graphics@18/javafx.concurrent.Task$TaskCallable.call(Unknown Source)
    at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
    at javafx.graphics@18/javafx.concurrent.Service.lambda$executeTask$6(Unknown Source)
    at java.base/java.security.AccessController.doPrivileged(Unknown Source)
    at javafx.graphics@18/javafx.concurrent.Service.lambda$executeTask$7(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: invalid stored block lengths
    at com.jcraft.jzlib@1.1.3/com.jcraft.jzlib.InflaterInputStream.read(Unknown Source)
    at java.base/java.io.InputStream.readNBytes(Unknown Source)
    at java.base/java.io.InputStream.readAllBytes(Unknown Source)
    ... 21 common frames omitted
2024-05-03 08:56:15,582 ERROR [JavaFX Application Thread] c.s.s.AppController [null:-1] Error scanning QR
com.sparrowwallet.sparrow.io.bbqr.BBQRException: Error inflating with zlib
    at com.sparrowwallet.sparrow@1.8.4/com.sparrowwallet.sparrow.control.QRScanDialog$QRResultListener.changed(Unknown Source)
    at com.sparrowwallet.sparrow@1.8.4/com.sparrowwallet.sparrow.control.QRScanDialog$QRResultListener.changed(Unknown Source)
    at javafx.base@18/com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(Unknown Source)
    at javafx.base@18/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(Unknown Source)
    at javafx.base@18/javafx.beans.property.ObjectPropertyBase.fireValueChangedEvent(Unknown Source)
    at javafx.base@18/javafx.beans.property.ObjectPropertyBase.markInvalid(Unknown Source)
    at javafx.base@18/javafx.beans.property.ObjectPropertyBase.set(Unknown Source)
    at com.sparrowwallet.sparrow@1.8.4/com.sparrowwallet.sparrow.control.WebcamService.readQR(Unknown Source)
    at com.sparrowwallet.sparrow@1.8.4/com.sparrowwallet.sparrow.control.WebcamService$1.call(Unknown Source)
    at com.sparrowwallet.sparrow@1.8.4/com.sparrowwallet.sparrow.control.WebcamService$1.call(Unknown Source)
    at javafx.graphics@18/javafx.concurrent.Task$TaskCallable.call(Unknown Source)
    at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
    at javafx.graphics@18/javafx.concurrent.Service.lambda$executeTask$6(Unknown Source)
    at java.base/java.security.AccessController.doPrivileged(Unknown Source)
    at javafx.graphics@18/javafx.concurrent.Service.lambda$executeTask$7(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.base/java.lang.Thread.run(Unknown Source)

BBQr is generated by Nunchuk wallet. Q has no problems reading it. Sparrow fails with above. Here is the QR code generated by Nunchuk saved to mp4:

https://github.com/sparrowwallet/sparrow/assets/25349625/6e2b8ecf-c2fd-46b1-9747-8f9dfd03fbc5

Sparrow version 1.8.4 macOS Sonoma 14.4.1

craigraw commented 6 months ago

Duplicate of #1411.