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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Bug: Crash with 0.108.0 when NC_PUBLIC_URL is set #5778

Closed
1 task done
gramakri opened this issue May 31, 2023 · 4 comments 路 Fixed by #5779
Closed
1 task done

馃悰 Bug: Crash with 0.108.0 when NC_PUBLIC_URL is set #5778

gramakri opened this issue May 31, 2023 · 4 comments 路 Fixed by #5779
Assignees

Comments

@gramakri
Copy link

gramakri commented May 31, 2023

Please confirm if bug report does NOT exists already ?

  • I confirm there is no existing issue for this

Steps to reproduce ?

  • Start nocodb with NC_PUBLIC_URL environment variable set
  • The code crashes with
# node index.js 
[Nest] 135  - 05/31/2023, 3:47:16 PM     LOG [NestFactory] Starting Nest application...
[Nest] 135  - 05/31/2023, 3:47:16 PM     LOG [InstanceLoader] PassportModule dependencies initialized +31ms
[Nest] 135  - 05/31/2023, 3:47:16 PM     LOG [InstanceLoader] MulterModule dependencies initialized +0ms
[Nest] 135  - 05/31/2023, 3:47:16 PM     LOG [InstanceLoader] MulterModule dependencies initialized +0ms
[Nest] 135  - 05/31/2023, 3:47:16 PM     LOG [InstanceLoader] o dependencies initialized +0ms
[Nest] 135  - 05/31/2023, 3:47:16 PM     LOG [InstanceLoader] DiscoveryModule dependencies initialized +4ms
[Nest] 135  - 05/31/2023, 3:47:16 PM   ERROR [ExceptionHandler] Cannot read properties of undefined (reading '_noco')
TypeError: Cannot read properties of undefined (reading '_noco')
    at m.create (/app/code/node_modules/nocodb/dist/bundle.js:1:1313136)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Desired Behavior

Should not crash

Project Details

I am the maintainer of the Cloudron package. This was found when updating to latest version

Attachments

No response

@gramakri
Copy link
Author

It seems the issue is from maybe this commit . Specifically:

https://github.com/nocodb/nocodb/blob/master/packages/nocodb/src/utils/nc-config/NcConfig.ts#L123

I guess ncConfig.envs['_noco'] is not initialized .

@gramakri
Copy link
Author

I guess the envs stuff should go away entirely since it's not used afaict. From https://github.com/nocodb/nocodb/blob/master/packages/nocodb/src/utils/nc-config/NcConfig.ts#L43

  // TODO what is this?
  envs: any;

@pranavxc
Copy link
Member

The envs is no longer in use I will remove it, thanks for reporting the bug.

@gramakri
Copy link
Author

gramakri commented Jun 1, 2023

Can confirm it's fixed. Thanks for the quick fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants