leemons icon indicating copy to clipboard operation
leemons copied to clipboard

Blank pages loading

Open mittal07abhilash opened this issue 2 years ago • 28 comments

Hi!

I am getting a blank page when going to http://localhost:8080, http://localhost:8080/admin and http://localhost:3000. And below are the logs from the "yarn dev" server when loading localhost:8080.

Listening on http://localhost:8080
[Remember email] Nothing to send
2023-10-31T06:45:50.953Z HTTP    Start connection to POST /api/multilanguage/common/logged from ::ffff:125.63.97.180
JsonWebTokenError: jwt must be provided
    at Object.module.exports [as verify] (/home/ubuntu/my-leemons/node_modules/jsonwebtoken/verify.js:53:17)
    at VM2 Wrapper.apply (/home/ubuntu/my-leemons/node_modules/vm2/lib/bridge.js:485:11)
    at verifyJWTToken (/home/ubuntu/my-leemons/packages/leemons-plugin-users/src/services/users/jwt/verifyJWTToken.js:11:27)
    at async Proxy.detailForJWT (/home/ubuntu/my-leemons/packages/leemons-plugin-users/src/services/users/jwt/detailForJWT.js:17:19)
2023-10-31T06:45:50.981Z HTTP      End connection to POST /api/multilanguage/common/logged from ::ffff:125.63.97.180 41 ms
JsonWebTokenError: jwt must be provided
    at Object.module.exports [as verify] (/home/ubuntu/my-leemons/node_modules/jsonwebtoken/verify.js:53:17)
    at VM2 Wrapper.apply (/home/ubuntu/my-leemons/node_modules/vm2/lib/bridge.js:485:11)
    at verifyJWTToken (/home/ubuntu/my-leemons/packages/leemons-plugin-users/src/services/users/jwt/verifyJWTToken.js:11:27)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Proxy.detailForJWT (/home/ubuntu/my-leemons/packages/leemons-plugin-users/src/services/users/jwt/detailForJWT.js:17:19)
2023-10-31T06:45:51.161Z HTTP    Start connection to POST /api/multilanguage/common/logged from ::ffff:125.63.97.180
2023-10-31T06:45:51.165Z HTTP    Start connection to GET /api/users/platform/theme from ::ffff:125.63.97.180
2023-10-31T06:45:51.181Z HTTP      End connection to GET /api/users/platform/theme from ::ffff:125.63.97.180 17 ms
2023-10-31T06:45:51.188Z HTTP      End connection to POST /api/multilanguage/common/logged from ::ffff:125.63.97.180 28 ms
2023-10-31T06:45:51.475Z HTTP    Start connection to GET /api/admin/organization/jsonTheme from ::ffff:125.63.97.180
2023-10-31T06:45:51.478Z HTTP      End connection to GET /api/admin/organization/jsonTheme from ::ffff:125.63.97.180 12 ms
2023-10-31T06:45:51.894Z HTTP    Start connection to GET /api/admin/i18n/welcome/en from ::ffff:125.63.97.180
JsonWebTokenError: jwt must be provided
    at Object.module.exports [as verify] (/home/ubuntu/my-leemons/node_modules/jsonwebtoken/verify.js:53:17)
    at VM2 Wrapper.apply (/home/ubuntu/my-leemons/node_modules/vm2/lib/bridge.js:485:11)
    at verifyJWTToken (/home/ubuntu/my-leemons/packages/leemons-plugin-users/src/services/users/jwt/verifyJWTToken.js:11:27)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Proxy.detailForJWT (/home/ubuntu/my-leemons/packages/leemons-plugin-users/src/services/users/jwt/detailForJWT.js:17:19)
2023-10-31T06:45:51.897Z HTTP    Start connection to GET /api/users/user from ::ffff:125.63.97.180
2023-10-31T06:45:51.897Z HTTP      End connection to GET /api/users/user from ::ffff:125.63.97.180 1 ms
2023-10-31T06:45:51.899Z HTTP      End connection to GET /api/admin/i18n/welcome/en from ::ffff:125.63.97.180 5 ms
2023-10-31T06:45:52.186Z HTTP    Start connection to GET /api/admin/settings from ::ffff:125.63.97.180
2023-10-31T06:45:52.189Z HTTP      End connection to GET /api/admin/settings from ::ffff:125.63.97.180 5 ms
JsonWebTokenError: jwt must be provided
    at Object.module.exports [as verify] (/home/ubuntu/my-leemons/node_modules/jsonwebtoken/verify.js:53:17)
    at VM2 Wrapper.apply (/home/ubuntu/my-leemons/node_modules/vm2/lib/bridge.js:485:11)
    at verifyJWTToken (/home/ubuntu/my-leemons/packages/leemons-plugin-users/src/services/users/jwt/verifyJWTToken.js:11:27)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Proxy.detailForJWT (/home/ubuntu/my-leemons/packages/leemons-plugin-users/src/services/users/jwt/detailForJWT.js:17:19)
