Gwibber crashes when creating initial couchdb for desktopcouch

Bug #515012 reported by Ken Simeon on 2010-01-31
52
This bug affects 12 people
Affects Status Importance Assigned to Milestone
Gwibber
Undecided
Unassigned
Arch Linux
Invalid
Undecided
Unassigned
gwibber (openSUSE)
New
Undecided
Unassigned

Bug Description

I checked out trunk version 506 & built it under 64-bit Arch linux. I've installed desktopcouch & all dependencies for Arch Linux. When I start gwibber for the first time I get a crash in "couchdb.client.PreconditionFailed". Waiting for a bit after the crash & then restarting gwibber seams to move past the errors. It looks like a timing issue of attempting to access the database & the database is not fully available.

Trace:

INFO:root:Desktop CouchDB is not running; starting it.
Apache CouchDB has started, time to relax.
Browse your desktop CouchDB at file:///home<USERNAME REPLACED>/.local/share/desktop-couch/couchdb.html
No dbus monitor yet
Updating...
Traceback (most recent call last):
  File "/usr/bin/gwibber", line 57, in <module>
    client.Client()
  File "/usr/lib/python2.6/site-packages/gwibber/client.py", line 332, in __init__
    self.w = GwibberClient()
  File "/usr/lib/python2.6/site-packages/gwibber/client.py", line 22, in __init__
    self.messages = CouchDatabase(COUCH_DB_MESSAGES, create=True)
  File "/usr/lib/python2.6/site-packages/desktopcouch/records/server.py", line 58, in __init__
    server_class=server_class, oauth_tokens=oauth_tokens, ctx=ctx)
  File "/usr/lib/python2.6/site-packages/desktopcouch/records/server_base.py", line 125, in __init__
    self._server.create(database)
  File "/usr/lib/python2.6/site-packages/couchdb/client.py", line 210, in create
    self.resource.put(validate_dbname(name))
  File "/usr/lib/python2.6/site-packages/couchdb/client.py", line 1027, in put
    **params)
  File "/usr/lib/python2.6/site-packages/couchdb/client.py", line 1071, in _request
    raise PreconditionFailed(error)
couchdb.client.PreconditionFailed: ('file_exists', 'The database could not be created, the file already exists.')

Related branches

Ken Simeon (scriptmunkee) wrote :

Same thing here. My last working build is revision 500.

Ken Simeon (scriptmunkee) wrote :
Download full text (3.4 KiB)

I just tried to reproduce the issue and i was wrong in my statement about it taking a short time for gwibber to be able to access the couchdb database instance. I'm guessing the failure happens during the time gwibber is checking for "accounts" & if the don't exists the account creation interface is displayed. I had to attempt to start gwibber 4 times before it would fully start. and created accounts.

Here is the output from my second, third or fourth run at this:
[<replacedUserName>@sdgl07lkktxax ~]$ gwibber
Traceback (most recent call last):
  File "/usr/bin/gwibber", line 57, in <module>
    client.Client()
  File "/usr/lib/python2.6/site-packages/gwibber/client.py", line 332, in __init__
    self.w = GwibberClient()
  File "/usr/lib/python2.6/site-packages/gwibber/client.py", line 21, in __init__
    self.settings = util.SettingsMonitor()
  File "/usr/lib/python2.6/site-packages/gwibber/util.py", line 85, in __init__
    DEFAULT_SETTINGS)
  File "/usr/lib/python2.6/site-packages/gwibber/microblog/util/couch.py", line 71, in __init__
    self.database.put_record(CouchRecord({}, record_type, recordid))
  File "/usr/lib/python2.6/site-packages/desktopcouch/records/server_base.py", line 171, in put_record
    self.db[record.record_id] = record._data
  File "/usr/lib/python2.6/site-packages/couchdb/client.py", line 345, in __setitem__
    resp, data = self.resource.put(id, content=content)
  File "/usr/lib/python2.6/site-packages/couchdb/client.py", line 1027, in put
    **params)
  File "/usr/lib/python2.6/site-packages/couchdb/client.py", line 1069, in _request
    raise ResourceConflict(error)
couchdb.client.ResourceConflict: ('conflict', 'Document update conflict.')

