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
Device Error
console Error
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