You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Alexander Gabriel <al...@barbalex.ch> on 2011/07/01 00:20:10 UTC

Re: update from 1.02 to 1.1.0 > Error: "userCtx is null"

Here it is again, this time .html changed to .txt
The actual site is here:
http://barbalex.iriscouch.com/evab-ch_barbalex_evab/_design/evab/index.html
You need to sign up as it is meant for saving sightings of species and users
should only see their own sightings.

Thanks for looking into it!

Alex



2011/6/30 Randall Leeds <ra...@gmail.com>

> On Sat, Jun 25, 2011 at 15:02, Alexander Gabriel <al...@barbalex.ch> wrote:
> > This must be a dumb mistake. My couchapp worked before the update to 1.1.
> > Now I get no data and firebug says "userCtx is null" on "User =
> > userCtx.name;" on line 223.
> > I attached the page.
> > What am I missing?
> > Thanks for help.
> > Alex
>
> No page attached. Please follow up and I'd be happy to help you debug.
>

Re: update from 1.02 to 1.1.0 > Error: "userCtx is null"

Posted by Jason Smith <jh...@iriscouch.com>.
On Fri, Jul 15, 2011 at 5:24 PM, Alexander Gabriel <al...@barbalex.ch> wrote:
> oh, just to mention: is there some really dumb mistakes I could have made
> that would produce this behaviour?
> If there is, I probably have made them. I'm biologist, not programmer...
> Alex

CouchDB is supposed to make more sense to biologists than programmers.
The idea is, programmers will say "that is stupid" and non-programmers
will say "that is brilliant."

What is not brilliant is this problem!

My top suspicion right now is something about caching. Many users have
reported all sorts of nonstandard caching that breaks couchapps and
jquery.couch.js.

Let's move this discussion to Get Satisfaction and I'll follow up here
if it is relevant to CouchDB.

-- 
Iris Couch

Re: update from 1.02 to 1.1.0 > Error: "userCtx is null"

Posted by Alexander Gabriel <al...@barbalex.ch>.
oh, just to mention: is there some really dumb mistakes I could have made
that would produce this behaviour?
If there is, I probably have made them. I'm biologist, not programmer...
Alex



2011/7/15 Alexander Gabriel <al...@barbalex.ch>

> Hi Max
> I repaced my jquery.couch.js with yours but the behaviour remains the same:
> Works perfectly locally, userCtx is null on iriscouch after replicating.
> I tried with the following versions of jquery:
> 1.4.4 > error on local installation
> 1.5: o.k. local, userCtx is null on iriscouch
> 1.5.1: o.k. local, userCtx is null on iriscouch
> 1.5.2: o.k. local, userCtx is null on iriscouch
> 1.6.1: o.k. local, userCtx is null on iriscouch
> 1.6.2: o.k. local, userCtx is null on iriscouch
>
> So I left 1.6.2 installed.
>
> Thanks for helping!
>
> Alex
>
>
>
> 2011/7/15 Max Ogden <ma...@maxogden.com>
>
>> Alexander - I believe your error is caused because jquery.couch.js is not
>> compatible with newer jQuery because $.httpData seems to have been
>> deprecated. I ran into a similar issue earlier today and fixed it here
>> (see
>> jquery.couch.js):
>>
>> https://github.com/maxogden/monocles/commit/d27e58722a75a76ac578f99adec00511c1ce024b
>>
>> On Thu, Jul 14, 2011 at 11:08 PM, Jason Smith <jh...@iriscouch.com> wrote:
>>
>> > On Thu, Jul 14, 2011 at 10:06 PM, Alexander Gabriel <al...@barbalex.ch>
>> > wrote:
>> > > This is the page:
>> > >
>> >
>> http://barbalex.iriscouch.com/evab-ch_barbalex_evab/_design/evab/index.html
>> > > You have to signup.
>> > >
>> > > Is this an issue with iriscouch?
>> >
>> > You've got an issue filed at Iris Couch Get Satisfaction, so I am
>> > actively investigating; however Iris Couch is very orthodox CouchDB,
>> > almost exactly the same as the official Apache CouchDB releases. Thus
>> > I suspect this issue will apply to CocuhDB generally.
>> >
>> > --
>> > Iris Couch
>> >
>>
>
>

Re: update from 1.02 to 1.1.0 > Error: "userCtx is null"

Posted by Alexander Gabriel <al...@barbalex.ch>.
Hi Max
I repaced my jquery.couch.js with yours but the behaviour remains the same:
Works perfectly locally, userCtx is null on iriscouch after replicating.
I tried with the following versions of jquery:
1.4.4 > error on local installation
1.5: o.k. local, userCtx is null on iriscouch
1.5.1: o.k. local, userCtx is null on iriscouch
1.5.2: o.k. local, userCtx is null on iriscouch
1.6.1: o.k. local, userCtx is null on iriscouch
1.6.2: o.k. local, userCtx is null on iriscouch

So I left 1.6.2 installed.

Thanks for helping!

Alex



