Nethravathitcs / unitt

Automatically exported from code.google.com/p/unitt
0 stars 0 forks source link

WebSocketClient throws exception on incoming request #30

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I'am using the (latest, Oct. 8.) v0.9.4 UnittWebSocketClient binaries. While 
opening the stream, the following exception was thrown:

2011-10-31 22:20:30.233 RemoteLogger[4446:207] -[NSConcreteMutableData 
base64EncodedString]: unrecognized selector sent to instance 0x4e48030
2011-10-31 22:20:30.236 RemoteLogger[4446:207] *** Terminating app due to 
uncaught exception 'NSInvalidArgumentException', reason: 
'-[NSConcreteMutableData base64EncodedString]: unrecognized selector sent to 
instance 0x4e48030'
*** Call stack at first throw:
(
    0   CoreFoundation                      0x0105b5a9 __exceptionPreprocess + 185
    1   libobjc.A.dylib                     0x011af313 objc_exception_throw + 44
    2   CoreFoundation                      0x0105d0bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
    3   CoreFoundation                      0x00fcc966 ___forwarding___ + 966
    4   CoreFoundation                      0x00fcc522 _CF_forwarding_prep_0 + 50
    5   RemoteLogger                        0x0002090d -[WebSocket generateSecKeys] + 189
    6   RemoteLogger                        0x0001f5ab -[WebSocket getRequest:] + 315
    7   RemoteLogger                        0x000219f2 -[WebSocket onSocket:didConnectToHost:port:] + 674
    8   RemoteLogger                        0x00013c55 -[AsyncSocket doStreamOpen] + 405
    9   RemoteLogger                        0x0001a426 -[AsyncSocket doCFWriteStreamCallback:forStream:] + 342
    10  RemoteLogger                        0x0001a7f7 MyCFWriteStreamCallback + 199
    11  CoreFoundation                      0x0100a953 _signalEventSync + 99
    12  CoreFoundation                      0x0100b22e _cfstream_solo_signalEventSync + 126
    13  CoreFoundation                      0x0100a6c9 _CFStreamSignalEvent + 457
    14  CoreFoundation                      0x0100b1a7 CFWriteStreamSignalEvent + 39
    15  CFNetwork                           0x0019fb2f _ZN12SocketStream40dispatchSignalFromSocketCallbackUnlockedEP24SocketStreamSignalHolder + 101
    16  CFNetwork                           0x000fa41d _ZN12SocketStream14socketCallbackEP10__CFSocketmPK8__CFDataPKv + 221
    17  CFNetwork                           0x000fa321 _ZN12SocketStream22_SocketCallBack_streamEP10__CFSocketmPK8__CFDataPKvPv + 117
    18  CoreFoundation                      0x00fd533a __CFSocketDoCallback + 346
    19  CoreFoundation                      0x00fd4eca __CFSocketPerformV0 + 138
    20  CoreFoundation                      0x0103c8ff __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
    21  CoreFoundation                      0x00f9a79d __CFRunLoopDoSources0 + 333
    22  CoreFoundation                      0x00f99d86 __CFRunLoopRun + 470
    23  CoreFoundation                      0x00f99840 CFRunLoopRunSpecific + 208
    24  CoreFoundation                      0x00f99761 CFRunLoopRunInMode + 97
    25  GraphicsServices                    0x017611c4 GSEventRunModal + 217
    26  GraphicsServices                    0x01761289 GSEventRun + 115
    27  UIKit                               0x002bbc93 UIApplicationMain + 1160
    28  RemoteLogger                        0x00002449 main + 121
    29  RemoteLogger                        0x000023c5 start + 53

The method on the top of the stack is [WebSocket generateSecKeys]

Original issue reported on code.google.com by thalerbe...@gmail.com on 31 Oct 2011 at 9:29

GoogleCodeExporter commented 8 years ago
Additional debug output about local variables:

The initailString is an NSCFString with the value of float number,
data is a 16 byte long NSConcreteMutableData,
key is an NSString, but it says "Invalid Summary"

Original comment by thalerbe...@gmail.com on 31 Oct 2011 at 9:34

GoogleCodeExporter commented 8 years ago
Did you remember to set the "-all_load" flag in your linker flags? It looks 
like it is missing a category.

Original comment by josh.mor...@valeosoftware.com on 1 Nov 2011 at 1:35

GoogleCodeExporter commented 8 years ago
I did. Which category is missing? I'll doublecheck the category and the
flag as well.

Original comment by thalerbe...@gmail.com on 1 Nov 2011 at 8:04

GoogleCodeExporter commented 8 years ago
I have been buried at work. I am sorry for the delay. The category is 
NSData+Base64.

Original comment by joshuadmorris@gmail.com on 14 Nov 2011 at 3:09

GoogleCodeExporter commented 8 years ago
No one can blame you, this isn't a commercial project.
Unbelievable, there was a typo in the all_load flag. Sorry for the 
inconvenience. Keep up the good work!
The ticket is invalid.

Original comment by thalerbe...@gmail.com on 14 Nov 2011 at 4:50

GoogleCodeExporter commented 8 years ago
Excellent! I am glad it was an easy fix!

Original comment by joshuadmorris@gmail.com on 15 Nov 2011 at 12:23