keystone icon indicating copy to clipboard operation
keystone copied to clipboard

On Heroku Deploy, Cell of undefined

Open BoraALAP opened this issue 4 years ago • 8 comments

Hello Everyone,

I have been struggling to find the issue. I'm using the new Keystone-next to build an Admin Ui for my Database.

I have achieved what I try to do. When I deploy it to Heroku, after the build and start comments run, the Heroku server says Admin UI and graphql API ready. After this point when I put the URL of my backend and put my user details, for some reason it shoots an error on the console saying

react_devtools_backend.js:2430 TypeError: Cannot read property 'Cell' of undefined at ce1d4249f40c6f8ef0a08015d265a687af2b0871.b935273d15d4cbad9696.js:1 at Set.forEach (<anonymous>) at ce1d4249f40c6f8ef0a08015d265a687af2b0871.b935273d15d4cbad9696.js:1 at Array.forEach (<anonymous>) at ce1d4249f40c6f8ef0a08015d265a687af2b0871.b935273d15d4cbad9696.js:1 at Array.forEach (<anonymous>) at ce1d4249f40c6f8ef0a08015d265a687af2b0871.b935273d15d4cbad9696.js:1 at Object.va [as useMemo] (framework.f456f8a68b85b9798e07.js:1) at t.useMemo (framework.f456f8a68b85b9798e07.js:1) at O (ce1d4249f40c6f8ef0a08015d265a687af2b0871.b935273d15d4cbad9696.js:1)

and "heroku logs --tail --app ..." giving me 2021-02-22T04:38:31.842783+00:00 heroku[router]: at=info method=POST path="/api/graphql" host=frankbackend.herokuapp.com request_id=77317228-5767-4363-abb5-97691ca5bdef fwd="174.95.140.171" dyno=web.1 connect=1ms service=22ms status=200 bytes=36143 protocol=https

like trillion times. keep looping the same as the error above.

You can find my deployed repo https://github.com/BoraALAP/frank/tree/main/backend

I have no clue why is this happening. I have checked pretty much everything. And everything works perfectly fine in my local. Do you think this is an issue with Keystone or Heroku?

Thanks in advance.

Here are some reference images

Screen Shot 2021-02-21 at 11 42 48 PM

Screen Shot 2021-02-21 at 11 43 19 PM

Screen Shot 2021-02-21 at 11 43 30 PM

BoraALAP avatar Feb 22 '21 04:02 BoraALAP

I am facing this issue too

Omarzikry avatar Feb 25 '21 12:02 Omarzikry

@Omarzikry If you find a solution can you share, please?

BoraALAP avatar Feb 27 '21 05:02 BoraALAP

@BoraALAP Did you find the solution? I am facing the same issue.

sac-sha avatar Mar 18 '21 12:03 sac-sha

Same issue here.

davigiroux avatar Apr 03 '21 14:04 davigiroux

@BoraALAP @Omarzikry Hey guys! I found a solution that is not the greatest, but worked for me: There was a PR made because of this thread that solved this issue.

So basically I created a new app from scratch with the latest versions, as I couldn't do it manually in my package.json. Then I moved all my schemas and custom mutations to the new app and updated it in Heroku to use the new project and it finally worked.

davigiroux avatar Apr 03 '21 20:04 davigiroux

I have the same problem

THRY avatar May 04 '21 11:05 THRY

I was facing this locally and clearing the website cache fixed the issue.

junaid33 avatar May 05 '21 19:05 junaid33

TLDR: I was able to resolve this issue by upgrading keystone packages. Here's the working dependencies in my package.json file:

...
  "dependencies": {
    "@keystone-next/admin-ui": "^12.0.0",
    "@keystone-next/auth": "^19.0.0",
    "@keystone-next/fields": "^5.4.0",
    "@keystone-next/keystone": "14.0.1",
    "@keystone-next/types": "^15.0.0",
    "@keystonejs/server-side-graphql-client": "^2.1.2",
    "dotenv": "^8.2.0",
    "next": "^10.0.5",
    "react": "^17.0.1",
    "react-dom": "^17.0.1",
    ...
  },
...

For context, I was having the same issue: initial load on production/heroku sending me to /init and causing a never ending loop.

It looks like there was an issue in a previous version of @keystone-next/auth that wasn't detecting the right headers on the proxy requests that heroku sends on its internal network. The issue has been resolved here, so upgrading packages did the trick https://github.com/keystonejs/keystone/pull/4928

ghost avatar Aug 13 '21 21:08 ghost

Comments are saying this is resolved, please open a new issue if you are having this problem

dcousens avatar Nov 14 '23 01:11 dcousens