Skip to content
Back

Facebook OAuth2 -> Server error 500 general_unknown

  • 0
  • Android
  • Auth
shprot
7 Apr, 2024, 23:13

Hello. I'm doing oauth2 auth in my Android app (Appwrite SDK version 5.0.0, Kotlin). I've no any issues with Google, but with Facebook, it's not working. Now it looks as: I tap the 'Login by Facebook" button and go to the auth screen in a web browser. Login seems successful, but after it, I see only line "{"message":"Server Error","code":500,"type":"general_unknown","version":"1.5.4"}"

I checked the error journal. One of the lines is "[Error] Message: Cannot assign null to property Appwrite\Auth\OAuth2\Facebook::$tokens of type array". It looks like a problem on Facebook's side, but why? maybe you could give me some advice.

Also, that is what I did:

  • Enabled Facebook oauth2 in my project
  • Entered setting in "meta for developers" console (screenshot1)
  • Got ID and secret, entered them in Appwrite, and updated a callback link
  • Added callback to Meta console (screenshot2)
  • Checked callback validation (screenshot3)

My app is not published on Meta's console right now, but it's in test mode, and I tried to log in from the test admin account. Host, project, and accoundId in my app are correct because they work with Google. My function is on the fourth screen.

What did I do wrong?

PS: I'm so sorry, I don't know how to enable the English language in Meta's console.

TL;DR
Developers experiencing a server error 500 general_unknown while implementing OAuth2 for Facebook in an Android app using Appwrite SDK. The issue seems to stem from assigning null to a property in the Appwrite library. The developer has followed the necessary steps, including enabling Facebook OAuth2, entering IDs and secrets, updating callback links, and verifying callbacks. The app is in test mode, not yet published on Meta's console. The potential solution may involve verifying the property assignment in the SDK and ensuring correct configurations.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more