2011/7/15 Max Ogden <ma...@maxogden.com>

> Alexander - I believe your error is caused because jquery.couch.js is not
> compatible with newer jQuery because $.httpData seems to have been
> deprecated. I ran into a similar issue earlier today and fixed it here (see
> jquery.couch.js):
>
> https://github.com/maxogden/monocles/commit/d27e58722a75a76ac578f99adec00511c1ce024b
>
> On Thu, Jul 14, 2011 at 11:08 PM, Jason Smith <jh...@iriscouch.com> wrote:
>
> > On Thu, Jul 14, 2011 at 10:06 PM, Alexander Gabriel <al...@barbalex.ch>
> > wrote:
> > > This is the page:
> > >
> >
> http://barbalex.iriscouch.com/evab-ch_barbalex_evab/_design/evab/index.html
> > > You have to signup.
> > >
> > > Is this an issue with iriscouch?
> >
> > You've got an issue filed at Iris Couch Get Satisfaction, so I am
> > actively investigating; however Iris Couch is very orthodox CouchDB,
> > almost exactly the same as the official Apache CouchDB releases. Thus
> > I suspect this issue will apply to CocuhDB generally.
> >
> > --
> > Iris Couch
> >
>

Re: update from 1.02 to 1.1.0 > Error: "userCtx is null"

Posted by Max Ogden <ma...@maxogden.com>.
Alexander - I believe your error is caused because jquery.couch.js is not
compatible with newer jQuery because $.httpData seems to have been
deprecated. I ran into a similar issue earlier today and fixed it here (see
jquery.couch.js):
https://github.com/maxogden/monocles/commit/d27e58722a75a76ac578f99adec00511c1ce024b

On Thu, Jul 14, 2011 at 11:08 PM, Jason Smith <jh...@iriscouch.com> wrote:

> On Thu, Jul 14, 2011 at 10:06 PM, Alexander Gabriel <al...@barbalex.ch>
> wrote:
> > This is the page:
> >
> http://barbalex.iriscouch.com/evab-ch_barbalex_evab/_design/evab/index.html
> > You have to signup.
> >
> > Is this an issue with iriscouch?
>
> You've got an issue filed at Iris Couch Get Satisfaction, so I am
> actively investigating; however Iris Couch is very orthodox CouchDB,
> almost exactly the same as the official Apache CouchDB releases. Thus
> I suspect this issue will apply to CocuhDB generally.
>
> --
> Iris Couch
>

Re: update from 1.02 to 1.1.0 > Error: "userCtx is null"

Posted by Jason Smith <jh...@iriscouch.com>.
On Thu, Jul 14, 2011 at 10:06 PM, Alexander Gabriel <al...@barbalex.ch> wrote:
> This is the page:
> http://barbalex.iriscouch.com/evab-ch_barbalex_evab/_design/evab/index.html
> You have to signup.
>
> Is this an issue with iriscouch?

You've got an issue filed at Iris Couch Get Satisfaction, so I am
actively investigating; however Iris Couch is very orthodox CouchDB,
almost exactly the same as the official Apache CouchDB releases. Thus
I suspect this issue will apply to CocuhDB generally.

-- 
Iris Couch

Re: update from 1.02 to 1.1.0 > Error: "userCtx is null"

Posted by Alexander Gabriel <al...@barbalex.ch>.
uups, since today userCtx is null again!
I tried updating jquery.couch.js from here again:
https://github.com/apache/couchdb/blob/trunk/share/www/<https://github.com/apache/couchdb/blob/trunk/share/www/script/jquery.couch.js>
script/jquery.couch.js<https://github.com/apache/couchdb/blob/trunk/share/www/script/jquery.couch.js>
but it doesn't help this time.

This is the page:
http://barbalex.iriscouch.com/evab-ch_barbalex_evab/_design/evab/index.html
You have to signup.

Is this an issue with iriscouch?

Alex



2011/7/1 Randall Leeds <ra...@gmail.com>

> On Jul 1, 2011 7:43 AM, "Alexander Gabriel" <al...@barbalex.ch> wrote:
> >
> > Hi Randall
> >
> > You made my day. I downloaded a new version from here:
> >
>
> https://github.com/apache/couchdb/blob/trunk/share/www/script/jquery.couch.js
> > and
> > it works now.
> >
>
> Yay!
>
> > I must have made a mistake updating. I wonder what else I have done wrong
> > updating. I simply got a new Windows exe and installed it. Obviously I
> also
> > have to replace manually the CouchDB and CouchApp js files in my app. Now
> it
> > seems quite clear but being a real beginner I didn't realize before.
> >
> > Is updating CouchDb and CouchApp explained well somewhere?
> >
>
> If you're including jquery.couch.js in your couchapp it's probably good to
> stay up to date with it. Since Futon uses it, it's included with CouchDB.
> If
> it doesn't exist already, you could actually modify your .ini file to
> create
> a static path to the system-included copy.
>
> In general, though, this shouldn't be a problem. Since jquery.couch.js uses
> the normal HTTP interface to CouchDB it should work against any release of
> a
> particular major version. In other words, we don't plan to break anything
> until 2.0. You just happened to stumble upon a bug that was recently fixed.
> Sorry about that!
>
> > Thanks so much for helping!!!
> >
>
> Of course! I'm glad the fix was so easy.
>
> -Randall
>

