Skip to content

fatal error: This should never happen #303

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
soufianeEssabbane opened this issue Feb 5, 2016 · 7 comments
Closed

fatal error: This should never happen #303

soufianeEssabbane opened this issue Feb 5, 2016 · 7 comments

Comments

@soufianeEssabbane
Copy link

Hi, i'm having a problem with a kind of random crash that happens continuously don't know exactly why, i'm using socket-io client in an objective c project i'm getting "Pods/Socket.IO-Client-Swift/Source/SwiftRegex.swift, line 27" ? can you PLEAAAASE tell me what maybe the cause ? did I did something wrong ?

@soufianeEssabbane
Copy link
Author

ocketIOClientSwift
SocketLogger.swift line 53
SocketLogger<A where ...>.(abstractLog in _5A5B34CAD36769831C85A7C9760DE2EE)<A where ...>(String, message : String, type : String, args : [AnyObject]) -> ()
9
SocketIOClientSwift
SocketLogger.swift line 40
SocketLogger<A where ...>.log<A where ...>(String, type : String, args : [AnyObject]...) -> ()
10
SocketIOClientSwift
SocketLogger.swift line 39
protocol witness for SocketLogger.log<A where ...>(String, type : String, args : [AnyObject]...) -> () in conformance DefaultSocketLogger
11
SocketIOClientSwift
SocketParsable.swift line 157
SocketParsable<A where ...>.parseSocketMessage<A where ...>(String) -> ()
12
SocketIOClientSwift
SocketIOClient.swift line 443
SocketIOClient.(parseEngineMessage(SocketIOClient) -> (String) -> ()).(closure #1)
13
SocketIOClientSwift
SocketAckManager.swift line 0
thunk

@nuclearace
Copy link
Member

Should be fixed in the latest master

@soufianeEssabbane
Copy link
Author

Hi, thank you for the replay.

I'm using cocoapods and i did install the latest version "pod 'Socket.IO-Client-Swift', '~> 5.3.2'" but doesn't seems to be working ? my app crashes like all the time randomly. can you please explain why this is happening ? (just so that I understand).
to get it working should I download the master repo ?

again thanks

@nuclearace
Copy link
Member

I don't know how you managed to cause that unless you're running on a potato. But you can try 5.3.3

@soufianeEssabbane
Copy link
Author

I'm using it in an objective c project, declaring socketIO Client as a property in my delegate. I start connexion at launch like this :
self.socket = [[SocketIOClient alloc] initWithSocketURL:url options:@{@"log": @yES, @"forcePolling": @yES}];

    [self.socket on:@"connect" callback:^(NSArray* data, SocketAckEmitter* ack) {
            [_socket emit:@"id" withItems:@[userId]];
    }];

    [self.socket on:@"ping" callback:^(NSArray* data, SocketAckEmitter* ack) {


            [_socket emit:@"pong" withItems:@[@{@"sender":userId}]];
    }];

    [self.socket on:@"newMessage" callback:^(NSArray* data, SocketAckEmitter* ack) {
        if (data) {

            NSDictionary * message = (NSDictionary*)[data objectAtIndex:0];
                [self.socket emit:@"delivered" withItems:@[@{@"_id":sktMessage.socketMessageId}]];
            }
        }
    }];

    [self.socket connect];

@soufianeEssabbane
Copy link
Author

the update seems to be working

@soufianeEssabbane
Copy link
Author

thanks (please if you see something wrong in my code tell me)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants