SpringAll icon indicating copy to clipboard operation
SpringAll copied to clipboard

Webfinger doesn't work

Open mblog opened this issue 14 years ago • 11 comments

I can't find new users on my pod.

mblog avatar Apr 16 '12 07:04 mblog

confirmed on diasp.eu diasp.de and diasp.org

ghost avatar Apr 16 '12 15:04 ghost

I too have encountered this error on a pair of test machines.

I'm using the latest diaspora build from git.

searching for user2@pod2 by user1@pod1 results in the following error and stack trace:

NoMethodError in PeopleController#index

undefined method `+' for nil:NilClass

Rails.root: /home/brian/diaspora_src

lib/webfinger.rb:32:in `get'
lib/webfinger.rb:92:in `webfinger_profile_xrd'
lib/webfinger.rb:78:in `webfinger_profile'
lib/webfinger.rb:100:in `make_person_from_webfinger'
lib/webfinger.rb:52:in `create_or_update_person_from_webfinger_profile!'
lib/webfinger.rb:17:in `fetch'
app/models/jobs/fetch_webfinger.rb:10:in `perform'
lib/webfinger.rb:21:in `in_background'
app/controllers/people_controller.rb:38:in `block (2 levels) in index'
app/controllers/people_controller.rb:27:in `index'
lib/rack/chrome_frame.rb:39:in `call'

ptlis avatar Apr 22 '12 20:04 ptlis

@maxwell Maybe there is a bug within https://github.com/diaspora/diaspora/commit/8e22d69d8e0ed2b4b68454367a81fea1d0f522a5 ?

mblog avatar Apr 23 '12 06:04 mblog

are these two bugs really related? im not sure.

anyone want to take a crack

from the rails console

Webfinger.new('[email protected]').fetch

it shouldnt blow up :P

maxwell avatar Apr 23 '12 19:04 maxwell

With [email protected] and an unknown user on my pod:

1.9.2p290 :006 >   Webfinger.new('[email protected]').fetch
`Person Load (0.3ms)  SELECT `people`.* FROM `people` WHERE `people`.`diaspora_handle` = '[email protected]' LIMIT 1
  Profile Load (0.3ms)  SELECT `profiles`.* FROM `profiles` WHERE `profiles`.`person_id` = 157 LIMIT 1
 => # <Person id: 157, guid: "4cec08f12c17431ff40000c5", url: "https://joindiaspora.com/", diaspora_handle: "[email protected]", serialized_public_key: "-----BEGIN RSA PUBLIC KEY-----\nMIICCgKCAgEAtZqOv8TX...", owner_id: nil, created_at: "2011-01-29 17:09:54", updated_at: "2011-01-29 17:09:54", closed_account: false> 
1.9.2p290 :007 > Webfinger.new('[email protected]').fetch
  Person Load (0.5ms)  SELECT `people`.* FROM `people` WHERE `people`.`diaspora_handle` = '[email protected]' LIMIT 1
 => nil 
1.9.2p290 :008 > 

mblog avatar Apr 23 '12 19:04 mblog

must be rescued somewhere in the code :(

maxwell avatar Apr 23 '12 20:04 maxwell

Using the tagged pre-asset-pipeline.zip version i get the same error:

1.9.2p290 :002 > Webfinger.new('[email protected]').fetch
  Person Load (0.2ms)  SELECT `people`.* FROM `people` WHERE `people`.`diaspora_handle` = '[email protected]' LIMIT 1
 => nil

ptlis avatar Apr 23 '12 21:04 ptlis

I think it's fixed with https://github.com/diaspora/diaspora/commit/2357d9b0f14bb50efd649f4114391f855b2205c5

Thx to @MrZYX

mblog avatar Apr 27 '12 05:04 mblog

Oh really? The error I fixed there didn't throw an exception. So the manual fetch resulting in nil should be fixed but i'm unsure about the original issue.

jhass avatar Apr 27 '12 06:04 jhass

Yep, the latest trunk checkout resolves the issue for me, thanks @MrZYX

ptlis avatar Apr 27 '12 12:04 ptlis

Fixed thanks

ghost avatar Apr 27 '12 15:04 ghost