5

I've setup my application with Facebook connect (using Omniauth) and it seems to work for some accounts but for others it returns the infamous An error occurred error.

This isn't to say it happens sporadically, but consistently for some users. Sandbox mode is off, the APP key etc. and domain are obviously setup correctly or it would always throw the error. How does one go about debugging this from a message as vague as that one?

Edit 2:

The App domain is correctly set up and so is the namespace. I have selected both "Website with Facebook Login" as well as "Mobile Web" and the URLs are correct and not HTTPS (both use the same URL). I've also reset the App secret just in case but this has not resolved the issue.

Simpleton
  • 6,285
  • 11
  • 53
  • 87
  • I don't know how to debug that well, but I have sometimes such problems with https. – yacon Dec 11 '12 at 08:52
  • Errors will only appear in the insights dashboard if they're correctly attributed to your app, which won't happen if the request is completely invalid, missing the app ID, using in invalid URL for that app ID, etc – Igy Dec 22 '12 at 18:28
  • @Igy Thanks for commenting. All those details look to be correct, and as mentioned in the question some login requests (i.e using my account and a few others) work perfectly. – Simpleton Dec 22 '12 at 18:32
  • The error (210: User not visible) is the key here; are you perhaps trying to post to a wall that is not visible to the current user? There also seems to be an open bug related to this: http://developers.facebook.com/bugs/508152585872076 – Nachi Dec 27 '12 at 16:10
  • Hi Nachi, thanks for commenting but that is not the problem. – Simpleton Dec 28 '12 at 08:57
  • I'm voting to close this question as off-topic because it's about the Facebook platform. – Simpleton Aug 30 '17 at 08:07

2 Answers2

0

Try with these following example :

omniauth_callbacks_controller::process_callback method like this

# If a user is signed in then he is trying to link a new account
    if user_signed_in?
      if authentication.persisted? # This was a linking operation so send back the user to the account edit page  
        flash[:success] = I18n.t "controllers.omniauth_callbacks.process_callback.success.link_account", 
                                :provider => registration_hash[:provider].capitalize, 
                                :account => registration_hash[:email]
      else
        flash[:error] = I18n.t "controllers.omniauth_callbacks.process_callback.error.link_account", 
                               :provider => registration_hash[:provider].capitalize, 
                               :account => registration_hash[:email],
                               :errors =>authentication.errors
      end  
      redirect_to edit_user_account_path(current_user)

and also refer the following location : OAuthException (#210) User not visible

i think this may help you to resolve your problem.

John Peter
  • 2,870
  • 3
  • 27
  • 46
  • This is not an issue on the application side and as mentioned in the question comments, the 210 bug is not related to this. – Simpleton Dec 29 '12 at 14:07
-1

could you install Wireshark and monitor the traffic back and forth with good AND bad accounts - then determine the differences?

cardiac7
  • 491
  • 1
  • 9
  • 26