[<replacedUserName>@sdgl06lkktxax ~]$ gwibber
No dbus monitor yet
Updating...
Traceback (most recent call last):
  File "/usr/bin/gwibber", line 57, in <module>
    client.Client()
  File "/usr/lib/python2.6/site-packages/gwibber/client.py", line 332, in __init__
    self.w = GwibberClient()
  File "/usr/lib/python2.6/site-packages/gwibber/client.py", line 22, in __init__
    self.messages = CouchDatabase(COUCH_DB_MESSAGES, create=True)
  File "/usr/lib/python2.6/site-packages/desktopcouch/records/server.py", line 58, in __init__
    server_class=server_class, oauth_tokens=oauth_tokens, ctx=ctx)
  File "/usr/lib/python2.6/site-packages/desktopcouch/records/server_base.py", line 125, in __init__
    self._server.create(database)
  File "/usr/lib/python2.6/site-packages/couchdb/client.py", line 210, in create
    self.resource.put(validate_dbname(name))
  File "/usr/lib/python2.6/site-packages/couchdb/client.py", line 1027, in put
    **params)
  File "/usr/lib/python2.6/site-packages/couchdb/client.py", line 1071, in _request
    raise PreconditionFailed(error)
couchdb.client.PreconditionFailed: ('file_exists', 'The database could not be created, the file already exists.')

[<replacedUserName>@sdgl06lkktxax ~]$ gwibber
No dbus monitor yet
Updating...
ERROR:dbus.proxies:Introspect error on com.Gwibber:/com/gwibber/Service: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ChildExited: Launch helper exited with unknown return code 1
2010-01-30 23:09:01,112 - Intros...

Read more...

4 times ? Anyway, I tried about 3 or 4 times without luck before downgrading to revison 500. I think revision 503 is guilty here.

Gordo (gordo) wrote :

I don't know if this is related but hopefully it might help...

Traceback (most recent call last):
  File "/usr/bin/gwibber", line 55, in <module>
    from gwibber import client
  File "/usr/lib/python2.6/dist-packages/gwibber/client.py", line 3, in <module>
    import gtk, gobject, gwui, util, resources, actions, json
  File "/usr/lib/python2.6/dist-packages/gwibber/gwui.py", line 2, in <module>
    import os, json, urlparse, resources, util
  File "/usr/lib/python2.6/dist-packages/gwibber/util.py", line 2, in <module>
    from microblog.util.couch import RecordMonitor
  File "/usr/lib/python2.6/dist-packages/gwibber/microblog/util/couch.py", line 9, in <module>
    OAUTH_DATA = desktopcouch.local_files.get_oauth_tokens()
  File "/usr/lib/python2.6/dist-packages/desktopcouch/local_files.py", line 112, in get_oauth_tokens
    raise NoOAuthTokenException(config_file_name)
desktopcouch.local_files.NoOAuthTokenException: OAuth details were not found in the ini file (/home/gord/.config/desktop-couch/desktop-couchdb.ini)

Gordo (gordo) wrote :

FYI, the above error message happens when trying to launch a newly installed copy of "gwibber-daily" which was installed on a freshly installed copy of Karmic (9.10)!

Still busted in revision 509 :

fred ~ $ gwibber &
[1] 8158
fred ~ $ Traceback (most recent call last):
  File "/usr/bin/gwibber", line 45, in <module>
    obj = dbus.SessionBus().get_object("org.desktopcouch.CouchDB", "/")
  File "/usr/lib/python2.6/site-packages/dbus/bus.py", line 244, in get_object
    follow_name_owner_changes=follow_name_owner_changes)
  File "/usr/lib/python2.6/site-packages/dbus/proxies.py", line 241, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/python2.6/site-packages/dbus/bus.py", line 183, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/python2.6/site-packages/dbus/bus.py", line 281, in start_service_by_name
    'su', (bus_name, flags)))
  File "/usr/lib/python2.6/site-packages/dbus/connection.py", line 622, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ChildExited: Launch helper exited with unknown return code 1

[1]+ Exit 1 gwibber

Downgrading to revision 500 to get a working gwibber :(

Sorry to spam the bug, but as of revision 516 :

fred ~/download/pkgbuild $ Traceback (most recent call last):
  File "/usr/bin/gwibber", line 45, in <module>
    obj = dbus.SessionBus().get_object("org.desktopcouch.CouchDB", "/")
  File "/usr/lib/python2.6/site-packages/dbus/bus.py", line 244, in get_object
    follow_name_owner_changes=follow_name_owner_changes)
  File "/usr/lib/python2.6/site-packages/dbus/proxies.py", line 241, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/python2.6/site-packages/dbus/bus.py", line 183, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/python2.6/site-packages/dbus/bus.py", line 281, in start_service_by_name
    'su', (bus_name, flags)))
  File "/usr/lib/python2.6/site-packages/dbus/connection.py", line 622, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ChildExited: Launch helper exited with unknown return code 1