Re: update from 1.02 to 1.1.0 > Error: "userCtx is null"

Posted by Randall Leeds <ra...@gmail.com>.
On Jul 1, 2011 7:43 AM, "Alexander Gabriel" <al...@barbalex.ch> wrote:
>
> Hi Randall
>
> You made my day. I downloaded a new version from here:
>
https://github.com/apache/couchdb/blob/trunk/share/www/script/jquery.couch.js
> and
> it works now.
>

Yay!

> I must have made a mistake updating. I wonder what else I have done wrong
> updating. I simply got a new Windows exe and installed it. Obviously I
also
> have to replace manually the CouchDB and CouchApp js files in my app. Now
it
> seems quite clear but being a real beginner I didn't realize before.
>
> Is updating CouchDb and CouchApp explained well somewhere?
>

If you're including jquery.couch.js in your couchapp it's probably good to
stay up to date with it. Since Futon uses it, it's included with CouchDB. If
it doesn't exist already, you could actually modify your .ini file to create
a static path to the system-included copy.

In general, though, this shouldn't be a problem. Since jquery.couch.js uses
the normal HTTP interface to CouchDB it should work against any release of a
particular major version. In other words, we don't plan to break anything
until 2.0. You just happened to stumble upon a bug that was recently fixed.
Sorry about that!

> Thanks so much for helping!!!
>

Of course! I'm glad the fix was so easy.

-Randall

Re: update from 1.02 to 1.1.0 > Error: "userCtx is null"

Posted by Alexander Gabriel <al...@barbalex.ch>.
Hi Randall

You made my day. I downloaded a new version from here:
https://github.com/apache/couchdb/blob/trunk/share/www/script/jquery.couch.js
and
it works now.

I must have made a mistake updating. I wonder what else I have done wrong
updating. I simply got a new Windows exe and installed it. Obviously I also
have to replace manually the CouchDB and CouchApp js files in my app. Now it
seems quite clear but being a real beginner I didn't realize before.

Is updating CouchDb and CouchApp explained well somewhere?

Thanks so much for helping!!!

Alex



2011/7/1 Randall Leeds <ra...@gmail.com>

> Without looking into it super hard my first guess is that it has
> something to do with the content type negotiation.
> Are you using the newest jquery.couch.js?
> I'm wondering if the response to $.couch.session() is not what it used to
> be.
>
> 2011/6/30 Alexander Gabriel <al...@barbalex.ch>:
> > Here it is again, this time .html changed to .txt
> > The actual site is
> > here:
> http://barbalex.iriscouch.com/evab-ch_barbalex_evab/_design/evab/index.html
> > You need to sign up as it is meant for saving sightings of species and
> users
> > should only see their own sightings.
> >
> > Thanks for looking into it!
> > Alex
> >
> >
> >
> > 2011/6/30 Randall Leeds <ra...@gmail.com>
> >>
> >> On Sat, Jun 25, 2011 at 15:02, Alexander Gabriel <al...@barbalex.ch>
> wrote:
> >> > This must be a dumb mistake. My couchapp worked before the update to
> >> > 1.1.
> >> > Now I get no data and firebug says "userCtx is null" on "User =
> >> > userCtx.name;" on line 223.
> >> > I attached the page.
> >> > What am I missing?
> >> > Thanks for help.
> >> > Alex
> >>
> >> No page attached. Please follow up and I'd be happy to help you debug.
> >
> >
>

Re: update from 1.02 to 1.1.0 > Error: "userCtx is null"

Posted by Randall Leeds <ra...@gmail.com>.
Without looking into it super hard my first guess is that it has
something to do with the content type negotiation.
Are you using the newest jquery.couch.js?
I'm wondering if the response to $.couch.session() is not what it used to be.

2011/6/30 Alexander Gabriel <al...@barbalex.ch>:
> Here it is again, this time .html changed to .txt
> The actual site is
> here: http://barbalex.iriscouch.com/evab-ch_barbalex_evab/_design/evab/index.html
> You need to sign up as it is meant for saving sightings of species and users
> should only see their own sightings.
>
> Thanks for looking into it!
> Alex
>
>
>
> 2011/6/30 Randall Leeds <ra...@gmail.com>
>>
>> On Sat, Jun 25, 2011 at 15:02, Alexander Gabriel <al...@barbalex.ch> wrote:
>> > This must be a dumb mistake. My couchapp worked before the update to
>> > 1.1.
>> > Now I get no data and firebug says "userCtx is null" on "User =
>> > userCtx.name;" on line 223.
>> > I attached the page.
>> > What am I missing?
>> > Thanks for help.
>> > Alex
>>
>> No page attached. Please follow up and I'd be happy to help you debug.
>
>