Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
4 tasks done
miracle7 opened this issue Jul 20, 2016 · 6 comments · Fixed by #2348
Closed
4 tasks done

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

miracle7 opened this issue Jul 20, 2016 · 6 comments · Fixed by #2348
Labels
type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@miracle7
Copy link

miracle7 commented Jul 20, 2016

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 (All Requests Receive Timeout Error #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
@flovilmart flovilmart added troubleshooting type:bug Impaired feature or lacking behavior that is likely assumed and removed troubleshooting labels Jul 20, 2016
@flovilmart
Copy link
Contributor

Found the problem submitting a PR.

@miracle7
Copy link
Author

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?

@flovilmart
Copy link
Contributor

That's effectively the easiest route

@miracle7
Copy link
Author

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.

TylerBrock pushed a commit that referenced this issue Jul 23, 2016
…masterKey (#2348)

* Makes sure we don't strip auth data or session token from users queried with masterKey (#2342))

* nit: test title
@miracle7
Copy link
Author

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! :)

@TylerBrock
Copy link
Contributor

great, thanks for the feedback!

rsouzas pushed a commit to back4app/parse-server that referenced this issue Mar 15, 2017
…masterKey (parse-community#2348)

* Makes sure we don't strip auth data or session token from users queried with masterKey (parse-community#2342))

* nit: test title
rsouzas pushed a commit to back4app/parse-server that referenced this issue Mar 16, 2017
…masterKey (parse-community#2348)

* Makes sure we don't strip auth data or session token from users queried with masterKey (parse-community#2342))

* nit: test title
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
3 participants