Closed Bug 1056328 Opened 10 years ago Closed 6 years ago

apps using TCP server socket do not work if updated from dev tools, require manual quit on phone before restart

Categories

(Firefox OS Graveyard :: General, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: jason, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2121.3 Safari/537.36

Steps to reproduce:

i'm essentially trying to write an HTTP server using TCPServerSocket. i took a look at the TCP server socket tester (test_tcpserversocket.js) and developed my app around its pattern. i'm using TCPServerSocket to listen on port 555 and essentially log what happens from there.


Actual results:

i'm seeing inconsistent behaviour and so far have not seen correct behaviour. usually the server closes the connection immediately on acceptance, and does not call any event handlers. sometimes the server calls my onconnect handler, sometimes not. rarely, the connected socket's ondata handler is called, before the socket is closed. also rarely, the connected socket is kept open, but no event handlers are called. when connecting using telnet from a command line on a machine on the same network, the connection is immediately closed upon acceptance and no event handlers are called.




Expected results:

when an incoming connection is accepted, the server socket should call the onconnect event handler, passing the socket resulting from the accept() call (note the documentation is wrong in this respect). the connected socket should then be able to communicate with the other endpoint, with data being sent and received as appropriate.
Which gecko version where you using? Also, was this on a device or on the desktop?
sorry for the omission of such details. this is the Flame device on Boot2Gecko 2.1.0.0.-prerelease. platform version 34.0a1, build ID 20140724143109.

i can't currently build b2g due to the time_daemon copy issue in the device backup. even installing fresh products from a colleague doesn't sort my build. if there's a way round it then i'd love to hear it -- or i could file an issue for it.
OS: All → Gonk (Firefox OS)
seems like this might be fixed in the Aug 24 nightly - thanks for posting Flame builds, btw
it's partially fixed - if i quit the app and debug it from the app manager, then it will work once. if i then reinstall and debug from the app manager, it fails. quitting the app manually and going back in will restart the cycle.
as of build identifier 20140922040204, this issue persists. with the app up, updating it from the app manager breaks its ability to accept TCP connections. if the app is restarted on the phone restores functionality.
Summary: cannot conduct successful communication using TCP server socket → apps using TCP server socket do not work if updated from dev tools, require manual quit on phone before restart
Firefox OS is not being worked on
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: