New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid packet received. Unabled to find requested cached node. #34676
Comments
@git2013vb can you provide a minimum reproduction project? |
bug_cache_server.zip Here :) ps.: I give you an hint: if you don't use rpc it work like a charm... |
Oh, I see, the problem is that you re-assign the func _on_JoinServer_pressed():
host = NetworkedMultiplayerENet.new() # New object every time
var ip = "127.0.0.1"
host.create_client(ip, PORT)
get_tree().set_network_peer(host) or: func _on_JoinServer_pressed():
var ip = "127.0.0.1"
host.create_client(ip, PORT)
get_tree().set_network_peer(null) # Force reset
get_tree().set_network_peer(host) In general, setting the multiplayer.network_peer.refuse_new_connections = false Will cause first |
I don't understand. When you say "the problem is that you re-assign the network_peer in the client with the same peer every time" mean is the wrong approach? If is wrong (I saw it in docs) can explain me how have to be implemented? My goal is to connect to the server when I need - even when I disconnect using:
Why you said "every time"? Of course I will use it when I need to connect with server. |
I posted the code above.... in any case there are various demos here you can use: https://github.com/godotengine/godot-demo-projects/tree/master/networking Having had a closer look, it seems related to the fact that |
I am having a very similar problem with a current project.
|
@PiGuyTheCoolGuy can you provide a minimal reproduction project? |
`
` With the given code I don't see any problem, but when running the game I received this error four times and then run as expected. |
@Faless thank you so much man i was getting a similar issue
network.set_peer(null) fixed it |
@Calinou I still have it in v3.5.beta1.mono.official [b9b23d2]
|
There is no ETA about fixing this issue, as nobody knows how to fix it yet. |
I'm using C# atm. Ill follow @Faless suggestion if I can resolve it in as workaround the meantime. Edit.: In my case, setting @Calinou From my side this issue it can be closed. |
Tell me if I'm wrong :) There is a downside to reset the connection each time I have to communicate between two points as suggested @Faless : The more common case is when I define a player in my client that Ill give it the ID (that come free) got from the connection. If I have to use other rpc with I cannot use the same ID any more. So I have to think another way to set a immutable ID. It make sense? Thanks |
I never suggested resetting the connection each time you want to communicate, I suggested resetting the network peer when you want to disconnect or reconnect. |
Thanks for you answer. Obviously I'm not familiar of what happen under the hood :) So you saying setting |
Thank you, saved me a lot of headaches here. I wish this kind of issue was explicitly documented on the page. |
That's up to developer who make features to be willing to share their effort in order to share knowledge. But not everyone have this kind of mindset. The majority of developer think they have done the job just to create a new feature . Maybe they expect something in return to be able to share (money). They think 1/2 job is better than nothing, or they say they have not enough time to document what they did either way that define a mediocre persona in my point of view. Not someone who really care about others. Sorry for my rant. But is what I think and I don't like to say lies. Thanks anyway “With great power comes great responsibility.” – Spiderman |
Remember that Godot's documentation is open to contributions. The best way to fix this kind of issues is to work on it yourself 🙂 |
I can't fix all people mistakes. Even if I want to do it is a impossible task, I'm alone against everyone else. The best think I can do is to complete my tasks at best I can do. Other have to take their responsibilities. Saying "I don't care , someone else will fix this if he need" is something than do not exist in my mindset. Sorry :) Godot is open to "contribution" is an excuse to who do an half job. This is my opinion. Am I strictly? Yes, of course, even more with myself. Thanks |
@git2013vb I would ask you not to make demands like this for contributors. Most contributors work on their free time, and if you're not satisfied with their work, that doesn't give you a right to demand that they do more work. Feedback is welcome, pointing out missing documentation is welcome, but bossing people around is not. If the feature is too undocumented to be useful to you, you can simply not use it until contributors get to document it better. And the talk about money is uncalled for and completely off topic. |
No problem at all. I understand. I cannot write what I think here in your space. Don't worry. I'm this first one who follow the rules set in places where I go. I take the liberty of posting a link but feel free to delete it - or this entire post - if you think is not relevant/unsound. Personally I think it is because when a open source project receive donation it became like a business model the it can follow certain kind of best practices. Here the link: https://opensource.com/business/15/6/documentation-dilemma Than you. |
Godot version:
3.2beta4
OS/device including version:
debian 10
Issue description:
The error happen after i use disconnect_peer(id) from server
and I try again to reconnect from client.
If I restart the client after disconnect I can reconnect with no problems
Can be related with other cache network issues already closed but I'm not sure.
As workaround I reinstance NetworkedMultiplayerENet every time i call close_connection
Steps to reproduce:
NA (ask for more info if you need)
Minimal reproduction project:
Is a client server approach in same computer for now.
The text was updated successfully, but these errors were encountered: