Skip to main content
October 28, 2011
Question

Upgrade from 3.51 to 4.0.1 broken.

  • October 28, 2011
  • 1 reply
  • 506 views

Hello all...

I upgrade from 3.5.1 to 3.5.7 that worked fine, when i upgraded from 3.5.7 to 4.0.1 one of my applications broke. Now i di dnto write them , i am just a sys admin. The person that wrote them is no longer working for us...

i installed this on Centos 5.5 64 bit

when i go to view a video, it does not stream and i see this error in the logs

2011-10-28  11:11:44    27619   (s)2641173  bitrates provider start!    -
2011-10-28  11:11:44    27619   (s)2641173  videosFolder/004/4948   -
2011-10-28  11:11:44    27619   (s)2641173  fileDirHolder: /opt/adobe/fms/applications/bitratesProvider/videosFolder/004/4948   -
2011-10-28  11:11:44    27619   (s)2641173  type: . -
2011-10-28  11:11:44    27619   (e)2641173  Sending error message: /opt/adobe/fms/applications/bitratesProvider/main.asc: line 55: TypeError: aDir has no properties -
2011-10-28  11:11:44    27619   (e)2641173  Sending error message: Failed to execute method (getVideoBitrates). -

Once again i know nothing about programing this stuff, hopefully its an easy fix?

the actual function it complains about is this...

Client.prototype.getVideoBitrates = function( id, type ){

        if( type == "full" ){

                type = "."

        }else if( type == "preview" ){

                type = "_001";

        }else if( type == "trailer" ){

                type = "_002";

        }

        var a = new Array();

        var thousandCoe = Math.floor( id / 1000 );

        var thousandFolder = ( thousandCoe < 10 )? "00" + String(thousandCoe) : "0" + String(thousandCoe)

        //

        trace("videosFolder/" + thousandFolder + "/" + id);

        var fileDirHolder = new File( "videosFolder/" + thousandFolder + "/" + id );

        trace("fileDirHolder: " + fileDirHolder);

        var aDir = fileDirHolder.list();

        //

        trace("type: " + type );

        for( var i = 0; i < aDir.length;  i++ ){

                if( String(aDir).indexOf( ("1000k" + type) ) != -1 ){

                        a.push( {id:"1000k", value:1000} );

                }

                if( String(aDir).indexOf( ("700k" + type) ) != -1 ){

                        a.push( {id:"700k", value:700} );

                }

                if( String(aDir).indexOf( ("1600k" + type) ) != -1 ){

                        a.push( {id:"1600k", value:1600} );

                }

                if( String(aDir).indexOf( ("240k" + type) ) != -1 ){

                        a.push( {id:"240k", value:240} );

                }

                if( String(aDir).indexOf( ("360k" + type) ) != -1 ){

                        a.push( {id:"360k", value:360} );

                }

                //trace("a: " + a.toString() );

        }

        //trace("Call getVideoBitrates()....... > " + a.toString() );

        this.call("getVideoBitrates", null, a);

        //

        this.disconnectUser();

}

Any ideas???  Sorry for not being clearer...

    This topic has been closed for replies.

    1 reply

    Adobe Employee
    October 31, 2011

    Did you check that folder actually exist "/opt/adobe/fms/applications/bitratesProvider/videosFolder/004/4948"

    However, I am not sure about the use case of this code, but its trying to get the list of files and folders inside "/opt/adobe/fms/applications/bitratesProvider/videosFolder/004/4948"

    You may make this code a bit safe to crash.. like this:

    Client.prototype.getVideoBitrates = function( id, type ){

            if( type == "full" ){

                    type = "."

            }else if( type == "preview" ){

                    type = "_001";

            }else if( type == "trailer" ){

                    type = "_002";

            }

            var a = new Array();

            var thousandCoe = Math.floor( id / 1000 );

            var thousandFolder = ( thousandCoe < 10 )? "00" + String(thousandCoe) : "0" + String(thousandCoe)

            //

            trace("videosFolder/" + thousandFolder + "/" + id);

            var fileDirHolder = new File( "videosFolder/" + thousandFolder + "/" + id );

           trace("fileDirHolder: " + fileDirHolder);

          if(fileDirHolder.exists)

          {

          

                var aDir = fileDirHolder.list();

                if(aDir != null && aDir != undefined)

                {

                 //

                 trace("type: " + type );

                 for( var i = 0; i < aDir.length;  i++ ){

                         if( String(aDir).indexOf( ("1000k" + type) ) != -1 ){

                                 a.push( {id:"1000k", value:1000} );

                         }

                         if( String(aDir).indexOf( ("700k" + type) ) != -1 ){

                                 a.push( {id:"700k", value:700} );

                         }

                         if( String(aDir).indexOf( ("1600k" + type) ) != -1 ){

                                 a.push( {id:"1600k", value:1600} );

                         }

                         if( String(aDir).indexOf( ("240k" + type) ) != -1 ){

                                 a.push( {id:"240k", value:240} );

                         }

                         if( String(aDir).indexOf( ("360k" + type) ) != -1 ){

                                 a.push( {id:"360k", value:360} );

                         }

                         //trace("a: " + a.toString() );

                    }

             }

            //trace("Call getVideoBitrates()....... > " + a.toString() );

            this.call("getVideoBitrates", null, a);

            //

            this.disconnectUser();

         }

         else

         {

          trace("fileDirHolder: " + fileDirHolder + " do not exist");

         }

    }

    Here is more info on File API http://help.adobe.com/en_US/flashmediaserver/ssaslr/WS5b3ccc516d4fbf351e63e3d11a11afc95e-7eacSSASLR.html#WS5b3ccc516d4fbf351e63e3d11a11afc95e-7fb4SSASLR

    October 31, 2011

    Hey Nitin... i never needed this folder to exist before, just the /opt/adobe/fms/applications/vod/media/000~005

    Only after upgrade it seemed  wanted that folder, so i created a symlink and it works fine and i also added your code mod too, seems great so far....

    I thank you very much for your help!

    Have a super day!