Ever since migrating our application (AIR Client, serverTomcat 6) from LCDS 2.6 to 3.1, I keep getting this error:
Fault Code: Channel.Polling.Error; FaultString: error
Root Cause: Fault Code: Server.Processing.NotSubscribed; FaultString: The client has no active subscriptions over endpoint 'my-amf-polling'.
It happens at seemingly random times while the AIR client is connected to the server (both server and client running on the same machine).
If it fails, I get the error for a couple of operations (sometimes 10, 15, 20 seconds apart), but after a while things start working again.
It always happens when I perform large fill operations in order to cache data for future offline operation.
Does anyone have any ideas what changed from LCDS 2.6 to 3.1 that may cause this?
Any hints, ideas, advice, thoughts, .. are greatly appreciated!
You should ensure that you have a channel connect handler function that will re-execute the fill when the server is reconnected. Otherwise if a client is not connected for a while (or the server is restarted) the subscriptions it has to the fill will be gone and you may get a message like the one you are seeing.
You should establish an event handler on the DataService channel object that will get called on the CONNECT event.
Something likethe following:
And have a function defined that re-executes fills if needed:
public function channelConnectHandler(event:ChannelEvent):void
I am sorry I can't find a good example to point you to. Our documentation needs one!
Here is a good (if older) example from Christophe Coenraets
It shows the network status monitoring.