Skip to main content
Participant
October 29, 2010
Question

Error: Failed to execute method (NetStream).

  • October 29, 2010
  • 3 replies
  • 2500 views

I've googled this and come up empty.

All I am trying to do is create a netstream and assign a group to it like so:

var netstream;

var groupSpec;

groupSpec = new GroupSpecifier("foo");

     trace("groupSpec: "+ groupSpec);

netstream = new NetStream(netConnection, groupSpec);

~~~~~~~~~~~~~~~~~~~~~~~~~~

Which results in:

#groupSpec: G:040e666f6f00

#Sending error message: /opt/adobe/fms/applications/custom/main.asc: line 33: Error: Failed to execute method (NetStream).

If I remove the groupSpec optional parameter I successfully connect the NetStream.

According to the docs [on this page] I should be able to identify a GroupSpecifier in the NetStream constructor.

Is this a bug? Is there another way to do this?

Much thanks in advance!

Chris

    This topic has been closed for replies.

    3 replies

    Participant
    December 3, 2010

    I Have the same problem:

    //Connection

    var netConnection = new NetConnection();

    netConnection.connect("rtmfp://localhost/digows");

    application.netConnection = netConnection;

    //GroupSpecifier

    var groupSpecifier = new GroupSpecifier("mygroup");

    groupSpecifier.serverChannelEnabled = true;

    groupSpecifier.postingEnabled = true;

    groupSpecifier.multicastEnabled = true;

    application.groupSpecifier = groupSpecifier;

    trace("Group -> "+ groupSpecifier);

    //NetGroup

    var netGroup = new NetGroup(netConnection, groupSpecifier );

    netGroup.onStatus = function( info )

    {

    trace("--------netGroup.onStatus "+info);

    if (info.code == "NetGroup.Connect.Success")

    {

    trace("Successful NetGroup connection");

    }

    }

    application.netGroup = netGroup;

    //Stream

    var netStream = new NetStream( netConnection, groupSpecifier );

    netStream.onStatus = function( info )

    {

    trace("--------netStream.onStatus "+info);

    if (info.code == "NetStream.Publish.Start")

    {

    trace("It is now publishing");

    }

    }

    application.netStream = netStream;

    The "new NetGroup" and "new NetStream" fail. I'm following the FMS4...

    Does anyone know a solution?

    Participant
    December 8, 2010

    My terrible bad!

    Follow the correct code for that:

    //GroupSpecifier

    groupSpecifier = new GroupSpecifier("mygroup");

    groupSpecifier.serverChannelEnabled = true;

    groupSpecifier.postingEnabled = true;

    groupSpecifier.multicastEnabled = true;

    trace("Group -> "+ groupSpecifier);

    //Connection

    netConnection = new NetConnection();

    netConnection.connect("rtmfp://localhost/myapp");

    netConnection.onStatus = function( info )

    {

    trace("\n---------------netConnection.onStatus-> "+info.code);

    if( info.code == "NetConnection.Connect.Success" )

    {

    //NetGroup

    netGroup = new NetGroup(netConnection, groupSpecifier);

    //NetStream

    netStream = new NetStream(netConnection, groupSpecifier);

    }

    kahsbnxasxwasx
    Known Participant
    October 10, 2011

    netConnection.onStatus non-execution why?

    Participant
    October 29, 2010

    NetStream(netCOnnection,groupSpec) requires rtmfp

    calmchessplayer
    Inspiring
    October 29, 2010
    nowhere do i see you can specify it in a netstream constructor i only see attaching it to NetConnection useing this


    netGroup = new NetGroup(connection, groupspec)

    where connection is the NetConnection and groupspec is the group specifier.

    Participant
    October 29, 2010

    Sorry, I provided the wrong link. Should go here: http://help.adobe.com/en_US/flashmediaserver/ssaslr/WS5b3ccc516d4fbf351e63e3d11a11aff5ba-7d13.html

    However the answer is deeper in the documentation than I looked apparently. I was connecting using the rtmp protocol rather than the rtmfp protocol (as is required to join a group).  Thanks for prompting me to do a double take

    Chris