Welcome Developers!

in

Welcome!

in

Javascript Errors

Last post 06-02-2010 3:52 PM by Joel. 12 replies.
Page 1 of 1 (13 items)
Sort Posts: Previous Next
  • 04-13-2010 6:17 AM

    Javascript Errors

    Hello All, 

     

    Im having some problems with the opensocial javascript API. Looks like the API is throwing a lot of errors, and at some point the errors are fatal and stop the execution of the rest of the code. 

     

    errors, in sequence:

        '_events' is null or is not an object -   myspace_ruv5pd6u.js, line 1 Character 33674

        'undefined' is null or is not an object -   myspace_ruv5pd6u.js, line 1 Character 33689

       '_events' is null or is not an object  - myspace_ruv5pd6u.js, line 1 Character 33702

      '_events' is null or is not an object  - myspace_ruv5pd6u.js, line 1 Character 33728

      'addEventListener' is null or is not an object  - myspace_ruv5pd6u.js, line 1 Character 33752

      'undefined' is null or is not an object  myspace_ruv5pd6u.js, line 1 Character 33830

      'attachEvent' is null or is not an object  myspace_ruv5pd6u.js, line 1 Character 33865

      'undefined' is null or is not an object  myspace_ruv5pd6u.js, line 1 Character 33948

      'length' is null or is not an object  myspace_ruv5pd6u.js, line 1 Character 33973

     

    Here the errors become fatal

     

      The object dont give support for the property or method myopenspace.v09.018.js, line 2 Character 34123

       Function missing  myspace_ruv5pd6u.js, line 1 Character 28147

     

     

     After ignoring this errors, the script works as normal. In firefox, none of the errors is showing.

     

    Filed under:
  • 04-13-2010 2:01 PM In reply to

    Re: Javascript Errors

     What is your appID and can you send me steps so I can see this for myself in your app? I presume this is only happening in IE?

     

    thanks,

    Joel

  • 04-14-2010 5:19 AM In reply to

    Re: Javascript Errors

     appid 183854

     

    To reproduce, just access the application. All the javascript errors take place in the loading process, when i try to get some information from myspace regarding the user.

     

    If it helps, happens near the time when i try to get the information from the friends of the user, both in internet explorer and in minefield 3.7a5 with firebug activated, as i deactivate firebug it runs without problems. Firefox 3.6 runs the code ok too, with or without firebug activated.

  • 04-14-2010 2:45 PM In reply to

    Re: Javascript Errors

    Can you send me the source code on your canvas page? Are you using code from MyspaceID JSL or some other source? I have not seen this issue come up for any other developer before.

     

    thanks,

    Joel

  • 04-15-2010 6:33 AM In reply to

    Re: Javascript Errors

     Of course. But you just accept message from friends, so you need to provide me an email or something like that where i can send the code to you. And about the sources, i use myspace javascript sources and mixpanel too, but i had removed mixpanel code and the error persists.

  • 04-15-2010 11:38 AM In reply to

    Re: Javascript Errors

     Actually, I will troubleshoot it another way. I will get back to you.

     

    -Joel

  • 04-19-2010 9:36 AM In reply to

    Re: Javascript Errors

     Ok Joel, maybe i had discovered the error. It occurs exactly when i try to get the gender of the viewer. Removing the fields param solve the problem, but i still cant find a workaround for this. Any help is appreciated. The code is

     

    var fields = [opensocial.Person.Field.ABOUT_ME,
                        opensocial.Person.Field.AGE,
                        opensocial.Person.Field.BODY_TYPE,
                        opensocial.Person.Field.BOOKS,
                        opensocial.Person.Field.CHILDREN,
                        opensocial.Person.Field.CURRENT_LOCATION,
                        opensocial.Person.Field.DATE_OF_BIRTH,
                        opensocial.Person.Field.DRINKER,
                        opensocial.Person.Field.ETHNICITY,
                        opensocial.Person.Field.GENDER,
                        opensocial.Person.Field.HAS_APP,
                        opensocial.Person.Field.HEROES,
                        opensocial.Person.Field.ID,
                        opensocial.Person.Field.INTERESTS,
                        opensocial.Person.Field.JOBS,
                        opensocial.Person.Field.LOOKING_FOR,
                        opensocial.Person.Field.MOVIES,
                        opensocial.Person.Field.MUSIC,
                        opensocial.Person.Field.NAME,
                        opensocial.Person.Field.NETWORK_PRESENCE,
                        opensocial.Person.Field.NICKNAME,
                        opensocial.Person.Field.PROFILE_SONG,
                        opensocial.Person.Field.PROFILE_URL,
                        opensocial.Person.Field.RELATIONSHIP_STATUS,
                        opensocial.Person.Field.RELIGION,
                        opensocial.Person.Field.SEXUAL_ORIENTATION,
                        opensocial.Person.Field.SMOKER,
                        opensocial.Person.Field.STATUS,
                        opensocial.Person.Field.THUMBNAIL_URL,
                        opensocial.Person.Field.TV_SHOWS,
                        opensocial.Person.Field.URLS,
                        MyOpenSpace.Person.Field.MEDIUM_IMAGE,
                        MyOpenSpace.Person.Field.LARGE_IMAGE];

    params = {};
        params[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS] = fields;

        var viewerReq = os.newFetchPersonRequest(opensocial.IdSpec.PersonId.VIEWER,params);

    dataReqObj.add(viewerReq, "viewer");

     

     

    EDIT: Javascript error

     User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; OfficeLiveConnector.1.3; OfficeLivePatch.0.0; .NET CLR 3.0.30729)
    Timestamp: Tue, 20 Apr 2010 12:33:43 UTC


    Message: Object doesn't support this property or method
    Line: 1
    Char: 88006
    Code: 0
    URI: http://x.myspacecdn.com/OpenSocial/

  • 04-22-2010 1:32 PM In reply to

    Re: Javascript Errors

     William,

    I have one of our experts looking into this now. If you have any news, let me know. 

    We will hopefully get back to you shortly.

     

    thanks,

    Joel

  • 04-23-2010 2:30 PM In reply to

    Re: Javascript Errors

     It looks like an issue with Opensocial version, but the team is still investigating.

     

    thanks,

    Joel

  • 05-12-2010 4:27 PM In reply to

    Re: Javascript Errors

     Our devs were able to get this to work using the following code:

    -->

    <?xml version="1.0" encoding="utf-8" ?>
    - <Module>
    - <ModulePrefs title="Test App" description="Test app">
      <Require feature="opensocial-0.9" />
    - <Optional feature="MySpace-Views">
      <Param name="profilesize">300</Param>
      <Param name="profilelocation">right</Param>
      <Param name="canvassize">100,800</Param>
      <Param name="homesize">250</Param>
      </Optional>
      </ModulePrefs>
    - <Content type="html" view="canvas">
    - <script type="text/os-template">
    - <script type="text/javascript">
      //
    - <![CDATA[
    				var os = opensocial.Container.get();

    var fields = [opensocial.Person.Field.ABOUT_ME,
    opensocial.Person.Field.AGE,
    opensocial.Person.Field.BODY_TYPE,
    opensocial.Person.Field.BOOKS,
    opensocial.Person.Field.CHILDREN,
    opensocial.Person.Field.CURRENT_LOCATION,
    opensocial.Person.Field.DATE_OF_BIRTH,
    opensocial.Person.Field.DRINKER,
    opensocial.Person.Field.ETHNICITY,
    opensocial.Person.Field.GENDER,
    opensocial.Person.Field.HAS_APP,
    opensocial.Person.Field.HEROES,
    opensocial.Person.Field.ID,
    opensocial.Person.Field.INTERESTS,
    opensocial.Person.Field.JOBS,
    opensocial.Person.Field.LOOKING_FOR,
    opensocial.Person.Field.MOVIES,
    opensocial.Person.Field.MUSIC,
    opensocial.Person.Field.NAME,
    opensocial.Person.Field.NETWORK_PRESENCE,
    opensocial.Person.Field.NICKNAME,
    opensocial.Person.Field.PROFILE_SONG,
    opensocial.Person.Field.PROFILE_URL,
    opensocial.Person.Field.RELATIONSHIP_STATUS,
    opensocial.Person.Field.RELIGION,
    opensocial.Person.Field.SEXUAL_ORIENTATION,
    opensocial.Person.Field.SMOKER,
    opensocial.Person.Field.STATUS,
    opensocial.Person.Field.THUMBNAIL_URL,
    opensocial.Person.Field.TV_SHOWS,
    opensocial.Person.Field.URLS,
    MyOpenSpace.Person.Field.MEDIUM_IMAGE,
    MyOpenSpace.Person.Field.LARGE_IMAGE];

    params = {};
    params[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS] = fields;

    var viewerReq = os.newFetchPersonRequest(opensocial.IdSpec.PersonId.VIEWER,params);
    debugger;
    var dataReqObj = opensocial.newDataRequest();
    dataReqObj.add(viewerReq, "viewer");
    var postBack = function(data){
    debugger;
    var myData = data;
    }
    dataReqObj.send(postBack);

    //
      ]]> f(clean);
      </script>
      </script>
      </Content>
      </Module>

     

    Everything will work except gender unless you set the proper permission to get this value using the request permission method or in the settings of the application.

     

    -Joel

  • 05-29-2010 9:47 PM In reply to

    • Sal
    • Not Ranked
    • Joined on 09-16-2009
    • Posts 2

    Re: Javascript Errors

    please help me with these Javascript Errors. Thank You!!!

  • 05-29-2010 9:53 PM In reply to

    • Sal
    • Not Ranked
    • Joined on 09-16-2009
    • Posts 2

    Re: Javascript Errors

    I think it started with my game on my space Texasholdem by Zinga same message continues popping up on my friends request after I have denied them same message repeats itself

    Filed under:
  • 06-02-2010 3:52 PM In reply to

    Re: Javascript Errors

     Can you provide the appID of this app and be specific about what problems you are seeing?

     

    thanks,

    Joel

Page 1 of 1 (13 items)