nicolaslopezj / meteor-apollo-accounts

Meteor accounts in GraphQL
MIT License
146 stars 37 forks source link

[Meteor 1.6] LoginMethodResponse tokenExpires returning invalid date #70

Closed joncursi closed 6 years ago

joncursi commented 7 years ago

After upgrading to a recent Meteor 1.6 beta, I'm getting invalid date returned from LoginMethodResponse:

LoginMethodResponse
I20170726-11:57:14.883(-4)? { id: 'c54u8GPenebfvi873',
I20170726-11:57:14.883(-4)?   token: '_6I2TJCAUl6a7dFVvM3HnXAVczlqYMvDSkOj6W5nJr7',
I20170726-11:57:14.883(-4)?   tokenExpires: Invalid Date }

Relevant package.json:

    "graphql": "0.10.5",
    "graphql-date": "^1.0.3",
    "graphql-loader": "^1.2.1",
    "graphql-log": "^0.1.3",
    "graphql-redis-subscriptions": "^1.2.0",
    "graphql-server-express": "^1.0.4",
    "graphql-subscriptions": "^0.4.4",
    "graphql-tools": "^1.0.0",
    "graphql-type-json": "^0.1.4",
joncursi commented 7 years ago

This is on Meteor 1.6-beta-14

joncursi commented 7 years ago

Here's the stack trace:

W20170726-16:28:51.984(-4)? (STDERR) TypeError: Float cannot represent non numeric value: Invalid Date
W20170726-16:28:51.986(-4)? (STDERR)     at coerceFloat (/Users/jcursi/Sites/joncursi/redbird-web/node_modules/graphql/type/scalars.js:73:9)
W20170726-16:28:51.986(-4)? (STDERR)     at GraphQLScalarType.serialize (/Users/jcursi/Sites/joncursi/redbird-web/node_modules/graphql/type/definition.js:210:12)
W20170726-16:28:51.987(-4)? (STDERR)     at completeLeafValue (/Users/jcursi/Sites/joncursi/redbird-web/node_modules/graphql/execution/execute.js:668:37)
W20170726-16:28:51.987(-4)? (STDERR)     at completeValue (/Users/jcursi/Sites/joncursi/redbird-web/node_modules/graphql/execution/execute.js:617:12)
W20170726-16:28:51.987(-4)? (STDERR)     at completeValue (/Users/jcursi/Sites/joncursi/redbird-web/node_modules/graphql/execution/execute.js:597:21)
W20170726-16:28:51.987(-4)? (STDERR)     at completeValueWithLocatedError (/Users/jcursi/Sites/joncursi/redbird-web/node_modules/graphql/execution/execute.js:546:21)
W20170726-16:28:51.987(-4)? (STDERR)     at completeValueCatchingError (/Users/jcursi/Sites/joncursi/redbird-web/node_modules/graphql/execution/execute.js:515:12)
W20170726-16:28:51.988(-4)? (STDERR)     at resolveField (/Users/jcursi/Sites/joncursi/redbird-web/node_modules/graphql/execution/execute.js:467:10)
W20170726-16:28:51.988(-4)? (STDERR)     at /Users/jcursi/Sites/joncursi/redbird-web/node_modules/graphql/execution/execute.js:314:18
W20170726-16:28:51.988(-4)? (STDERR)     at Array.reduce (native)
joncursi commented 7 years ago

@benjamn @abernix FYI - Meteor 1.6 beta 14 breaks sign in / sign up functionality for projects that use Apollo. Beta 4 works fine, but something changed between beta 4 and beta 14 around the handling of login tokens.

abernix commented 7 years ago

@joncursi Could you open an issue with a reproduction in the meteor/meteor repository please? This will certainly get lost here.

joncursi commented 6 years ago

This appears to be fixed in METEOR@1.6-beta.32

smeijer commented 5 years ago

This seems to be back. See #90. I haven't updated meteor, only updated a few apollo / graphql packages.