You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Erel Segal <er...@gmail.com> on 2008/07/15 14:53:13 UTC

Problem running the sample gadgets

I try to run the sample gadgets in javascript/samplecontainer/examples, e.g.

http://localhost/shindig/php/gadgets/ifr?url=http://localhost/shindig/php/gadgets/files/samplecontainer/examples/SocialHelloWorld.xml&nocache=1&container=container07

(shindig/php/ is my web_prefix, and container07 is a configuration file
where I changed all the paths to match this setting.

I get the following Javascript error:

data.get("viewer") has no properties
render(Object responseItems_=Object globalError_=true)ifr (line 312)
sendResponse(Object responses=false error=badRequest)ifr (line 151)
processNonProxiedResponse("/shindig/php/social/data", function(),
ObjectCONTENT_TYPE=
JSON METHOD=POST AUTHORIZATION=SIGNED, XMLHttpRequest)ifr (line 84)
makeClosure()ifr (line 23)
var viewer = data.get('viewer').getData();

I get the same error on all three gadgets in that folder.

Can you please tell me what I am doing wrong?

Re: Problem running the sample gadgets

Posted by Gonzalo Aune <go...@gmail.com>.
The Token have this order:

OWNER_KEY:APP_KEY:VIEWER_KEY:DOMAIN_KEY:APPURL_KEY:MODULE_KEY

G.-

On Wed, Jul 16, 2008 at 11:18 AM, Erel Segal <er...@gmail.com> wrote:

> Thank you, that solved the problem.
>
> I understand that the first two parts of the token are the userids of the
> owner and the viewer. What are the other four? The gadget seems to be
> working even when I put
> john.doe:jane.doe:abc:def:ghi:jkl<
> http://example.org/foo?bar=1&st=jane.doe:jane.doe:appid:cont:url:0>
>
> <http://example.org/foo?bar=1&st=jane.doe:jane.doe:appid:cont:url:0>
> 2008/7/16, Chris Chabot <ch...@xs4all.nl>:
> >
> > yep ... a valid gadget token :)
> >
> > if you have 'allow plain text tokens' set to true in your config, you can
> > add a token like?
> >
> > http://example.org/foo?bar=1&st=jane.doe:jane.doe:appid:cont:url:0
> >
> > jane.doe & john.doe work as users if your using the sample container xml,
> > otherwise replace those with proper user id's.
> >
> >        -- Chris
> >
> > On Jul 16, 2008, at 1:36 PM, Erel Segal wrote:
> >
> >  OK, after some debugging I found out that the POST request causes the
> >> server
> >> to throw an INVALID_GADGET_TOKEN exception. What should I do? Is there
> >> anything I should add to the URL to make it run?
> >>
> >> 2008/7/15, Erel Segal <er...@gmail.com>:
> >>
> >>>
> >>> I try to run the sample gadgets in javascript/samplecontainer/examples,
> >>> e.g.
> >>>
> >>>
> >>>
> >>>
> http://localhost/shindig/php/gadgets/ifr?url=http://localhost/shindig/php/gadgets/files/samplecontainer/examples/SocialHelloWorld.xml&nocache=1&container=container07
> >>>
> >>> (shindig/php/ is my web_prefix, and container07 is a configuration file
> >>> where I changed all the paths to match this setting.
> >>>
> >>> I get the following Javascript error:
> >>>
> >>> data.get("viewer") has no properties
> >>> render(Object responseItems_=Object globalError_=true)ifr (line 312)
> >>> sendResponse(Object responses=false error=badRequest)ifr (line 151)
> >>> processNonProxiedResponse("/shindig/php/social/data", function(),
> >>> ObjectCONTENT_TYPE=
> >>> JSON METHOD=POST AUTHORIZATION=SIGNED, XMLHttpRequest)ifr (line 84)
> >>> makeClosure()ifr (line 23)
> >>> var viewer = data.get('viewer').getData();
> >>>
> >>> I get the same error on all three gadgets in that folder.
> >>>
> >>> Can you please tell me what I am doing wrong?
> >>>
> >>>
> >>>
> >>>
> >
>

Re: Problem running the sample gadgets

Posted by Chris Chabot <ch...@xs4all.nl>.
owner, viewer, application id, container name, url of the gadget and  
the module id

sometimes you have specific configuration for container 'foo' in  
shindig/config/foo.js, and the token indicates which container it's  
for ... likewise when an operation does something with the app id  
(store / retrieve app data for instance), the application id from the  
token is used.



On Jul 16, 2008, at 4:18 PM, Erel Segal wrote:

> Thank you, that solved the problem.
>
> I understand that the first two parts of the token are the userids  
> of the
> owner and the viewer. What are the other four? The gadget seems to be
> working even when I put
> john.doe:jane.doe:abc:def:ghi:jkl<http://example.org/foo?bar=1&st=jane.doe:jane.doe:appid:cont:url:0 
> >
>
> <http://example.org/foo?bar=1&st=jane.doe:jane.doe:appid:cont:url:0>
> 2008/7/16, Chris Chabot <ch...@xs4all.nl>:
>>
>> yep ... a valid gadget token :)
>>
>> if you have 'allow plain text tokens' set to true in your config,  
>> you can
>> add a token like?
>>
>> http://example.org/foo?bar=1&st=jane.doe:jane.doe:appid:cont:url:0
>>
>> jane.doe & john.doe work as users if your using the sample  
>> container xml,
>> otherwise replace those with proper user id's.
>>
>>       -- Chris
>>
>> On Jul 16, 2008, at 1:36 PM, Erel Segal wrote:
>>
>> OK, after some debugging I found out that the POST request causes the
>>> server
>>> to throw an INVALID_GADGET_TOKEN exception. What should I do? Is  
>>> there
>>> anything I should add to the URL to make it run?
>>>
>>> 2008/7/15, Erel Segal <er...@gmail.com>:
>>>
>>>>
>>>> I try to run the sample gadgets in javascript/samplecontainer/ 
>>>> examples,
>>>> e.g.
>>>>
>>>>
>>>>
>>>> http://localhost/shindig/php/gadgets/ifr?url=http://localhost/shindig/php/gadgets/files/samplecontainer/examples/SocialHelloWorld.xml&nocache=1&container=container07
>>>>
>>>> (shindig/php/ is my web_prefix, and container07 is a  
>>>> configuration file
>>>> where I changed all the paths to match this setting.
>>>>
>>>> I get the following Javascript error:
>>>>
>>>> data.get("viewer") has no properties
>>>> render(Object responseItems_=Object globalError_=true)ifr (line  
>>>> 312)
>>>> sendResponse(Object responses=false error=badRequest)ifr (line 151)
>>>> processNonProxiedResponse("/shindig/php/social/data", function(),
>>>> ObjectCONTENT_TYPE=
>>>> JSON METHOD=POST AUTHORIZATION=SIGNED, XMLHttpRequest)ifr (line 84)
>>>> makeClosure()ifr (line 23)
>>>> var viewer = data.get('viewer').getData();
>>>>
>>>> I get the same error on all three gadgets in that folder.
>>>>
>>>> Can you please tell me what I am doing wrong?
>>>>
>>>>
>>>>
>>>>
>>


Re: Problem running the sample gadgets

Posted by Erel Segal <er...@gmail.com>.
Thank you, that solved the problem.

I understand that the first two parts of the token are the userids of the
owner and the viewer. What are the other four? The gadget seems to be
working even when I put
john.doe:jane.doe:abc:def:ghi:jkl<http://example.org/foo?bar=1&st=jane.doe:jane.doe:appid:cont:url:0>

<http://example.org/foo?bar=1&st=jane.doe:jane.doe:appid:cont:url:0>
2008/7/16, Chris Chabot <ch...@xs4all.nl>:
>
> yep ... a valid gadget token :)
>
> if you have 'allow plain text tokens' set to true in your config, you can
> add a token like?
>
> http://example.org/foo?bar=1&st=jane.doe:jane.doe:appid:cont:url:0
>
> jane.doe & john.doe work as users if your using the sample container xml,
> otherwise replace those with proper user id's.
>
>        -- Chris
>
> On Jul 16, 2008, at 1:36 PM, Erel Segal wrote:
>
>  OK, after some debugging I found out that the POST request causes the
>> server
>> to throw an INVALID_GADGET_TOKEN exception. What should I do? Is there
>> anything I should add to the URL to make it run?
>>
>> 2008/7/15, Erel Segal <er...@gmail.com>:
>>
>>>
>>> I try to run the sample gadgets in javascript/samplecontainer/examples,
>>> e.g.
>>>
>>>
>>>
>>> http://localhost/shindig/php/gadgets/ifr?url=http://localhost/shindig/php/gadgets/files/samplecontainer/examples/SocialHelloWorld.xml&nocache=1&container=container07
>>>
>>> (shindig/php/ is my web_prefix, and container07 is a configuration file
>>> where I changed all the paths to match this setting.
>>>
>>> I get the following Javascript error:
>>>
>>> data.get("viewer") has no properties
>>> render(Object responseItems_=Object globalError_=true)ifr (line 312)
>>> sendResponse(Object responses=false error=badRequest)ifr (line 151)
>>> processNonProxiedResponse("/shindig/php/social/data", function(),
>>> ObjectCONTENT_TYPE=
>>> JSON METHOD=POST AUTHORIZATION=SIGNED, XMLHttpRequest)ifr (line 84)
>>> makeClosure()ifr (line 23)
>>> var viewer = data.get('viewer').getData();
>>>
>>> I get the same error on all three gadgets in that folder.
>>>
>>> Can you please tell me what I am doing wrong?
>>>
>>>
>>>
>>>
>

Re: Problem running the sample gadgets

Posted by Gonzalo Aune <go...@gmail.com>.
Also, it could be some cache problem, i had the same problem before and a
ctrl+f5 solved that =)

