chaitin / passionfruit

[WIP] Crappy iOS app analyzer
MIT License
1.66k stars 228 forks source link

close, unhandledRejection listener registration errors #67

Closed emarteca closed 4 years ago

emarteca commented 4 years ago

Hi all, I've been working on a tool to identify instances of events registered to the wrong object in uses of some JavaScript event-driven APIs, as part of a research project. The tool flagged line 216 and line 224 in gui/src/views/Inspect.vue, on the registration of the listeners for close and unhandledRejection respectively.

The reason I believe this is an error is as follows (from looking at the socket.io client API documentation): the listeners for both these events are registered on the socket created on line 210. However, close and unhandledRejection are not events on socket.io-client.Socket.

My guess is that close should maybe be disconnect -- since you already have a listener for disconnect I’d guess that the listener for close should just be removed. Then, for unhandledRejection (which is actually an event on process.Process, my guess is that this should maybe be a listener for reconnect_error or reconnect_failed, which are events on the socket.io-client.Socket.

Thanks!

ChiChou commented 4 years ago

Thanks for your report!

This project is going to be archived and the successor is going to be announced. It's been resolved in the incoming next-gen implementation.

So I am cleaning up all issues here.