I'd look more deeply at #1 -- the container will likely have a goodly amount of trouble if it's trying to send a call to itself, since there's no initialization for a self-call :) Figure out why that's occurring and I'd imagine we can get rid of the problem. Sounds like it's not container <-> gadget communication related at all.
--j On Wed, Jul 7, 2010 at 1:01 PM, Randy Watler <[email protected]> wrote: > Kam/John, > > I did a little more digging and determined the following: > > 1. It appears that the first error is occurring while the container is > being loaded, so at that point gadgets are not initializing. As I mentioned > before, the error seems to be the result of an unexpected configuration > since the container is trying to send an rpc call strangely to itself to > initialize the supported opensocial API lists. > > 2. The iframe url generated by the sample container does indeed have the > parent specified: "http://localhost:8080" as one might expect invoking the > standard sample container: > http://localhost:8080/samplecontainer/samplecontainer.html. > > 3. The sample container code invokes the setRelayUrl() and setAuthToken() > as one would expect. This is done right before the second warning is issued. > Here are the call signatures that were invoked, (see shindig-container.js): > > setRelayUrl('remote_iframe_0', ' > http://127.0.0.1:8080/samplecontainer/../../gadgets/../container/rpc_relay.html > ') > setAuthToken('remote_iframe_0', 1894167205) > > From this it seems that the sample container is currently following both of > your suggestions. Perhaps someone else is seeing these same errors/warnings > in the browser and can add more information. Otherwise, it seems like I'll > have to trace the code in more detail for you guys and generate a more > formal JIRA issue. > > Thanks for the tips! > > Randy > > > Kam Kasravi wrote: > >> Actually just setting the iframe's parent to point to the container will >> allow the 2 calls below to work. >> That is the iframe's src should contain a parent parameter that is the >> same as the parent. >> >> kam >> >> On Jul 7, 2010, at 8:31 AM, John Hjelmstad wrote: >> >> >> >>> Hi Randy: >>> >>> What's the top-level page, and how is each gadget initialized to >>> gadgets.rpc? I'm unaware of any updates to the underlying lib that >>> generates >>> these errors so I suspect something may have changed in sample >>> container's >>> gadget init sequence. >>> >>> For each gadget, you need to do: gadgets.rpc.setRelayUrl(gadgetId, >>> relayUrl) >>> and gadgets.rpc.setAuthToken(gadgetId, rpctoken); for the library to work >>> appropriately. >>> >>> -j >>> >>> On Mon, Jul 5, 2010 at 2:11 PM, Randy Watler <[email protected]> >>> wrote: >>> >>> >>> >>>> Shindig Team, >>>> >>>> Earlier today I updated my local sandbox version of shindig to SVN >>>> revision >>>> 960614. When I build and start the server and access the sample >>>> container in >>>> Firefox 3 with Firebug open, I get the following console output: >>>> >>>> No relay set (used as window.postMessage targetOrigin), cannot send >>>> cross-domain message >>>> [Break on this error] (undefined out of range 94) >>>> POST http://localhost:8080/gadgets/metadata 200 OK 63ms >>>> >>>> http://localhost:8080/gadgets/js/core:rpc:pubsub:shindig-container.js?c=1&debug=1(line3678) >>>> POST >>>> >>>> http://localhost:8080/social/rest/samplecontainer/setstate?st=canonical%3Ajohn.doe%3A6450%3Ashindig%3Ahttp%253A//localhost%253A8080/samplecontainer/examples/SocialHelloWorld.xml%3A0%3Adefault200OK >>>> 13ms >>>> >>>> http://localhost:8080/gadgets/js/core:rpc:pubsub:shindig-container.js?c=1&debug=1(line3678) >>>> Unknown RPC service: osapi._handleGadgetRpcMethod >>>> >>>> http://localhost:8080/gadgets/js/core:rpc:pubsub:shindig-container.js?c=1&debug=1(line779) >>>> POST >>>> >>>> http://127.0.0.1:8080/rpc?st=canonical%3Ajohn.doe%3A6450%3Ashindig%3Ahttp%253A%2F%2Flocalhost%253A8080%2Fsamplecontainer%2Fexamples%2FSocialHelloWorld.xml%3A0%3Adefault200OK >>>> 9ms >>>> >>>> http://localhost:8080/gadgets/js/auth-refresh:core:core.config:core.io:core.json:core.legacy:core.log:core.prefs:core.util:dynamic-height:dynamic-height.util:globals:locked-domain:osapi:rpc:security-token:settitle:shindig.auth.js?container=default&nocache=1&debug=0(line245) >>>> >>>> The first error that appears, "No relay set...", has appeared for at >>>> least >>>> a few weeks in trunk. I have tried to determine why this error appears. >>>> As >>>> near as I can tell, the container is trying to send a message to itself >>>> over >>>> rpc during osapi.services initialization. I have not been able to >>>> identify >>>> where the container code or my configuration is going wrong here. >>>> >>>> The second warning, "Unknown RPC service...", just appeared when I >>>> updated >>>> from earlier this week. I am wondering if this is a regression or an >>>> expected warning. >>>> >>>> I am interested in getting these issues cleaned up in my container >>>> configuration before I move into gadget development, but am struggling a >>>> bit >>>> with the deployment of Shindig in our environment. These show up the in >>>> sample container as they do in our container, (which based on the sample >>>> container code). Any tips would be greatly appreciated... thanks! >>>> >>>> Randy >>>> >>>> >>>> >>> >> >> >> > >
