Code Monkey home page Code Monkey logo

Comments (13)

nfriedly avatar nfriedly commented on August 11, 2024 1

Hi @ddddm, let me look into this and talk to the team and get back to you.

@daniel-bolanos Is this something you're aware of?

from speech-javascript-sdk.

nfriedly avatar nfriedly commented on August 11, 2024

Hey @ddddm - can you get me a complete copy of the headers? In my testing, I'm not seeing any content-type header set at all, but I'm not testing on an iOS device.

I have a suspicion that the long URL may be part of the issue. The Watson service also accepts the token in a X-Watson-Authorization-Token header or in a cookie - is it possible to set either of these in Cordova / iOS Safari?

from speech-javascript-sdk.

daniel-bolanos avatar daniel-bolanos commented on August 11, 2024

@nfriedly yes, I remember this issue, there was a thread about it with more details, I wish I could find it...

Dani

from speech-javascript-sdk.

ddddm avatar ddddm commented on August 11, 2024

Yeah sure @nfriedly!

I can't give you headers from iOS because the request never happened according to Safari DevTools:
2016-12-13_17-54-50
But the error exists:
2016-12-13_17-56-11

From an android device, I have this request details (might help?)
2016-12-13_18-14-04

Android device's request details:

Request

GET wss://stream.watsonplatform.net/speech-to-text/api/v1/recognize?model=en-US_BroadbandModel&watson-token={token replaced} HTTP/1.1
Host: stream.watsonplatform.net
Connection: Upgrade
Pragma: no-cache
Cache-Control: no-cache
Upgrade: websocket
Origin: file://
Sec-WebSocket-Version: 13
User-Agent: Mozilla/5.0 (Linux; Android 5.1.1; C6603 Build/10.7.A.0.222; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/54.0.2840.85 Mobile Safari/537.36
Accept-Encoding: gzip, deflate
Accept-Language: ru-RU,en-US;q=0.8
X-Requested-With: com.speakingfirst
Sec-WebSocket-Key: g0zG79DBk8z+GjAtyuXGww==
Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits

Response

HTTP/1.1 101 Switching Protocols
Connection: Upgrade
Sec-WebSocket-Accept: pWe5E6BVaWWMkEK/fZQZb9RvkJM=
Sec-WebSocket-Extensions: permessage-deflate;client_max_window_bits=15
Date: Tue, 13 Dec 2016 13:11:57 GMT
Server: -
X-Global-Transaction-ID: 45984040
Content-Type: 
Strict-Transport-Security: 31536000
X-DP-Watson-Tran-ID: stream-dp02-45984040
Upgrade: websocket

from speech-javascript-sdk.

nfriedly avatar nfriedly commented on August 11, 2024

Hum.. I had checked in firefox and I didn't see that but now that I'm trying in chrome, I also see the empty Content-Type header. I think either the service is sending different headers (unlikely) or firefox is not correctly displaying the empty header.

@daniel-bolanos is this something that the team can take a look at - either not creating a content-type header at all, or else setting it to something like application/json?

from speech-javascript-sdk.

germanattanasio avatar germanattanasio commented on August 11, 2024

Can this be related to the problem where the (authorization token) > max safari url length ??

from speech-javascript-sdk.

nfriedly avatar nfriedly commented on August 11, 2024

That might be a problem too @germanattanasio, but the service does appear to be sending an odd, perhaps even invalid header which we should probably handle first.

from speech-javascript-sdk.

ddddm avatar ddddm commented on August 11, 2024

@nfriedly @daniel-bolanos any updates on this?

from speech-javascript-sdk.

nfriedly avatar nfriedly commented on August 11, 2024

I believe the service team will remove the empty content-type header in an upcoming release, but I'm not sure of the timing.

from speech-javascript-sdk.

nfriedly avatar nfriedly commented on August 11, 2024

This is now fixed, https://watson-speech.mybluemix.net/file-url.html shows an example that should work on mobile Safari

from speech-javascript-sdk.

dineshdesigner08 avatar dineshdesigner08 commented on August 11, 2024

The same websocket error is throwing for me also when running ionic app in iphone device.

the error is.
failed: Failed to send WebSocket frame.

is there any solution. Please help me to solve this issue

from speech-javascript-sdk.

nfriedly avatar nfriedly commented on August 11, 2024

@Dinesh93 That is actually a different bug, and one that is outside of our control: #40

The code is fixed in webkit core, and it works in the latest preview builds of Safari 11 (on desktop and, I assume, on iPhone). Expect it to be released in a month or two, whenever Apple puts out the next major releases of macOS and iOS.

If you need a faster solution, you can use our Swift SDK to build a native (non-ionic) app: https://github.com/watson-developer-cloud/swift-sdk

from speech-javascript-sdk.

dineshdesigner08 avatar dineshdesigner08 commented on August 11, 2024

@nfriedly Thank you So much for You response

the issue comes in 10.3.1 os version of ios

10.3.3 its works fine.

from speech-javascript-sdk.

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.