G.-

On Wed, Jul 16, 2008 at 8:55 AM, Chris Chabot <ch...@xs4all.nl> wrote:

> yep ... a valid gadget token :)
>
> if you have 'allow plain text tokens' set to true in your config, you can
> add a token like?
>
> http://example.org/foo?bar=1&st=jane.doe:jane.doe:appid:cont:url:0
>
> jane.doe & john.doe work as users if your using the sample container xml,
> otherwise replace those with proper user id's.
>
>        -- Chris
>
>
> On Jul 16, 2008, at 1:36 PM, Erel Segal wrote:
>
>  OK, after some debugging I found out that the POST request causes the
>> server
>> to throw an INVALID_GADGET_TOKEN exception. What should I do? Is there
>> anything I should add to the URL to make it run?
>>
>> 2008/7/15, Erel Segal <er...@gmail.com>:
>>
>>>
>>> I try to run the sample gadgets in javascript/samplecontainer/examples,
>>> e.g.
>>>
>>>
>>>
>>> http://localhost/shindig/php/gadgets/ifr?url=http://localhost/shindig/php/gadgets/files/samplecontainer/examples/SocialHelloWorld.xml&nocache=1&container=container07
>>>
>>> (shindig/php/ is my web_prefix, and container07 is a configuration file
>>> where I changed all the paths to match this setting.
>>>
>>> I get the following Javascript error:
>>>
>>> data.get("viewer") has no properties
>>> render(Object responseItems_=Object globalError_=true)ifr (line 312)
>>> sendResponse(Object responses=false error=badRequest)ifr (line 151)
>>> processNonProxiedResponse("/shindig/php/social/data", function(),
>>> ObjectCONTENT_TYPE=
>>> JSON METHOD=POST AUTHORIZATION=SIGNED, XMLHttpRequest)ifr (line 84)
>>> makeClosure()ifr (line 23)
>>> var viewer = data.get('viewer').getData();
>>>
>>> I get the same error on all three gadgets in that folder.
>>>
>>> Can you please tell me what I am doing wrong?
>>>
>>>
>>>
>>>
>

Re: Problem running the sample gadgets

Posted by Chris Chabot <ch...@xs4all.nl>.
yep ... a valid gadget token :)

