GithubHelp home page GithubHelp logo

Comments (10)

adamhartford avatar adamhartford commented on August 19, 2024

What version of SignalR are you using? And what version of SwiftR? And does this error happen after connecting, or after you try to invoke some server method?

from swiftr.

vahidamini avatar vahidamini commented on August 19, 2024

My signalR version is 2.0 and swiftR version is the latest that published. This error happen while connecting. thanks for your response.

from swiftr.

adamhartford avatar adamhartford commented on August 19, 2024

Did you set the SignalR version to 2.0?

SwiftR.signalRVersion = .v2_0_0

from swiftr.

vahidamini avatar vahidamini commented on August 19, 2024

Yes I set it up with the same code you mentioned.
But unfortunately I get this error again:

SwiftR unable to process message oxd6kero: Error Domain=WKErrorDomain Code=5 "JavaScript execution returned a result of an unsupported type" UserInfo={NSLocalizedDescription=JavaScript execution returned a result of an unsupported type}

from swiftr.

vahidamini avatar vahidamini commented on August 19, 2024

I was upgraded my SignalR to 2.1.0 It works, but now any time I run my code the hubconnectio.state is Disconnected why?

     SwiftR.transport = .ServerSentEvents
    SwiftR.signalRVersion = .v2_1_0 
    hubConnection = SwiftR.connect("http://myurl.ir") { [weak self] connection in
        connection.queryString  = ["user_type": "client"]
        self?.simpleHub = connection.createHubProxy("TaxiTopHub")
       print(self!.hubConnection.state)
}

from swiftr.

vahidamini avatar vahidamini commented on August 19, 2024

Finally I solve it.

from swiftr.

adamhartford avatar adamhartford commented on August 19, 2024

What was the issue?

from swiftr.

mowali avatar mowali commented on August 19, 2024

vahidamini could you please take the time to answer Adam's question?
You may need him again!!

from swiftr.

vahidamini avatar vahidamini commented on August 19, 2024

I was wrong , uncommenting this line of my code solved my problem:
SwiftR.useWKWebView = true
Thanks Adam.

from swiftr.

mowali avatar mowali commented on August 19, 2024

thanks for the answer. it didn't solve it for me. still get: SwiftR unable to process message 3k7umb08: Error Domain=WKErrorDomain Code=5 "JavaScript execution returned a result of an unsupported type" UserInfo={NSLocalizedDescription=JavaScript execution returned a result of an unsupported type}

from swiftr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.