Page 1 of 1
Unrecognized extension error.
Posted: 26 Jun 2014, 12:04
by yuvallahav
Hello.
I've been getting a lot of this error for different zones on my server:
Code: Select all
INFO | jvm 1 | 2014/06/26 00:20:40 | 00:20:40.029 - [ WARNING ] > it.gotoandplay.smartfoxserver.exceptions.MissingExtensionException: Unrecognized extension name: [ game ]! Zone: Scopa2, Room: 232626
I'm pretty much stamped as what is the cause of this error, since there is zero information to work with if you look at this message, I know the zone it came from, I know the name of the extension it was looking for, but nothing as to where the problem might be, no line number, no function name, nothing.
In my zone extension code there is only one place I call for a room extension ("game"), and I've traced before and after that place in order to see if the error is generated in that place of the code, but it's not. So can I assume that the error is being generated inside the room ("game") itself? since in the room I work on the extension level, I never indicate the extension itself in the room code, so how can it be it does not find itself? Is there any other reason why this error should pop up? and it does, hundreds of times, for all my zones online (I was never able to replicate this error on my local machine, even though it's exactly the same code as on our production server).
Thanks.
Yuval.
Re: Unrecognized extension error.
Posted: 26 Jun 2014, 14:54
by Lapo
The message is telling you that the Room "232626" under Zone "Scopa2" has no extension called "game".
Therefore it wasn't possible to invoke it.
Re: Unrecognized extension error.
Posted: 26 Jun 2014, 15:09
by yuvallahav
Lets, for the sake of this conversation, disregard the room number, since I'm getting this message for just about 20 percent of the rooms I'm creating, talking about 10,000 play rooms an hour, 20 percent of them generate this error at some point, which is not supposed to happen. 100 percent failure I can get, but not just about 20 percent of the rooms going bad for some reason. Saying the rooms are not there (were not created by some reason) I can also get, but if a room has a number I can only assume it was created, and if it was created, it means it had the extension when It was created, or else it wouldn't have been created, and been given a number. What exactly makes a room extension go away in the middle of a game, blocking the game up, and filling the log with error messages?
And again, in my zone code I invoke the room only in one place (when I handle tasks sent to the scheduler from a room, which needs to go back to the room), but as I've said, I traced this action before and after the invoking of the room, and this error don't show up between traces, so it's not from there.
Any more information you can spare in trying to explain this problem?
Re: Unrecognized extension error.
Posted: 26 Jun 2014, 15:14
by yuvallahav
There is literally just one place in my whole code, for zone and room, that invokes the room extension, as I said when I need to execute a scheduled event, and as far as I can tell, that is not the place this error is being generated.
Is there anything else that might generate this error?
Re: Unrecognized extension error.
Posted: 26 Jun 2014, 18:10
by Lapo
I presume the the error is generated by client requests.
It would help to understand how often this error occurs for any one Room.
If a Room gets destroyed but there are still client requests for that Room this error will pop up because the two activities are completely asynchronous, for example. So what you're seeing would not really be a problem, if that's the case.
Is there like a phase at runtime where a specific Room Extension is causing this issue? For example 2 minutes straight of this error in the logs?
Or do you just see an error here and there?
Can you check in the logs if there's any references to the removal of the Room?
Other ideas maybe related to the failure of the Extension to startup when the Room is created, which causes the incoming requests to fail.
Re: Unrecognized extension error.
Posted: 27 Jun 2014, 09:13
by yuvallahav
Thanks for the reply Lapo, I didn't consider (since I didn't know) that this error could be generated by users trying to send message to a room that does not exist any more... meaning I need to check that when I switch users over rooms the client is 100 percent sure where it is, some of our users have complained that at some point their game/lobby gets "stuck", not responding to anything, this could mean I sent them out of a room but for some reason the client side still thinks and tries to send messages to the room they were connected to before. Is there a way I can validate a message going from client to server before I send it or when it comes to the server to see if the room requested still exist?
Also, this happens many times in a row for each room most of the times (about 5-30 calls per room), and sometimes it's a single error, but it is constantly present, considering the amount of traffic we have, it's still a small percentage, but it's there. Since I'm not logging the destruction of a room I can't tell you anything about it, but I will start to log it today and see, I have a feeling this is the problem, a client sending messaged to a room instead of the lobby once a room was destroyed at a specific point but the client didn't get the message and changed rooms.
So far I've never logged a problem or an error while creating a room, so it's probably not that.
Thanks again for the answer, it gave me food for thought, I'll do some debugging today and I'll see what I come up with.
Yuval.
Re: Unrecognized extension error.
Posted: 27 Jun 2014, 13:21
by yuvallahav
I'm working on this issue, when something weird happens, I'm getting this error now for every room I create, and for some reason, this happens only on the production server, not on my local machine, which is why I can't seem to find the problem:
Code: Select all
Error in extension [ scopa_game.as ]: TypeError: Cannot call method "push" of undefined (scopa_game.as#1773) Internal: 196 -- Line number: 196 in file: scopa_game.as
So lets break this down:
1. "(scopa_game.as#1773)", I dont have 1773 lines in my extension.
2. "Internal: 196 -- Line number: 196", I don't have any push command on line 196, and the closest around that line (about 30 lines bellow) is just fine, I trace the array, it's there, it gets filled, nothing wrong with it.
3. I've put in a trace in my code every place I to a push into an array, and they are all working online, no problem.
4. I don't have any push into any array related to the scopa_game.as in my main zone extension.
5. This is not the first time I'm getting an error message with a line number completely unrelated to the actual problem, and I've posted about this before, a few years back.
6. This error shows up for some reason in the zone extension view, and not in the room extension view.
Thanks.
Yuval.
Re: Unrecognized extension error.
Posted: 27 Jun 2014, 13:42
by yuvallahav
Ok, after trying to figure this out I simply hard booted our smartfoxserver, and that solved the problem, I can only think that something went wrong at some point, and a simple soft reboot of the zone and replacing the extension file was not enough to convince the server that it's ok now.