Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2110] StreamException

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionNeeds more info
Resolution Date2013-03-06T20:54:31.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterMichel Anderson Lutz
AssigneeMauro Parra-Miranda
Created2013-03-05T15:05:34.000+0000
Updated2016-03-08T07:41:05.000+0000

Description

Steps to Reproduce

Is a photo taken with the application uploading is done p and the following code is executed var io = require('socket.io-titanium'); var socket = io.connect('http://....'); //socket.send('hello world!!'); socket.on('news', function (message){}); var data = { 'room' : 1, 'message': 'mobitxt' }; Ti.API.info('---> datadd' + data); socket.emit('emit',data); action of the socket is made successfully on site The cell goes into standby mode (unlock) to re-use the phone with the app still open below the error appears. as attached image

Actual Result

An error occurs after data transmission, everything is well emit is done successfully, but after a few seconds without activity on the app an error screen appears with the information: StreamException. Stream is not writable in -TiStreamProxy write: Feb 21 15:36:58 iPhone-Michel catacao[13898] : [ERROR] Script Error = StreamException. Stream is not writable in -TiStreamProxy write: at ti-websocket-client.js (line 1). Console log device: Mar 5 11:50:57 iPhone-Michel profiled[36346] : (Note ) profiled: Service starting... Mar 5 11:50:57 iPhone-Michel profiled[36346] : (Note ) profiled: Recomputing passcode requirement message Mar 5 11:50:58 iPhone-Michel catacao[36316] : [ERROR] StreamException. Stream is not writable in -[TiStreamProxy write:] (TiStreamProxy.m:66) Mar 5 11:50:58 iPhone-Michel catacao[36316] : PBRequester failed with Error Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo=0x1d8892d0 {NSErrorFailingURLStringKey=https://gsp10-ssl.apple.com/use, NSErrorFailingURLKey=https://gsp10-ssl.apple.com/use, NSLocalizedDescription=The request timed out., NSUnderlyingError=0x1c51c5d0 "The request timed out."} Mar 5 11:50:58 iPhone-Michel catacao[36316] : [ERROR] Script Error = StreamException. Stream is not writable in -[TiStreamProxy write:] (TiStreamProxy.m:66) at ti-websocket-client.js (line 1). Mar 5 11:50:58 iPhone-Michel catacao[36316] : [ERROR] Attempt to close in invalid state: 16. in -[TiNetworkSocketTCPProxy close:] (TiNetworkSocketTCPProxy.m:380) Mar 5 11:51:43 iPhone-Michel backboardd[26] : ALS: SetDisplayFactor: factor=0.0500 Mar 5 11:51:57 iPhone-Michel profiled[36346] : (Note ) profiled: Idled. Mar 5 11:51:57 iPhone-Michel profiled[36346] : (Note ) profiled: Service stopping. Is there any procedure to be done or the error occurs due to bug? code: var io = require('socket.io-titanium'); var socket = io.connect('http://....'); //socket.send('hello world!!'); socket.on('news', function (message){}); var data = { 'room' : 1, 'message': 'mobitxt' }; Ti.API.info('---> datadd' + data); socket.emit('emit',data);

Expected Result

no error

Attachments

FileDateSize
1c994666-7c56-11e2-8599-58814d22d767.PNG2013-03-05T15:09:54.000+000086752
Captura de Tela 2013-03-05 às 12.10.07.png2013-03-05T15:10:38.000+0000233870

Comments

  1. Michel Anderson Lutz 2013-03-05

    Device Error
  2. Michel Anderson Lutz 2013-03-05

    console Error
  3. Carter Lathrop 2013-03-06

    Michel, Would you mind providing a full test case that shows this issue. One that may be pasted into an app.js and reproduces this issue? Once I can reproduce and verify then I can pass along to Engineering. Thank you, Carter

JSON Source