scientifichackers / flutter-rx-ble

A Flutter BLE plugin, based on RxAndroidBle and RxBluetoothKit.
GNU Lesser General Public License v3.0
35 stars 18 forks source link

Exception around 30/40 seconds after the connection is stablished #4

Closed 01xJoao closed 5 years ago

01xJoao commented 5 years ago

I get a exception here:

      final stream = PluginScaffold.createStream(channel, "connect", {
        "deviceId": deviceId,
        "waitForDevice": waitForDevice,
      }).map((it) {
        return BleConnectionState.values[it];
      }).handleError((e) {
        rethrowException(e);
      });

code:"Connection error has occured: The connection has timed out unexpectedly."
message:"The operation couldn’t be completed. (RxBluetoothKit.BluetoothError error 4.)"
details:"0   plugin_scaffold                     0x0000000102733e50 $s15plugin_scaffold14serializeErrorySo07FlutterD0CypF + 316\n1   plugi…"

full error:

PlatformException (PlatformException(Connection error has occured: The connection has timed out unexpectedly., The operation couldn’t be completed. (RxBluetoothKit.BluetoothError error 4.), 0   plugin_scaffold                     0x0000000102733e50 $s15plugin_scaffold14serializeErrorySo07FlutterD0CypF + 316\n1   plugin_scaffold                     0x0000000102735b74 $s15plugin_scaffold7trySendyyyypSgc_ACyKcSgtFyycfU_ + 544\n2   plugin_scaffold                     0x00000001027351d0 $sIeg_IeyB_TR + 52\n3   plugin_scaffold                     0x00000001027335d0 +[PluginScaffoldHelper tryCatch:onCatch:onElse:] + 108\n4   plugin_scaffold                     0x0000000102735874 $s15plugin_scaffold7trySendyyyypSgc_ACyKcSgtF + 792\n5   plugin_scaffold                     0x0000000102736194 $s15plugin_scaffold12trySendErroryyyypSgc_s0E0_ptF + 192\n6   rx_ble                              0x0000000104ae3e14 $s6rx_ble14ConnectMethodsC8onListen2id4args4sinkySi_ypSgyAHctKFys5Error_pcfU1_ + 120\n7   RxSwift                             0x000000010476f340 $s7RxSwift14ObservableTypePAAE9subscribe6onNext0F5Error0F9Completed0F8DisposedAA10Disposable_py7ElementQzcSg_ys0H0_pcSgyycSgAOtFyAA5EventOyAKGcfU_ + 952\n8   RxSwift                             0x000000010476f688 $s7RxSwift14ObservableTypePAAE9subscribe6onNext0F5Error0F9Completed0F8DisposedAA10Disposable_py7ElementQzcSg_ys0H0_pcSgyycSgAOtFyAA5EventOyAKGcfU_TA + 88\n9   RxSwift                             0x000000010469f54c $s7RxSwift17AnonymousObserverC6onCoreyyAA5EventOyxGF + 160\n10  RxSwift                             0x00000001047776f8 $s7RxSwift12ObserverBaseC2onyyAA5EventOyxGF + 380\n11  RxSwift                             0x00000001047779fc $s7RxSwift12ObserverBaseCyxGAA0C4TypeA2aEP2onyyAA5EventOy7ElementQzGFTW + 28\n12  RxSwift                             0x00000001047c97cc $s7RxSwift4SinkC9forwardOnyyAA5EventOy7ElementQzGF + 288\n13  RxSwift                             0x0000000104717764 $s7RxSwift12DeferredSink33_9A640CB28D6420293D75F113534DFAC6LLC2onyyAA5EventOy7ElementQzGF + 260\n14  RxSwift                             0x0000000104718364 $s7RxSwift12DeferredSink33_9A640CB28D6420293D75F113534DFAC6LLCyxq_GAA12ObserverTypeA2aFP2onyyAA5EventOy7ElementQzGFTW + 20\n15  RxSwift                             0x00000001047c97cc $s7RxSwift4SinkC9forwardOnyyAA5EventOy7ElementQzGF + 288\n16  RxSwift                             0x0000000104709b64 $s7RxSwift23AnonymousObservableSink33_95EBF5692819D58425EC2DD0512D115ALLC2onyyAA5EventOy7ElementQzGF + 512\n17  RxSwift                             0x0000000104709fd8 $s7RxSwift23AnonymousObservableSink33_95EBF5692819D58425EC2DD0512D115ALLCyxGAA12ObserverTypeA2aFP2onyyAA5EventOy7ElementQzGFTW + 20\n18  RxSwift                             0x00000001046a0e14 $sTA + 132\n19  RxSwift                             0x00000001046a02b8 $s7RxSwift11AnyObserverV2onyyAA5EventOyxGF + 156\n20  RxBluetoothKit                      0x0000000104587c88 $s7RxSwift14ObservableTypeP0A12BluetoothKitE6absorbyAA0C0Cy7ElementQzGAJ_AJtFZAA10Disposable_pAA11AnyObserverVyAIGcfU_yAA5EventOyAIGcfU_ + 276\n21  RxSwift                             0x00000001046a02b8 $s7RxSwift11AnyObserverV2onyyAA5EventOyxGF + 156\n22  RxSwift                             0x00000001046a0334 $s7RxSwift11AnyObserverVyxGAA0D4TypeA2aEP2onyyAA5EventOy7ElementQzGFTW + 28\n23  RxSwift                             0x00000001047c97cc $s7RxSwift4SinkC9forwardOnyyAA5EventOy7ElementQzGF + 288\n24  RxSwift                             0x0000000104717764 $s7RxSwift12DeferredSink33_9A640CB28D6420293D75F113534DFAC6LLC2onyyAA5EventOy7ElementQzGF + 260\n25  RxSwift                             0x0000000104718364 $s7RxSwift12DeferredSink33_9A640CB28D6420293D75F113534DFAC6LLCyxq_GAA12ObserverTypeA2aFP2onyyAA5EventOy7ElementQzGFTW + 20\n26  RxSwift                             0x00000001047c97cc $s7RxSwift4SinkC9forwardOnyyAA5EventOy7ElementQzGF + 288\n27  RxSwift                             0x000000010475e818 $s7RxSwift13MergeSinkIter33_DDEA0423368B3B462AE46699A4D080E1LLC2onyyAA5EventOy7ElementQy_GF + 752\n28  RxSwift                             0x000000010475ead8 $s7RxSwift13MergeSinkIter33_DDEA0423368B3B462AE46699A4D080E1LLCyxq_q0_GAA12ObserverTypeA2aFP2onyyAA5EventOy7ElementQzGFTW + 20\n29  RxSwift                             0x00000001047c97cc $s7RxSwift4SinkC9forwardOnyyAA5EventOy7ElementQzGF + 288\n30  RxSwift                             0x0000000104709b64 $s7RxSwift23AnonymousObservableSink33_95EBF5692819D58425EC2DD0512D115ALLC2onyyAA5EventOy7ElementQzGF + 512\n31  RxSwift                             0x0000000104709fd8 $s7RxSwift23AnonymousObservableSink33_95EBF5692819D58425EC2DD0512D115ALLCyxGAA12ObserverTypeA2aFP2onyyAA5EventOy7ElementQzGFTW + 20\n32  RxSwift                             0x00000001046a0e14 $sTA + 132\n33  RxSwift                             0x00000001046a02b8 $s7RxSwift11AnyObserverV2onyyAA5EventOyxGF + 156\n34  RxSwift                             0x00000001046a0334 $s7RxSwift11AnyObserverVyxGAA0D4TypeA2aEP2onyyAA5EventOy7ElementQzGFTW + 28\n35  RxSwift                             0x0000000104777e44 $s7RxSwift12ObserverTypePAAE7onErroryys0F0_pF + 276\n36  RxBluetoothKit                      0x000000010457db88 $s14RxBluetoothKit9ConnectorC26createConnectionObservable33_C41EBD4B98901DB4B555AC263BA83B02LL3for7options0A5Swift0G0CyAA10PeripheralCGAL_SDySSypGSgtFAH10Disposable_pAH11AnyObserverVyALGcfU_ys5Error_pcfU4_ + 176\n37  RxSwift                             0x000000010476f340 $s7RxSwift14ObservableTypePAAE9subscribe6onNext0F5Error0F9Completed0F8DisposedAA10Disposable_py7ElementQzcSg_ys0H0_pcSgyycSgAOtFyAA5EventOyAKGcfU_ + 952\n38  RxSwift                             0x000000010476f688 $s7RxSwift14ObservableTypePAAE9subscribe6onNext0F5Error0F9Completed0F8DisposedAA10Disposable_py7ElementQzcSg_ys0H0_pcSgyycSgAOtFyAA5EventOyAKGcfU_TA + 88\n39  RxSwift                             0x000000010469f54c $s7RxSwift17AnonymousObserverC6onCoreyyAA5EventOyxGF + 160\n40  RxSwift                             0x00000001047776f8 $s7RxSwift12ObserverBaseC2onyyAA5EventOyxGF + 380\n41  RxSwift                             0x00000001047779fc $s7RxSwift12ObserverBaseCyxGAA0C4TypeA2aEP2onyyAA5EventOy7ElementQzGFTW + 28\n42  RxSwift                             0x00000001047c97cc $s7RxSwift4SinkC9forwardOnyyAA5EventOy7ElementQzGF + 288\n43  RxSwift                             0x000000010475e818 $s7RxSwift13MergeSinkIter33_DDEA0423368B3B462AE46699A4D080E1LLC2onyyAA5EventOy7ElementQy_GF + 752\n44  RxSwift                             0x000000010475ead8 $s7RxSwift13MergeSinkIter33_DDEA0423368B3B462AE46699A4D080E1LLCyxq_q0_GAA12ObserverTypeA2aFP2onyyAA5EventOy7ElementQzGFTW + 20\n45  RxSwift                             0x00000001047c97cc $s7RxSwift4SinkC9forwardOnyyAA5EventOy7ElementQzGF + 288\n46  RxSwift                             0x000000010474de7c $s7RxSwift7MapSink33_5428EFA9A9B0C0340021B871D2E5AC01LLC2onyyAA5EventOyxGF + 1536\n47  RxSwift                             0x000000010474e930 $s7RxSwift7MapSink33_5428EFA9A9B0C0340021B871D2E5AC01LLCyxq_GAA12ObserverTypeA2aFP2onyyAA5EventOy7ElementQzGFTW + 20\n48  RxSwift                             0x00000001047c97cc $s7RxSwift4SinkC9forwardOnyyAA5EventOy7ElementQzGF + 288\n49  RxSwift                             0x000000010473072c $s7RxSwift6DoSink33_51F9E615740E91B2E920965FFBB1EED3LLC2onyyAA5EventOy7ElementQzGF + 356\n50  RxSwift                             0x000000010473152c $s7RxSwift6DoSink33_51F9E615740E91B2E920965FFBB1EED3LLCyxGAA12ObserverTypeA2aFP2onyyAA5EventOy7ElementQzGFTW + 20\n51  RxSwift                             0x00000001047c97cc $s7RxSwift4SinkC9forwardOnyyAA5EventOy7ElementQzGF + 288\n52  RxSwift                             0x00000001047e3b70 $s7RxSwift13TakeCountSink33_E3A91BB23FA62C45FF8D35F61C248DA3LLC2onyyAA5EventOy7ElementQzGF + 724\n53  RxSwift                             0x00000001047e47e4 $s7RxSwift13TakeCountSink33_E3A91BB23FA62C45FF8D35F61C248DA3LLCyxGAA12ObserverTypeA2aFP2onyyAA5EventOy7ElementQzGFTW + 20\n54  RxSwift                             0x00000001047c97cc $s7RxSwift4SinkC9forwardOnyyAA5EventOy7ElementQzGF + 288\n55  RxSwift                             0x000000010473a54c $s7RxSwift10FilterSink33_172A575932639FDD42969ED91F7BE949LLC2onyyAA5EventOy7ElementQzGF + 704\n56  RxSwift                             0x000000010473b22c $s7RxSwift10FilterSink33_172A575932639FDD42969ED91F7BE949LLCyxGAA12ObserverTypeA2aFP2onyyAA5EventOy7ElementQzGFTW + 20\n57  RxSwift                             0x00000001046a0e14 $sTA + 132\n58  RxSwift                             0x00000001046a8d80 $s7RxSwift5EventOyxGIegn_ADytIegnr_7ElementQyd__RszAA12ObserverTypeRd__r__lTR + 20\n59  RxSwift                             0x00000001046a93b8 $s7RxSwift5EventOyxGytIegnr_ADIegn_lTR + 28\n60  RxSwift                             0x00000001046ab430 $s7RxSwift8dispatchyyAA3BagVyyAA5EventOyxGcG_AGtlF + 1036\n61  RxSwift                             0x0000000104789bb4 $s7RxSwift14PublishSubjectC2onyyAA5EventOyxGF + 176\n62  RxSwift                             0x000000010478b6a8 $s7RxSwift14PublishSubjectCyxGAA12ObserverTypeA2aEP2onyyAA5EventOy7ElementQzGFTW + 20\n63  RxSwift                             0x0000000104777bec $s7RxSwift12ObserverTypePAAE6onNextyy7ElementQzF + 308\n64  RxBluetoothKit                      0x000000010455e700 $s14RxBluetoothKit31CBCentralManagerDelegateWrapperC07centralE0_23didDisconnectPeripheral5errorySo0dE0C_So12CBPeripheralCs5Error_pSgtF + 492\n65  RxBluetoothKit                      0x000000010455ead0 $s14RxBluetoothKit31CBCentralManagerDelegateWrapperC07centralE0_23didDisconnectPeripheral5errorySo0dE0C_So12CBPeripheralCs5Error_pSgtFTo + 168\n66  CoreBluetooth                       0x00000001b1896444 <redacted> + 232\n67  CoreBluetooth                       0x00000001b1897240 <redacted> + 620\n68  CoreBluetooth                       0x00000001b18a5488 <redacted> + 60\n69  libdispatch.dylib                   0x00000001ab870a38 <redacted> + 24\n70  libdispatch.dylib                   0x00000001ab8717d4 <redacted> + 16\n71  libdispatch.dylib                   0x00000001ab84cdec <redacted> + 548\n72  libdispatch.dylib                   0x00000001ab84d964 <redacted> + 464\n73  libdispatch.dylib                   0x00000001ab8518d4 <redacted> + 736\n74  CoreFoundation                      0x00000001abdc1ec0 <redacted> + 12\n75  CoreFoundation                      0x00000001abdbcdf8 <redacted> + 1924\n76  CoreFoundation                      0x00000001abdbc354 CFRunLoopRunSpecific + 436\n77  GraphicsServices                    0x00000001adfbc79c GSEventRunModal + 104\n78  UIKitCore                           0x00000001d83a7b68 UIApplicationMain + 212\n79  Runner                              0x000000010268d76c main + 124\n80  libdyld.dylib                       0x00000001ab8828e0 <redacted> + 4))
01xJoao commented 5 years ago

Actually this happens when I turn off the device.