Parse-server: Parse.FacebookUtils.isLinked(user) returns false since parse-server 2.2.6

Created on 20 Jul 2016  路  6Comments  路  Source: parse-community/parse-server

Description

We are still using parse server 2.2.6 since all upgrade attempts since this point have broken the facebook integration, as seen in #1579 and #1846.

This has reportedly been fixed, but for me Parse.FacebookUtils.isLinked(user) still returns false in all versions above 2.2.6 (tried upgrading to 2.2.16 today).

I also tried querying to get the user from the server rather than the request as suggested in #1846, but still no luck :(

Steps to reproduce

  1. Login into Facebook / Parse in Unity
  2. Call following function on Parse
Parse.Cloud.define('checkLogin', function(request, response)
{
    if (Parse.FacebookUtils.isLinked(request.user))
    {
        console.log('facebook linked');
        response.success('facebook linked');
    }
    else
    {
        console.log('facebook not linked');
        response.error('facebook not linked');
    }
});

Expected Results

Parse.FacebookUtils.isLinked(request.user) returns true like it does in 2.2.6

Actual Outcome

Parse.FacebookUtils.isLinked(request.user) returns false when server is on higher version (for example 2.2.16)

Environment Setup

  • Server

    • Heroku (Hobby Dyno)

    • parse-server version: 2.2.16

  • Database

    • mLab (Heroku Addon)

    • MongoDB version: I have '2.1.18' in package.json, which we did to fix an error where we would always timeout (#1855), but when I go to mLab it says 3.0.10?

      Logs/Trace


Jul 20 00:31:02 torque-dev app/web.1:  verbose: POST /parse/functions/checkLogin { host: 'torque-dev.herokuapp.com', 
Jul 20 00:31:02 torque-dev app/web.1:    connection: 'close', 
Jul 20 00:31:02 torque-dev app/web.1:    'user-agent': 'UnityPlayer/5.3.5p4 (http://unity3d.com)', 
Jul 20 00:31:02 torque-dev app/web.1:    accept: '*/*', 
Jul 20 00:31:02 torque-dev app/web.1:    'accept-encoding': 'identity', 
Jul 20 00:31:02 torque-dev app/web.1:    'content-type': 'application/json', 
Jul 20 00:31:02 torque-dev app/web.1:    'x-parse-app-build-version': '1.8.4', 
Jul 20 00:31:02 torque-dev app/web.1:    'x-parse-app-display-version': 'leagueofmonkeys.torqueburnout', 
Jul 20 00:31:02 torque-dev app/web.1:    'x-parse-application-id': 'torque-burnout', 
Jul 20 00:31:02 torque-dev app/web.1:    'x-parse-client-version': 'net-unity1.7.0.0', 
Jul 20 00:31:02 torque-dev app/web.1:    'x-parse-installation-id': 'dff66513-b624-4612-8a17-e01365907e91', 
Jul 20 00:31:02 torque-dev app/web.1:    'x-parse-os-version': 'MS-7885 (MSI)', 
Jul 20 00:31:02 torque-dev app/web.1:    'x-parse-session-token': 'r:cd4615b72566d0fb5d1466f6f1d01942', 
Jul 20 00:31:02 torque-dev app/web.1:    'x-parse-windows-key': '90b8148d-627c-4c25-8f2e-e3c02acd1f85', 
Jul 20 00:31:02 torque-dev app/web.1:    'x-unity-version': '5.3.5p4', 
Jul 20 00:31:02 torque-dev app/web.1:    'x-request-id': 'b9a066e0-0008-48d0-a7c9-4fb2e5683d3c', 
Jul 20 00:31:02 torque-dev app/web.1:    'x-forwarded-for': '27.32.138.126', 
Jul 20 00:31:02 torque-dev app/web.1:    'x-forwarded-proto': 'http', 
Jul 20 00:31:02 torque-dev app/web.1:    'x-forwarded-port': '80', 
Jul 20 00:31:02 torque-dev app/web.1:    via: '1.1 vegur', 
Jul 20 00:31:02 torque-dev app/web.1:    'connect-time': '1', 
Jul 20 00:31:02 torque-dev app/web.1:    'x-request-start': '1468999861570', 
Jul 20 00:31:02 torque-dev app/web.1:    'total-route-time': '0', 
Jul 20 00:31:02 torque-dev app/web.1:    'content-length': '2' } {} 
Jul 20 00:31:02 torque-dev app/web.1:  facebook not linked 
Jul 20 00:31:02 torque-dev app/web.1:  verbose: error: code=141, message=facebook not linked 
Jul 20 00:31:02 torque-dev heroku/router:  at=info method=POST path="/parse/functions/checkLogin" host=torque-dev.herokuapp.com request_id=b9a066e0-0008-48d0-a7c9-4fb2e5683d3c fwd="27.32.138.126" dyno=web.1 connect=1ms service=551ms status=400 bytes=533
bug

Most helpful comment

Found the problem submitting a PR.

All 6 comments

Found the problem submitting a PR.

Wow, that was fast! Thank you :)

I suppose I just wait for the next version of parse-server to come out now and try that?

That's effectively the easiest route

Too easy. Any idea when that might come out?

I don't really know what determines when a new version is released, seems to be every 2 weeks or so based on changelogs though.

Just wanted to confirm that I was able to upgrade from 2.2.6 to 2.2.17 and Facebook authentication is working again, thanks! :)

great, thanks for the feedback!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ShawnBaek picture ShawnBaek  路  4Comments

carjo422 picture carjo422  路  3Comments

ViolentCrumble picture ViolentCrumble  路  3Comments

shardul08 picture shardul08  路  3Comments

pulse1989 picture pulse1989  路  3Comments