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

wgc auth login get errors: #781

Open
khoahoang88 opened this issue May 12, 2024 · 1 comment
Open

wgc auth login get errors: #781

khoahoang88 opened this issue May 12, 2024 · 1 comment
Labels
bug Something isn't working internally-reviewed The issue has been reviewed internally.

Comments

@khoahoang88
Copy link

khoahoang88 commented May 12, 2024

Component(s)

cli

Component version

0.53.2

wgc version

0.53.2

controlplane version

0.53.2

router version

0.53.2

What happened?

Errors happen when i try to login via CLI

Description

Steps to Reproduce

  1. run command: wgc auth login
  2. CLI open webpage: Click Login -> Successful
  3. Return to CLI: Error shows

Expected Result

Login into Control Plane with command: wgc auth login

Actual Result

It has directed to web browser but show errors:

TypeError: Cannot read properties of undefined (reading 'map')
at Command. (file:///opt/homebrew/lib/node_modules/wgc/dist/commands/auth/commands/login.js:37:54)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Command.parseAsync (/opt/homebrew/lib/node_modules/wgc/node_modules/commander/lib/command.js:936:5)
at async file:///opt/homebrew/lib/node_modules/wgc/dist/index.js:8:5

Environment information

Environment

OS: "MAC OS Sonoma 14.1"
Package Manager: npm
Compiler(if manually compiled): "npm 10.2.0"

Router configuration

{"engineConfig":{"defaultFlushInterval":"500","datasourceConfigurations":[{"kind":"GRAPHQL","rootNodes":[{"typeName":"Post","fieldNames":["id","content","authorId"]},{"typeName":"Query","fieldNames":["posts","post"]}],"overrideFieldPathFromAlias":true,"customGraphql":{"fetch":{"url":{"staticVariableContent":"http://host.docker.internal:4001/graphql"},"method":"POST","body":{},"baseUrl":{},"path":{}},"subscription":{"enabled":true,"url":{"staticVariableContent":"http://host.docker.internal:4001/graphql"},"protocol":"GRAPHQL_SUBSCRIPTION_PROTOCOL_WS"},"federation":{"enabled":true,"serviceSdl":"type Post @key(fields: \"id\") {\n  id: ID!\n  content: String\n  authorId: ID!\n}\n\ntype Query {\n  posts: [Post!]!\n  post(id: ID!): Post\n}\n"},"upstreamSchema":{"key":"148cae0c5b5b812ee3ec8e368862577ba4bfd15d"}},"requestTimeoutSeconds":"10","id":"0","keys":[{"typeName":"Post","selectionSet":"id"}]},{"kind":"GRAPHQL","rootNodes":[{"typeName":"User","fieldNames":["id","name"]},{"typeName":"Post","fieldNames":["id","author"]},{"typeName":"Query","fieldNames":["users","user"]}],"overrideFieldPathFromAlias":true,"customGraphql":{"fetch":{"url":{"staticVariableContent":"http://host.docker.internal:4002/graphql"},"method":"POST","body":{},"baseUrl":{},"path":{}},"subscription":{"enabled":true,"url":{"staticVariableContent":"http://host.docker.internal:4002/graphql"},"protocol":"GRAPHQL_SUBSCRIPTION_PROTOCOL_WS"},"federation":{"enabled":true,"serviceSdl":"type User @key(fields: \"id\") {\n  id: ID!\n  name: String!\n}\n\ntype Post @key(fields: \"id\") {\n  id: ID!\n  authorId: ID! @external\n  author: User! @requires(fields: \"authorId\")\n}\n\ntype Query {\n  users: [User!]!\n  user(id: ID!): User\n}\n"},"upstreamSchema":{"key":"d7822358d4793d6bf395d1f186766d904591de4a"}},"requestTimeoutSeconds":"10","id":"1","keys":[{"typeName":"User","selectionSet":"id"},{"typeName":"Post","selectionSet":"id"}],"requires":[{"typeName":"Post","fieldName":"author","selectionSet":"authorId"}]}],"fieldConfigurations":[{"typeName":"Query","fieldName":"post","argumentsConfiguration":[{"name":"id","sourceType":"FIELD_ARGUMENT"}]},{"typeName":"Query","fieldName":"user","argumentsConfiguration":[{"name":"id","sourceType":"FIELD_ARGUMENT"}]}],"graphqlSchema":"directive @tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION\n\ntype Post {\n  id: ID!\n  content: String\n  authorId: ID!\n  author: User!\n}\n\ntype Query {\n  posts: [Post!]!\n  post(id: ID!): Post\n  users: [User!]!\n  user(id: ID!): User\n}\n\ntype User {\n  id: ID!\n  name: String!\n}","stringStorage":{"148cae0c5b5b812ee3ec8e368862577ba4bfd15d":"schema {\n  query: Query\n}\n\ndirective @extends on INTERFACE | OBJECT\n\ndirective @external on FIELD_DEFINITION | OBJECT\n\ndirective @key(fields: openfed__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT\n\ndirective @provides(fields: openfed__FieldSet!) on FIELD_DEFINITION\n\ndirective @requires(fields: openfed__FieldSet!) on FIELD_DEFINITION\n\ndirective @tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION\n\ntype Post @key(fields: \"id\") {\n  authorId: ID!\n  content: String\n  id: ID!\n}\n\ntype Query {\n  post(id: ID!): Post\n  posts: [Post!]!\n}\n\nscalar openfed__FieldSet","d7822358d4793d6bf395d1f186766d904591de4a":"schema {\n  query: Query\n}\n\ndirective @extends on INTERFACE | OBJECT\n\ndirective @external on FIELD_DEFINITION | OBJECT\n\ndirective @key(fields: openfed__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT\n\ndirective @provides(fields: openfed__FieldSet!) on FIELD_DEFINITION\n\ndirective @requires(fields: openfed__FieldSet!) on FIELD_DEFINITION\n\ndirective @tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION\n\ntype Post @key(fields: \"id\") {\n  author: User! @requires(fields: \"authorId\")\n  authorId: ID! @external\n  id: ID!\n}\n\ntype Query {\n  user(id: ID!): User\n  users: [User!]!\n}\n\ntype User @key(fields: \"id\") {\n  id: ID!\n  name: String!\n}\n\nscalar openfed__FieldSet"}},"subgraphs":[{"id":"0","name":"posts","routingUrl":"http://host.docker.internal:4001/graphql"},{"id":"1","name":"users","routingUrl":"http://host.docker.internal:4002/graphql"}]}

Router execution config

{"engineConfig":{"defaultFlushInterval":"500","datasourceConfigurations":[{"kind":"GRAPHQL","rootNodes":[{"typeName":"Post","fieldNames":["id","content","authorId"]},{"typeName":"Query","fieldNames":["posts","post"]}],"overrideFieldPathFromAlias":true,"customGraphql":{"fetch":{"url":{"staticVariableContent":"http://host.docker.internal:4001/graphql"},"method":"POST","body":{},"baseUrl":{},"path":{}},"subscription":{"enabled":true,"url":{"staticVariableContent":"http://host.docker.internal:4001/graphql"},"protocol":"GRAPHQL_SUBSCRIPTION_PROTOCOL_WS"},"federation":{"enabled":true,"serviceSdl":"type Post @key(fields: \"id\") {\n  id: ID!\n  content: String\n  authorId: ID!\n}\n\ntype Query {\n  posts: [Post!]!\n  post(id: ID!): Post\n}\n"},"upstreamSchema":{"key":"148cae0c5b5b812ee3ec8e368862577ba4bfd15d"}},"requestTimeoutSeconds":"10","id":"0","keys":[{"typeName":"Post","selectionSet":"id"}]},{"kind":"GRAPHQL","rootNodes":[{"typeName":"User","fieldNames":["id","name"]},{"typeName":"Post","fieldNames":["id","author"]},{"typeName":"Query","fieldNames":["users","user"]}],"overrideFieldPathFromAlias":true,"customGraphql":{"fetch":{"url":{"staticVariableContent":"http://host.docker.internal:4002/graphql"},"method":"POST","body":{},"baseUrl":{},"path":{}},"subscription":{"enabled":true,"url":{"staticVariableContent":"http://host.docker.internal:4002/graphql"},"protocol":"GRAPHQL_SUBSCRIPTION_PROTOCOL_WS"},"federation":{"enabled":true,"serviceSdl":"type User @key(fields: \"id\") {\n  id: ID!\n  name: String!\n}\n\ntype Post @key(fields: \"id\") {\n  id: ID!\n  authorId: ID! @external\n  author: User! @requires(fields: \"authorId\")\n}\n\ntype Query {\n  users: [User!]!\n  user(id: ID!): User\n}\n"},"upstreamSchema":{"key":"d7822358d4793d6bf395d1f186766d904591de4a"}},"requestTimeoutSeconds":"10","id":"1","keys":[{"typeName":"User","selectionSet":"id"},{"typeName":"Post","selectionSet":"id"}],"requires":[{"typeName":"Post","fieldName":"author","selectionSet":"authorId"}]}],"fieldConfigurations":[{"typeName":"Query","fieldName":"post","argumentsConfiguration":[{"name":"id","sourceType":"FIELD_ARGUMENT"}]},{"typeName":"Query","fieldName":"user","argumentsConfiguration":[{"name":"id","sourceType":"FIELD_ARGUMENT"}]}],"graphqlSchema":"directive @tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION\n\ntype Post {\n  id: ID!\n  content: String\n  authorId: ID!\n  author: User!\n}\n\ntype Query {\n  posts: [Post!]!\n  post(id: ID!): Post\n  users: [User!]!\n  user(id: ID!): User\n}\n\ntype User {\n  id: ID!\n  name: String!\n}","stringStorage":{"148cae0c5b5b812ee3ec8e368862577ba4bfd15d":"schema {\n  query: Query\n}\n\ndirective @extends on INTERFACE | OBJECT\n\ndirective @external on FIELD_DEFINITION | OBJECT\n\ndirective @key(fields: openfed__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT\n\ndirective @provides(fields: openfed__FieldSet!) on FIELD_DEFINITION\n\ndirective @requires(fields: openfed__FieldSet!) on FIELD_DEFINITION\n\ndirective @tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION\n\ntype Post @key(fields: \"id\") {\n  authorId: ID!\n  content: String\n  id: ID!\n}\n\ntype Query {\n  post(id: ID!): Post\n  posts: [Post!]!\n}\n\nscalar openfed__FieldSet","d7822358d4793d6bf395d1f186766d904591de4a":"schema {\n  query: Query\n}\n\ndirective @extends on INTERFACE | OBJECT\n\ndirective @external on FIELD_DEFINITION | OBJECT\n\ndirective @key(fields: openfed__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT\n\ndirective @provides(fields: openfed__FieldSet!) on FIELD_DEFINITION\n\ndirective @requires(fields: openfed__FieldSet!) on FIELD_DEFINITION\n\ndirective @tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION\n\ntype Post @key(fields: \"id\") {\n  author: User! @requires(fields: \"authorId\")\n  authorId: ID! @external\n  id: ID!\n}\n\ntype Query {\n  user(id: ID!): User\n  users: [User!]!\n}\n\ntype User @key(fields: \"id\") {\n  id: ID!\n  name: String!\n}\n\nscalar openfed__FieldSet"}},"subgraphs":[{"id":"0","name":"posts","routingUrl":"http://host.docker.internal:4001/graphql"},{"id":"1","name":"users","routingUrl":"http://host.docker.internal:4002/graphql"}]}

Log output

No response

Additional context

No response

@khoahoang88 khoahoang88 added the bug Something isn't working label May 12, 2024
Copy link

WunderGraph commits fully to Open Source and we want to make sure that we can help you as fast as possible.
The roadmap is driven by our customers and we have to prioritize issues that are important to them.
You can influence the priority by becoming a customer. Please contact us here.

@jensneuse jensneuse added the internally-reviewed The issue has been reviewed internally. label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working internally-reviewed The issue has been reviewed internally.
Projects
None yet
Development

No branches or pull requests

2 participants