2023-10-31T06:45:52.274Z HTTP    Start connection to POST /api/multilanguage/common/logged from ::ffff:125.63.97.180
2023-10-31T06:45:52.298Z HTTP      End connection to POST /api/multilanguage/common/logged from ::ffff:125.63.97.180 23 ms
JsonWebTokenError: jwt must be provided
    at Object.module.exports [as verify] (/home/ubuntu/my-leemons/node_modules/jsonwebtoken/verify.js:53:17)
    at VM2 Wrapper.apply (/home/ubuntu/my-leemons/node_modules/vm2/lib/bridge.js:485:11)
    at verifyJWTToken (/home/ubuntu/my-leemons/packages/leemons-plugin-users/src/services/users/jwt/verifyJWTToken.js:11:27)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Proxy.detailForJWT (/home/ubuntu/my-leemons/packages/leemons-plugin-users/src/services/users/jwt/detailForJWT.js:17:19)
2023-10-31T06:45:52.500Z HTTP    Start connection to POST /api/multilanguage/common/logged from ::ffff:125.63.97.180
2023-10-31T06:45:52.516Z HTTP      End connection to POST /api/multilanguage/common/logged from ::ffff:125.63.97.180 19 ms

mittal07abhilash avatar Oct 31 '23 06:10 mittal07abhilash

Hi,

Looks like you've already created a superAdmin user, and the authentication token is being corrupted, I recommend you to try and navigate to http://localhost:8080/ from an incognito window, or another browser in order to check if it's the problem

MIGUELez11 avatar Oct 31 '23 06:10 MIGUELez11

Thanks for the quick response.

I tried opening it on an incognito window and it is still the same. It always redirects to "http://localhost:8080/admin/welcome".

I am hosting it on an AWS Ubuntu 16.04 EC2 instance.

mittal07abhilash avatar Oct 31 '23 07:10 mittal07abhilash

Yes, the redirection is expected, but it should show the admin onboarding, which branch are you deploying? Main?

MIGUELez11 avatar Oct 31 '23 07:10 MIGUELez11

Yes. It is the main branch.

mittal07abhilash avatar Oct 31 '23 07:10 mittal07abhilash

I have tried it in a separate browser as well, and a circular loader spins up for a few seconds then it is blank.

mittal07abhilash avatar Oct 31 '23 07:10 mittal07abhilash

Well, it's certainly the first time that I'm seeing this bug, clearly, the backend is trying to parse a login token, but it's not being provided (because the user doesn't even exist). Can you try checking out to v0.0.4, and then do a fresh install (erease the db, and start again)? It should work

MIGUELez11 avatar Oct 31 '23 08:10 MIGUELez11

I tried these steps with v0.0.4. but I am getting the same error in the dev server logs. The docker installation works though.

mittal07abhilash avatar Nov 01 '23 11:11 mittal07abhilash

I'll have a look, I'm sorry

MIGUELez11 avatar Nov 02 '23 10:11 MIGUELez11

Leemons Team, I setup the project in my local machine as per your documentations.

I tried to run the "core" and "front" server on incognito window with v0.0.4 but facing the same issue. Please check out the below attachment for your reference.

Screenshot from 2023-11-01 17-46-34

gulshanchouhan1993 avatar Nov 02 '23 11:11 gulshanchouhan1993

Leemons Team, I setup the project in my local machine as per your documentations.

I tried to run the "core" and "front" server on incognito window with v0.0.4 but facing the same issue. Please check out the below attachment for your reference.

Screenshot from 2023-11-01 17-46-34 I am also facing the same issue.

shoaib-hussain-454 avatar Nov 02 '23 11:11 shoaib-hussain-454

Leemons Team, I setup the project in my local machine as per your documentations.

I tried to run the "core" and "front" server on incognito window with v0.0.4 but facing the same issue. Please check out the below attachment for your reference.

Screenshot from 2023-11-01 17-46-34

I am also facing the same issue.

Jagdishinfobeans avatar Nov 02 '23 11:11 Jagdishinfobeans

I've started a new Leemons installation in main branch, It's true that the backend error about jwt being invalid is appearing, but the frontend is displaying the installation wizzard correctly.

I've done a fresh clone, I don't know why all you are having this error.

Captura de pantalla 2023-11-02 a las 15 02 11

Captura de pantalla 2023-11-02 a las 15 02 24 This screenshot is after the redirection from https://localhost:8080 to the admin setup page

MIGUELez11 avatar Nov 02 '23 14:11 MIGUELez11

