triceam / IBM-Watson-Speech-QA-iOS

A native iOS app that creates a voice driven app experience using the Watson Speech to Text and Question & Answer services, with operational analytics powered by the Advanced Mobile Access service on IBM Bluemix. The native iOS app allows you to ask Watson questions in spoken language, and receive textual responses based on the Watson QA Healthcare
19 stars 16 forks source link

IBM-Watson-Speech-QA-iOS #3

Open hengliao opened 8 years ago

hengliao commented 8 years ago

This app is based on WatsonSDK, which has been deprecated by iOS-SDK. It appears that some API has been changed. 1) Mobile Client Access - the new API no longer requires bundle identifier. 2) Watson QA - no longer available.

I tried to get this app running, by disabling the Watson QA from the server code (so that the server code can be deployed to Bluemix without crashing, and I just want to get the STT service up and running...

Finally, I got the client compiled. and got the following messages from xcode log window.

Can the author please help me figure out what is wrong... and better yet, publish the new version of this app based on the updated iOS-SDK .... your help is much appreciated!

See log below:

2016-02-28 21:16:52.514 WatsonSpeechQA[20394:690243] [ERROR] [IMF_REQUEST] -[IMFAuthorizationRequest requestFailed:error:] in IMFAuthorizationRequest.m:368 :: Status code='400' error='Expected status code in (200-299), got 400' response='{"error":"invalid_grant"}' 2016-02-28 21:16:52.518 WatsonSpeechQA[20394:690243] [ERROR] [IMF] -[IMFAuthorizationRequest requestFailed:error:] in IMFAuthorizationRequest.m:372 :: Error=Error Domain=WLAFNetworkingErrorDomain Code=-1011 "Expected status code in (200-299), got 400" UserInfo={WLAFNetworkingOperationFailingURLRequestErrorKey=<NSMutableURLRequest: 0x7fe20192ecf0> { URL: http://ask-dr-watson-app.au-syd.mybluemix.net/imf-authserver/authorization/v1/apps/1bf4453b-1786-468b-bef7-1cf9c6b303f0/token }, NSLocalizedRecoverySuggestion={"error":"invalid_grant"}, NSErrorFailingURLKey=http://ask-dr-watson-app.au-syd.mybluemix.net/imf-authserver/authorization/v1/apps/1bf4453b-1786-468b-bef7-1cf9c6b303f0/token, WLAFNetworkingOperationFailingURLResponseErrorKey=<NSHTTPURLResponse: 0x7fe2005069a0> { URL: http://ask-dr-watson-app.au-syd.mybluemix.net/imf-authserver/authorization/v1/apps/1bf4453b-1786-468b-bef7-1cf9c6b303f0/token } { status code: 400, headers { Connection = "Keep-Alive"; "Content-Type" = "application/json;charset=UTF-8"; Date = "Sun, 28 Feb 2016 13:16:52 GMT"; "Transfer-Encoding" = Identity; "X-Backside-Transport" = "FAIL FAIL"; "X-Cf-Requestid" = "8177a5fd-ae94-4a8b-60b5-94ed08914e76"; "X-Client-IP" = "104.237.91.150"; "X-Global-Transaction-ID" = 1320516849; "X-Powered-By" = "Servlet/3.0"; } }, NSLocalizedDescription=Expected status code in (200-299), got 400} 2016-02-28 21:16:52.526 WatsonSpeechQA[20394:690243] [FATAL] [IMF_OAUTH] -[IMFAuthorizationManager onFailureWithResponse:error:] in IMFAuthorizationManager.m:548 :: {"error":"invalid_grant"} 2016-02-28 21:16:52.526 WatsonSpeechQA[20394:690243] [ERROR] [AppDelegate] Error Domain=WLAFNetworkingErrorDomain Code=-1011 "Failed to obtain access token: Expected status code in (200-299), got 400" UserInfo={WLAFNetworkingOperationFailingURLRequestErrorKey=<NSMutableURLRequest: 0x7fe20192ecf0> { URL: http://ask-dr-watson-app.au-syd.mybluemix.net/imf-authserver/authorization/v1/apps/1bf4453b-1786-468b-bef7-1cf9c6b303f0/token }, NSLocalizedRecoverySuggestion={"error":"invalid_grant"}, NSErrorFailingURLKey=http://ask-dr-watson-app.au-syd.mybluemix.net/imf-authserver/authorization/v1/apps/1bf4453b-1786-468b-bef7-1cf9c6b303f0/token, WLAFNetworkingOperationFailingURLResponseErrorKey=<NSHTTPURLResponse: 0x7fe2005069a0> { URL: http://ask-dr-watson-app.au-syd.mybluemix.net/imf-authserver/authorization/v1/apps/1bf4453b-1786-468b-bef7-1cf9c6b303f0/token } { status code: 400, headers { Connection = "Keep-Alive"; "Content-Type" = "application/json;charset=UTF-8"; Date = "Sun, 28 Feb 2016 13:16:52 GMT"; "Transfer-Encoding" = Identity; "X-Backside-Transport" = "FAIL FAIL"; "X-Cf-Requestid" = "8177a5fd-ae94-4a8b-60b5-94ed08914e76"; "X-Client-IP" = "104.237.91.150"; "X-Global-Transaction-ID" = 1320516849; "X-Powered-By" = "Servlet/3.0"; } }, NSLocalizedDescription=Failed to obtain access token: Expected status code in (200-299), got 400} 2016-02-28 21:16:53.819 WatsonSpeechQA[20394:690243] CALL STARTING STREAM 1050 2016-02-28 21:16:53.820 WatsonSpeechQA[20394:690243] websocket connection using wss://stream.watsonplatform.net/speech-to-text/api/v1/recognize 2016-02-28 21:16:53.823 WatsonSpeechQA[20394:690243] SocketRocket: In debug mode. Allowing connection to any root cert 2016-02-28 21:16:54.602 WatsonSpeechQA[20394:690243] WebSocketUploader - data written but we're not connected yet 2016-02-28 21:16:55.101 WatsonSpeechQA[20394:690243] WebSocketUploader - data written but we're not connected yet 2016-02-28 21:16:55.601 WatsonSpeechQA[20394:690243] WebSocketUploader - data written but we're not connected yet 2016-02-28 21:16:56.100 WatsonSpeechQA[20394:690243] WebSocketUploader - data written but we're not connected yet 2016-02-28 21:16:56.599 WatsonSpeechQA[20394:690243] WebSocketUploader - data written but we're not connected yet 2016-02-28 21:16:57.098 WatsonSpeechQA[20394:690243] WebSocketUploader - data written but we're not connected yet 2016-02-28 21:16:57.147 WatsonSpeechQA[20394:690243] :( Websocket Failed With Error Error Domain=SRWebSocketErrorDomain Code=2133 "received bad response code from server 401" UserInfo={NSLocalizedDescription=received bad response code from server 401} 2016-02-28 21:16:57.148 WatsonSpeechQA[20394:690243] trying to reconnect 2016-02-28 21:16:57.148 WatsonSpeechQA[20394:690243] websocket connection using wss://stream.watsonplatform.net/speech-to-text/api/v1/recognize 2016-02-28 21:16:57.148 WatsonSpeechQA[20394:690243] SocketRocket: In debug mode. Allowing connection to any root cert 2016-02-28 21:16:57.609 WatsonSpeechQA[20394:690243] WebSocketUploader - data written but we're not connected yet 2016-02-28 21:16:58.108 WatsonSpeechQA[20394:690243] WebSocketUploader - data written but we're not connected yet 2016-02-28 21:16:58.376 WatsonSpeechQA[20394:690243] WebSocket closed with reason Stream end encountered

dariuxmx commented 7 years ago

Checking my BlueMix dashboard I was realized that QA is no longer exists in the list of Watson Catalog.

Log: Service offering question_and_answer not found.