[1]+ Exit 1 gwibber

Still nothing. Can't you reproduce this bug or what is going on ?!

Even if I build it from scratch, same error.

I have python-dbus 0.83.0 and desktop-couch : 0.6.1

"Guilty" line :

obj = dbus.SessionBus().get_object("org.desktopcouch.CouchDB", "/")

=> revision 503.

Sorry to spam, I'm kinda fed up I cannot launch any gwibber version newer than revision 500

Ryan Paul (segphault) wrote :

This is likely caused by a bug in desktopcouch. I've made the developers aware of this bug report and they can hopefully find a way to address the issue.

I have not been able to replicate the error on Karmic or Lucid.

OK. I will have to wait a new version of couchdb and desktop-couch.

Thanks for the info.

You mean, it could be bug like this one ?

https://bugs.launchpad.net/desktopcouch/+bug/498603

Because I'm annoyed not to be able to use a newer version of gwibber :(

Is desktopcouch really guilty ? I built desktopcouch revision 121 and still the same output :

fred ~ $ Traceback (most recent call last):
  File "/usr/bin/gwibber", line 45, in <module>
    obj = dbus.SessionBus().get_object("org.desktopcouch.CouchDB", "/")
  File "/usr/lib/python2.6/site-packages/dbus/bus.py", line 244, in get_object
    follow_name_owner_changes=follow_name_owner_changes)
  File "/usr/lib/python2.6/site-packages/dbus/proxies.py", line 241, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/python2.6/site-packages/dbus/bus.py", line 183, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/python2.6/site-packages/dbus/bus.py", line 281, in start_service_by_name
    'su', (bus_name, flags)))
  File "/usr/lib/python2.6/site-packages/dbus/connection.py", line 622, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ChildExited: Launch helper exited with unknown return code 1

So, I wonder why it doesn't work. And sorry for spamming the bug, I'm kinda annoyed with this bug.

What is the new depend list ? Because I don't know which component is guilty... It is really really annonying. I found a list in INSTALL file, but as desktop-couch is not listed, it is an obsolete version, or am I wrong ?

Removing myself from CC list. Won't use gwibber trunk anymore.

Changed in gwibber:
status: New → Confirmed
Gordo (gordo) wrote :

Is this bug ever going to be fixed. Just installed Karmic from scratch again and thought I would try out Gwibber again and still receive the following:

** (gwibber:26905): WARNING **: Trying to register gtype 'WnckWindowState' as flags when in fact it is of type 'GEnum'

** (gwibber:26905): WARNING **: Trying to register gtype 'WnckWindowActions' as flags when in fact it is of type 'GEnum'

** (gwibber:26905): WARNING **: Trying to register gtype 'WnckWindowMoveResizeMask' as flags when in fact it is of type 'GEnum'
Traceback (most recent call last):
  File "/usr/bin/gwibber", line 50, in <module>
    from gwibber import client
  File "/usr/lib/python2.6/dist-packages/gwibber/client.py", line 3, in <module>
    import gtk, gobject, gwui, util, resources, actions, json, gconf
  File "/usr/lib/python2.6/dist-packages/gwibber/gwui.py", line 2, in <module>
    import os, json, urlparse, resources, util
  File "/usr/lib/python2.6/dist-packages/gwibber/util.py", line 2, in <module>
    from microblog.util.couch import RecordMonitor
  File "/usr/lib/python2.6/dist-packages/gwibber/microblog/util/couch.py", line 9, in <module>
    OAUTH_DATA = desktopcouch.local_files.get_oauth_tokens()
  File "/usr/lib/python2.6/dist-packages/desktopcouch/local_files.py", line 112, in get_oauth_tokens
    raise NoOAuthTokenException(config_file_name)
desktopcouch.local_files.NoOAuthTokenException: OAuth details were not found in the ini file (/home/gord/.config/desktop-couch/desktop-couchdb.ini)

Thanks,
Gord

wirespot (wirespot) wrote :

I've found a workaround.

* Download the tar.gz from the Gwibber PPA main page:
https://launchpad.net/gwibber

* Unpack it anywhere.

* Go under the main directory (ie. gwibber-2.29.90.1/).

* Run `./bin/gwibber`. It will create the files that the .deb version can't.

* Quit gwibber. Now you can use the .deb version without problems.

Kreuger Burns (car-crazy33) wrote :

I had the same problem. I've tried wirespot's work around and it didn't work. I get another error. See here. http://pastebin.com/XJwuv02Z

