Comments (9)
unity version, platform or the device, maybe a log or c# snippet code to have an idea!
from socketiounity.
2021.3.19f1, unity editor on windows (android platform), the log just says unable to connect to remote server
socket = new SocketIOUnity(uri, new SocketIOOptions {
Query = new Dictionary<string, string>
{
{"id", EncryptedId},
{"username", EncryptedUsername},
{"avatarURL", EncryptedAvatarURL},
}
,
EIO = 4,
Transport = SocketIOClient.Transport.TransportProtocol.WebSocket,
});
from socketiounity.
make sure the internet permission is enabled in the manifest (maybe its the cause)
<manifest xlmns:android...>
...
<uses-permission android:name="android.permission.INTERNET" />
<application ...> ... </application>
</manifest>
do the things in this comment:
#45 (comment)
try this if fixed ur problem.
from socketiounity.
make sure the internet permission is enabled in the manifest (maybe its the cause)
<manifest xlmns:android...> ... <uses-permission android:name="android.permission.INTERNET" /> <application ...> ... </application> </manifest>
do the things in this comment: #45 (comment) try this if fixed ur problem.
I'm testing in unity editor, it it doesn't work, but it is working on localhost, just the remote server that is not working
from socketiounity.
make sure the internet permission is enabled in the manifest (maybe its the cause)
<manifest xlmns:android...> ... <uses-permission android:name="android.permission.INTERNET" /> <application ...> ... </application> </manifest>
do the things in this comment: #45 (comment) try this if fixed ur problem.
I'm testing in unity editor, it it doesn't work, but it is working on localhost, just the remote server that is not working
so maybe the remote server has kinda of security or not a valid version of socketio! and from the code you posted i don't see the import of socketio
const socket = require('socket.io');
like in the example:
https://github.com/itisnajim/SocketIOUnity/blob/main/Samples~/Server/index.js
from socketiounity.
nah, it is imported i just put the important part of the ts code, btw I'm using typescript
import { Connection } from "./Connection";
import { Server, Socket } from "socket.io";
import { Lobby } from "./Lobbies/Lobby";
import { DatabaseHandler } from "./MySqlConn";
import { Player } from "./DataTypes/Player";
import { MatchMakingConnection } from "./MatchMakingConnection";
const { Encrypt, Decrypt } = require('./Encryption/EncryptionManager');
const { v4: uuidv4, v4 } = require('uuid');
import * as http from "http"
from socketiounity.
Btw this is my package.json
{
"name": "server",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"run": "node dist/app.js",
"build": "tsc -p tsconfig.json"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"crypto": "^1.0.1",
"ejs": "^3.1.8",
"express": "^4.18.2",
"mysql": "^2.18.1",
"nodemon": "^2.0.20",
"socket.io": "^4.5.4",
"uuid": "^9.0.0"
},
"devDependencies": {
"@types/express": "^4.17.15",
"@types/mysql": "^2.15.21",
"@types/node": "^18.11.18",
"@types/socket.io": "^3.0.2",
"tsc": "^2.0.4"
}
}
from socketiounity.
Hi, i stopped it from reconnecting only connecting and I don't get anything back no OnConnected or OnError
from socketiounity.
Fixed the issue!
just changed to port from 80 to 3001 and it worked!
from socketiounity.
Related Issues (20)
- its not working on webgl build HOT 1
- Socket not connected on IOS device HOT 3
- issues on Quest 2 headset HOT 2
- How to use namespaces HOT 8
- Scenemanager not working. HOT 1
- Error on serializing response HOT 5
- Can't import package and manual "import" results in errors HOT 2
- WSS support HOT 1
- can not find a reference to assembly 'System.Memory' HOT 2
- Socket.io client connects but doesn't emit in a Unity project HOT 2
- onError not called for error return from the server HOT 3
- Include SocketIOUnity as a dependency in package.json HOT 3
- How to update Unity Editor UI after receiving data from server HOT 1
- Not work with IL2CPP HOT 8
- Socket.EmitAsync() Not working on Android Oculus Build HOT 2
- The object does not create itself. HOT 2
- No events received from socket.io v2 HOT 2
- Unconnected socket cannot be stopped (unless disposed) HOT 2
- Issues with WebGL Build?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from socketiounity.