I've started a new Leemons installation in main branch, It's true that the backend error about jwt being invalid is appearing, but the frontend is displaying the installation wizzard correctly.

I've done a fresh clone, I don't know why all you are having this error.

Captura de pantalla 2023-11-02 a las 15 02 11

Captura de pantalla 2023-11-02 a las 15 02 24 This screenshot is after the redirection from https://localhost:8080 to the admin setup page

image

I've done a fresh clone, but I'm still encountering an error.

shoaib-hussain-454 avatar Nov 02 '23 14:11 shoaib-hussain-454

@MIGUELez11 We tried with the fresh setup again & follow the same thing with main branch but still facing the same issues. Could you please provide us the "all-in-one" template file (i.e data.xlxs) which contains all the demo details in the correct format? It might be a case.

gulshanchouhan1993 avatar Nov 02 '23 14:11 gulshanchouhan1993

I can't today, but I'm gonna answer for it.

Can you please visit http://localhost:8080/api/status to check if the backend is listening correctly?

What about http://localhost:3000/users/login? It's showing a login form without text?

MIGUELez11 avatar Nov 02 '23 14:11 MIGUELez11

Same Issue here as well.

Thanks, Apoorv

Screenshot 2023-11-02 at 22 10 51 Screenshot 2023-11-02 at 22 10 32 Screenshot 2023-11-02 at 22 10 20 Screenshot 2023-11-02 at 22 10 14

ApoorvMangal avatar Nov 02 '23 16:11 ApoorvMangal

@MIGUELez11 i checked the api http://localhost:8080/api/status so it's listening perfectly with response. {"status":200,"message":"ok"}

but http://localhost:3000/users/login shown me a blank page.

Screenshot from 2023-11-02 23-27-09

gulshanchouhan1993 avatar Nov 02 '23 17:11 gulshanchouhan1993

The frontend is listening on port 3000, but you should access through 8080.

@Cerberupo do you remember the cannot read default of undefined error from previously?

MIGUELez11 avatar Nov 02 '23 21:11 MIGUELez11

@MIGUELez11 @Cerberupo I tried to access the frontend with both links :- http://localhost:3000 http://localhost:8080

Having same issue. the blank page is appearing with loader only. Not able to see the welcome wizard page with both the ports.

gulshanchouhan1993 avatar Nov 03 '23 06:11 gulshanchouhan1993

Can anyone inspect the network tab and download it in a HAR type?

Also, I have to add that we are migrating this version of Leemons to a new infrastructure, we're almost there :D.

MIGUELez11 avatar Nov 06 '23 08:11 MIGUELez11

#Hi @MIGUELez11,

Please find the attached HAR file. Please do let me know if you need any other information, happy to help.

localhost.zip

I am also facing the same issue as others (attached screenshot for the same). Error

Another observation : I need to apply safe operator (?) on line number 62 in connectorRegistry.js else it gives me another like unable to read undefined of connector. I have installed both mySQL and mongoDB in my system. Does any one else also face the same issue ? Attached screenshot of the code change that I need to locally in order to run the backend.

optionalchaining

AAKCoder avatar Nov 06 '23 09:11 AAKCoder

@AAKCoder can you provide your .env (remove hosts as password values) and the apps/demo/config/database.js files??

MIGUELez11 avatar Nov 06 '23 09:11 MIGUELez11

Okay, with the har file viewed, can anyone provide a log? They're stored in examples/demo/logs

MIGUELez11 avatar Nov 06 '23 10:11 MIGUELez11

Please find attached the log file, do let me know if anything else is required..

latest.log

AAKCoder avatar Nov 06 '23 10:11 AAKCoder

@MIGUELez11 I have not created any .env files, are we supposed to create? I am sorry if I missed that step, can you help me with what needs to be put in that?

Attached the database.js file. database.zip

AAKCoder avatar Nov 06 '23 11:11 AAKCoder

@MIGUELez11 I have not created any .env files, are we supposed to create? I am sorry if I missed that step, can you help me with what needs to be put in that?

Attached the database.js file. database.zip

I'm sorry, you don't need the .env, as the docs have instructions to write directly to the files. I don't see anything leading to the bug, I can't understand why it's failing 🤔😢

MIGUELez11 avatar Nov 06 '23 11:11 MIGUELez11

@MIGUELez11 Thanks for the investigation, if anybody is able to help please do so.. Can migration to new infrastructure possibly help to solve this? When is the update expected?

AAKCoder avatar Nov 06 '23 12:11 AAKCoder

Hello there, I think I've found the solution, today I've started having this issue, for me it was not having @bubbles-ui/* version 1.1.109.

I've done with vs code a replace with this:

: "dev"

And replaced it by

: "1.1.109"

MIGUELez11 avatar Dec 15 '23 10:12 MIGUELez11