pithyless (pithyless) wrote :

Had the same problem. I can confirm wirespot's workaround worked for me (Linux Mint / Karmic x64). Your mileage may vary. I do hope this gets sorted out in the trunk, though... this kind of first-experience ugliness will probably put a lot of people off. Thanks wirespot!

Probably affects 64-bit only. Unless the other affected users can confirm they're using 32-bit?

Anyway, here's my case:
I tried installing the latest daily-build on my freshly installed Karmic 64-bit Desktop and I got the same problem as stated in this report. However, I can install the same daily-build on my freshly installed Karmic 32-bit UNR.

I also noticed that the OP and pithyless are both using x64 as well.

Re: 64-bit

Retracking my previous post. Apparently, I unknowingly used a 32-bit Karmic for re-installation on my desktop, so that makes the 32-bit / 64-bit issue invalid. I have the error as reported on my 32-bit Desktop but not on 32-bit UNR (both Karmic).

running "desktopcouch-pair" should solve the problem, (of course you need desktopcouch-tools "sudo apt-get install desktopcouch-tools") it will create the appropriate desktop-couchdb.ini file

Jon Bernard (jbernard) wrote :

@Adolfo: Confirmed. Running desktopcouch-pair starts a couchdb instance. I believe in this case couchdb has never been run, so this first instance creates the necessary files. Gwibber will start successfully after that.

Gary Bacchus (jakal323) wrote :

@Adolfo: Confirmed. desktopcouch-pair fixes the problem.

Victor Vargas (kamus) wrote :

@Ken, Please could you upgrade to latest version of gwibber (2.29.92) and check if this problem is still affecting you? Thanks in advance!

Changed in gwibber:
status: Confirmed → Incomplete
Changed in archlinux:
status: New → Invalid
Ken Simeon (scriptmunkee) wrote :

I can confirm that running "desktopcouch-pair" has fixed my issues with gwibber.

Are going to do any checks with the startup of gwibber to make sure the need file "desktop-couchdb.ini" exists? And if it doestn't, you execute "desktopcouch-pair" or whatever is needed to generate the ini file.

I've packaged up gwibber for openSUSE 11.3, but run into the same issue.

- gwibber up to rev 684
- CouchDB 0.10.1
- python-couchdb 0.6.1
- python-desktopcouch 0.6.3

The error is equal to what was reported initially here (gwibber-service fails to load).

Attached a desktop-couch.log file, which yields some of the '500 errors' that are reported.

Vinaaaa (vrpedrinho) wrote :

@Adolfo: Confirmed. desktopcouch-pair fixes the problem.

Omer Akram (om26er) wrote :

I think this is not actually a gwibber bug. Its a bug in desktop-couch http://code.google.com/p/couchdb-python/issues/detail?id=95

Tom Metro (tmetro+ubuntu) wrote :

I can confirm the problem still happens with Gwibber 2.31.1 on 64-bit 9.10. I saw the second of the two errors, "desktopcouch.local_files.NoOAuthTokenException: OAuth details were not found in the ini file," which doesn't seem to correlate with the desktop-couch bug mentioned above.

PerlStalker (perlstalker) wrote :

I found a workaround at http://forums.linuxmint.com/viewtopic.php?f=47&t=43962&p=252863.

After you run this, gwibber will start.

dbus-send --session --dest=org.desktopcouch.CouchDB \
   --print-reply --type=method_call / \
   org.desktopcouch.CouchDB.getPort

MoLE (moleonthehill) wrote :

Confirming the workaround works for Ubuntu 9.10 64-bit. I encountered this error on upgrading from 2.0.0 (stock version in karmic) to 2.31 which is in the daily ppa as of today.

bernhard (bernhardredl) on 2010-05-31
Changed in gwibber:
status: Incomplete → Confirmed
bernhard (bernhardredl) wrote :

after investigating the problem in detail i found the following out:

my providers dns server seems to slow for the timeout:
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/gwibber/microblog/network.py", line 32, in __init__
    self.curl.perform()
error: (6, 'name lookup timed out')

the workaround is working because dyndns & google dns seem to be faster.

if i comment out the
# self.curl.setopt(pycurl.TIMEOUT, 15)
# self.curl.setopt(pycurl.CONNECTTIMEOUT, 8)

in File "/usr/lib/python2.6/dist-packages/gwibber/microblog/network.py"

it also works with my ISPs dns

Omer Akram (om26er) wrote :

marking fixed as the relevant branch was approved and merged

Changed in gwibber:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.