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

console: Cannot read property 'foldable' of undefined #4907

Closed
thencke opened this issue May 28, 2020 · 7 comments
Closed

console: Cannot read property 'foldable' of undefined #4907

thencke opened this issue May 28, 2020 · 7 comments
Assignees
Labels
c/console Related to console k/bug Something isn't working support/needs-more-info Needs more details/info/repro instructions

Comments

@thencke
Copy link

thencke commented May 28, 2020

Hi, I got the following error:

Error Screenshot
https://imgur.com/3thgMw7

TypeError: Cannot read property 'foldable' of undefined
    at https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/main.js.gz:1:3916472
    at Array.map (<anonymous>)
    at RTFoldableTable.applyFoldableForColumns (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/main.js.gz:1:3916400)
    at RTFoldableTable.n (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/main.js.gz:1:3917655)
    at Wa (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/vendor.js.gz:1:4352001)
    at Ua (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/vendor.js.gz:1:4351794)
    at Ya (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/vendor.js.gz:1:4355233)
    at fs (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/vendor.js.gz:1:4377676)
    at ds (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/vendor.js.gz:1:4378066)
    at Js (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/vendor.js.gz:1:4385244)

Have no idea why it happened, I'll try to explain what i did to get this:
Everything was done in Hasura Console:

  1. Deleted all references and data from a particular table.
  2. Deleted the table.
  3. Recreated table with same name, different column names.
  4. Added foreign columns reference before confirming.
  5. Confirm table create.

After this, I tried to click in the left side list of tables on the new created table and I got this error, now I am unable to modify, see or do anything with this table using Hasura Console.

I'll try to delete this table using SQL and then try to create again.
Cheers

@thencke
Copy link
Author

thencke commented May 28, 2020

I just created the same table again, same references and columns, no problems. So, I have no idea what happened, lucky me it was on development stage of the project.

@beerose beerose added c/console Related to console k/bug Something isn't working support/needs-more-info Needs more details/info/repro instructions labels May 28, 2020
@beerose beerose changed the title Error Reporting console: runtime error in FoldableTable May 28, 2020
@beerose beerose changed the title console: runtime error in FoldableTable console: Cannot read property 'foldable' of undefined May 28, 2020
@antoinemaz
Copy link

i have this problem too.

Steps :

  • Create a view in a schema
  • Track this views, and add permissions
  • Delete this view in SQL
  • Reload metadatas and drop all inconsistents objects
  • Create a new view (with the same name) for adding three new columns
  • Track this new view
  • And this error page appears : "TypeError: Cannot read property 'foldable' of undefined"

@beerose beerose self-assigned this May 28, 2020
@antoinemaz
Copy link

antoinemaz commented May 28, 2020

Found !

i have created my view with postgres, whereas i use this view with another SQL user !

so it was a permission issue

so add grand usage on the schema

grant usage on schema <MY_SCHEMA> to <MY_HASURA_USER>;
grant select on all tables in schema <MY_SCHEMA> to <MY_HASURA_USER>;

@beerose
Copy link
Contributor

beerose commented May 28, 2020

Thanks @blinkn and @antoinemaz for reporting and providing reproduction steps.

@antoinemaz thanks for the update. We'll take care of handling this case so it doesn't trigger a runtime error.

@Vbubblery
Copy link

For me, it's more wired. It works well on MacOS, but on my windows, I get the same error:

TypeError: Cannot read property 'foldable' of undefined
    at https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/main.js.gz:1:3941899
    at Array.map (<anonymous>)
    at RTFoldableTable.applyFoldableForColumns (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/main.js.gz:1:3941827)
    at RTFoldableTable.n (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/main.js.gz:1:3943082)
    at Wa (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/vendor.js.gz:1:4352010)
    at Ua (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/vendor.js.gz:1:4351803)
    at Ya (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/vendor.js.gz:1:4355242)
    at fs (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/vendor.js.gz:1:4377685)
    at ds (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/vendor.js.gz:1:4378075)
    at Js (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/vendor.js.gz:1:4385253)

@farzd
Copy link

farzd commented Jun 7, 2020

im still getting this issue, it happens when i try access one table. Tried dropping all rows and removing relationships with it but no avail

TypeError: Cannot read property 'foldable' of undefined
    at https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/main.js.gz:1:3941899
    at Array.map (<anonymous>)
    at RTFoldableTable.applyFoldableForColumns (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/main.js.gz:1:3941827)
    at RTFoldableTable.n (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/main.js.gz:1:3943082)
    at Wa (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/vendor.js.gz:1:4352010)
    at Ua (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/vendor.js.gz:1:4351803)
    at Ya (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/vendor.js.gz:1:4355242)
    at fs (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/vendor.js.gz:1:4377685)
    at ds (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/vendor.js.gz:1:4378075)
    at Js (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/vendor.js.gz:1:4385253)

@Vbubblery
Copy link

im still getting this issue, it happens when i try access one table. Tried dropping all rows and removing relationships with it but no avail

TypeError: Cannot read property 'foldable' of undefined
    at https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/main.js.gz:1:3941899
    at Array.map (<anonymous>)
    at RTFoldableTable.applyFoldableForColumns (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/main.js.gz:1:3941827)
    at RTFoldableTable.n (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/main.js.gz:1:3943082)
    at Wa (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/vendor.js.gz:1:4352010)
    at Ua (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/vendor.js.gz:1:4351803)
    at Ya (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/vendor.js.gz:1:4355242)
    at fs (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/vendor.js.gz:1:4377685)
    at ds (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/vendor.js.gz:1:4378075)
    at Js (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v1.2/vendor.js.gz:1:4385253)

I think just because the PR has not been merged. 🙁

@rikinsk rikinsk closed this as completed in e800e32 Jun 8, 2020
rikinsk pushed a commit that referenced this issue Jun 8, 2020
beerose pushed a commit to beerose/graphql-engine that referenced this issue Jun 16, 2020
rikinsk pushed a commit that referenced this issue Jun 16, 2020
…5108)

* console: fix checkbox for forwarding client headers in actions (close #4595) (#4669)
* console: fix bulk selected rows state in data browser (close #4654) (#4673)
* console: fix displaying boolean values in Edit Row tab (#4682)
* console: fix regression in editing permissions manually (fix #4683) (#4826)
* console: fix "Cannot read property 'foldable'" runtime error in `Browse Rows` page (fix #4907) (#5016)
* console: fix enum tables reload data button UI (close #4647) (#4877)
stevefan1999-personal pushed a commit to stevefan1999-personal/graphql-engine that referenced this issue Sep 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/console Related to console k/bug Something isn't working support/needs-more-info Needs more details/info/repro instructions
Projects
None yet
Development

No branches or pull requests

5 participants