if you have 'allow plain text tokens' set to true in your config, you  
can add a token like?

http://example.org/foo?bar=1&st=jane.doe:jane.doe:appid:cont:url:0

jane.doe & john.doe work as users if your using the sample container  
xml, otherwise replace those with proper user id's.

	-- Chris

On Jul 16, 2008, at 1:36 PM, Erel Segal wrote:

> OK, after some debugging I found out that the POST request causes  
> the server
> to throw an INVALID_GADGET_TOKEN exception. What should I do? Is there
> anything I should add to the URL to make it run?
>
> 2008/7/15, Erel Segal <er...@gmail.com>:
>>
>> I try to run the sample gadgets in javascript/samplecontainer/ 
>> examples,
>> e.g.
>>
>>
>> http://localhost/shindig/php/gadgets/ifr?url=http://localhost/shindig/php/gadgets/files/samplecontainer/examples/SocialHelloWorld.xml&nocache=1&container=container07
>>
>> (shindig/php/ is my web_prefix, and container07 is a configuration  
>> file
>> where I changed all the paths to match this setting.
>>
>> I get the following Javascript error:
>>
>> data.get("viewer") has no properties
>> render(Object responseItems_=Object globalError_=true)ifr (line 312)
>> sendResponse(Object responses=false error=badRequest)ifr (line 151)
>> processNonProxiedResponse("/shindig/php/social/data", function(),  
>> ObjectCONTENT_TYPE=
>> JSON METHOD=POST AUTHORIZATION=SIGNED, XMLHttpRequest)ifr (line 84)
>> makeClosure()ifr (line 23)
>> var viewer = data.get('viewer').getData();
>>
>> I get the same error on all three gadgets in that folder.
>>
>> Can you please tell me what I am doing wrong?
>>
>>
>>


Re: Problem running the sample gadgets

Posted by Erel Segal <er...@gmail.com>.
OK, after some debugging I found out that the POST request causes the server
to throw an INVALID_GADGET_TOKEN exception. What should I do? Is there
anything I should add to the URL to make it run?

2008/7/15, Erel Segal <er...@gmail.com>:
>
> I try to run the sample gadgets in javascript/samplecontainer/examples,
> e.g.
>
>
> http://localhost/shindig/php/gadgets/ifr?url=http://localhost/shindig/php/gadgets/files/samplecontainer/examples/SocialHelloWorld.xml&nocache=1&container=container07
>
> (shindig/php/ is my web_prefix, and container07 is a configuration file
> where I changed all the paths to match this setting.
>
> I get the following Javascript error:
>
> data.get("viewer") has no properties
> render(Object responseItems_=Object globalError_=true)ifr (line 312)
> sendResponse(Object responses=false error=badRequest)ifr (line 151)
> processNonProxiedResponse("/shindig/php/social/data", function(), ObjectCONTENT_TYPE=
> JSON METHOD=POST AUTHORIZATION=SIGNED, XMLHttpRequest)ifr (line 84)
> makeClosure()ifr (line 23)
> var viewer = data.get('viewer').getData();
>
> I get the same error on all three gadgets in that folder.
>
> Can you please tell me what I am doing wrong?
>
>
>