Closed Kyu closed 1 year ago
Further information: First of all, ios crash report
Second of all, the error defined by Android 13 was a "socket is closed" error. The error has no type/class, just Error.
Third, the iOS crash video, and the Android crash video.
Fourth, the offending line was in a function I didn't include. This function is called every ~200ms so that was a big oversight by me.
function writeToSocket(msg: string) {
if (! senderSocket) {
return;
}
senderSocket.write(`${msg}\n`);
}
A quick 'fix' for Android involves simply adding a try/catch like so, but has no effect on iOS:
function writeToSocket(msg: string) {
if (! senderSocket) {
return;
}
try {
senderSocket.write(`${msg}\n`);
} catch (e) {
// @ts-ignore
console.log(e.constructor.name)
}
}
However, this results in console spam similar to to that in the Android video, e.g
500 above ...
LOG Error
LOG Error
LOG Error
500 below ...
So that suggests that it's attempting to write to the long closed socket forever. Any ideas on how to fix that? I can add a initial handshake message in my client, but i'd rather fix this issue on the server.
Related: #127 Slightly related: #167, #165, #54
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community attention? This issue may be closed if no further activity occurs.
Description
Running a nmap port scan crashes the entire app, for some reason
Steps to reproduce
Steps to reproduce the behavior:
nmap -p 5555 IP_HERE
Also: Using the flags
-sA, -sS
give no problem, but-sT
does, which I believe might be the defaultCode:
This is how my server is defined
App logs:
Nmap logs:
Current behavior
Crashes on nmap.
Expected behavior
No crash occurs
Screenshots May add video later
Relevant information
Dependencies (I am using expo if that matters):
OS:
Phone:
~(Will test on android later)~
Edit: Does not crash on Android (Galaxy A14 5G, Android 13). But gives useful error. Will investigate