NS_ERROR_XPC_BAD_CONVERT_JS

63 views
Skip to first unread message

expresso

unread,
Sep 9, 2010, 2:51:26 PM9/9/10
to Google Data Javascript Client
I get this when trying to run my code that is using the JavaScript
API. At the top of my page I try to include the JS for the library:

<!-- load the GData JS API -->
<script type="text/javascript" src="http://www.google.com/jsapi?
key=ABQIAAAAjJrYkRB1OGxorj0el1BUGhSu0P5k3loIpod_WFteEaesetH9jBSeyKhFdt_CdxGVGRNxyxx2kJiuzg"></
script>

so this key is set to "http://localhost/OurAppName" in this case. I
assume it's failing because it can't validate the domain that has been
set to this key?

Should I be using "http://localhost/" instead?

Monsur Hossain

unread,
Sep 9, 2010, 2:57:57 PM9/9/10
to google-data-ja...@googlegroups.com
You should not need a key to load the JavaScript client.  The error you are receiving sounds like a browser-level error.  Can you give more details, or post your full code snippet?



--
You received this message because you are subscribed to the Google Groups "Google Data Javascript Client" group.
To post to this group, send email to google-data-ja...@googlegroups.com.
To unsubscribe from this group, send email to google-data-javascri...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-data-javascript-client?hl=en.


expresso

unread,
Sep 9, 2010, 2:59:50 PM9/9/10
to Google Data Javascript Client
Thanks.

Then why are the docs here saying I do need a key?
http://code.google.com/apis/libraries/devguide.html

On Sep 9, 1:57 pm, Monsur Hossain <mon...@gmail.com> wrote:
> You should not need a key to load the JavaScript client.  The error you are
> receiving sounds like a browser-level error.  Can you give more details, or
> post your full code snippet?
>
> On Thu, Sep 9, 2010 at 2:51 PM, expresso <dschin...@gmail.com> wrote:
> > I get this when trying to run my code that is using the JavaScript
> > API.  At the top of my page I try to include the JS for the library:
>
> > <!-- load the GData JS API -->
> > <script type="text/javascript" src="http://www.google.com/jsapi?
>
> > key=ABQIAAAAjJrYkRB1OGxorj0el1BUGhSu0P5k3loIpod_WFteEaesetH9jBSeyKhFdt_CdxGVGRNxyxx2kJiuzg"></
> > script>
>
> > so this key is set to "http://localhost/OurAppName" in this case.  I
> > assume it's failing because it can't validate the domain that has been
> > set to this key?
>
> > Should I be using "http://localhost/" instead?
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Data Javascript Client" group.
> > To post to this group, send email to
> > google-data-ja...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-data-javascri...@googlegroups.com<google-data-javascript-client%2Bunsu...@googlegroups.com>
> > .

expresso

unread,
Sep 9, 2010, 3:05:32 PM9/9/10
to Google Data Javascript Client
Here's a snippet of some of my code

<script src="content/js/jquery.cookie.js" language="javascript"
type="text/javascript"></script>
<script src="content/js/PicasaAPI.js" language="javascript" type="text/
javascript"></script>

<!-- load the GData JS API -->
<script type="text/javascript" src="http://www.google.com/jsapi?
key=ABQIAAAAjJrYkRB1OGxorj0el1BUGhSw63AUEPe20_rPVUd2iGH8VnWYPRQlh_JCdGjKRNRVVIpZGvaI-
XZIpQ"></script>

<script type="text/javascript">

function PicasaJsSdkInitializedCallback()
{
$(function ()
{
InitializeForm();
});
}


// NOTES: any code that uses the JavaScript client in the
onGoogleDataLoad() function

// Load the latest version of the Google Data JavaScript Client
google.load('gdata', '2.x');

// Call function once the js library has loaded
google.setOnLoadCallback(PicasaJsSdkInitializedCallback());

</script>


then I also tried <script type="text/javascript" src="http://
www.google.com/jsapi"></script>

On Sep 9, 1:57 pm, Monsur Hossain <mon...@gmail.com> wrote:
> You should not need a key to load the JavaScript client.  The error you are
> receiving sounds like a browser-level error.  Can you give more details, or
> post your full code snippet?
>
> On Thu, Sep 9, 2010 at 2:51 PM, expresso <dschin...@gmail.com> wrote:
> > I get this when trying to run my code that is using the JavaScript
> > API.  At the top of my page I try to include the JS for the library:
>
> > <!-- load the GData JS API -->
> > <script type="text/javascript" src="http://www.google.com/jsapi?
>
> > key=ABQIAAAAjJrYkRB1OGxorj0el1BUGhSu0P5k3loIpod_WFteEaesetH9jBSeyKhFdt_CdxGVGRNxyxx2kJiuzg"></
> > script>
>
> > so this key is set to "http://localhost/OurAppName" in this case.  I
> > assume it's failing because it can't validate the domain that has been
> > set to this key?
>
> > Should I be using "http://localhost/" instead?
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Data Javascript Client" group.
> > To post to this group, send email to
> > google-data-ja...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-data-javascri...@googlegroups.com<google-data-javascript-client%2Bunsu...@googlegroups.com>
> > .

expresso

unread,
Sep 9, 2010, 3:04:25 PM9/9/10
to Google Data Javascript Client
Even without the key, I still get that error in Firebug's console.

On Sep 9, 1:57 pm, Monsur Hossain <mon...@gmail.com> wrote:
> You should not need a key to load the JavaScript client.  The error you are
> receiving sounds like a browser-level error.  Can you give more details, or
> post your full code snippet?
>
> On Thu, Sep 9, 2010 at 2:51 PM, expresso <dschin...@gmail.com> wrote:
> > I get this when trying to run my code that is using the JavaScript
> > API.  At the top of my page I try to include the JS for the library:
>
> > <!-- load the GData JS API -->
> > <script type="text/javascript" src="http://www.google.com/jsapi?
>
> > key=ABQIAAAAjJrYkRB1OGxorj0el1BUGhSu0P5k3loIpod_WFteEaesetH9jBSeyKhFdt_CdxGVGRNxyxx2kJiuzg"></
> > script>
>
> > so this key is set to "http://localhost/OurAppName" in this case.  I
> > assume it's failing because it can't validate the domain that has been
> > set to this key?
>
> > Should I be using "http://localhost/" instead?
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Data Javascript Client" group.
> > To post to this group, send email to
> > google-data-ja...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-data-javascri...@googlegroups.com<google-data-javascript-client%2Bunsu...@googlegroups.com>
> > .

Monsur Hossain

unread,
Sep 9, 2010, 5:08:47 PM9/9/10
to google-data-ja...@googlegroups.com
Your code looks alright.  What you're doing sounds pretty simple, it shouldn't result in a browser-level error.  The Quick Start section of the main page shows an example of the most basic setup for the client library:


Can you try using that as a template?  Here is a more involved example that demonstrates how to do auth:



To unsubscribe from this group, send email to google-data-javascri...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages