Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

v4: no error is thrown when callback is set and it's a file but allowFileResources is not set to true

Open
#575 2 comments 0 reactions 1 assignee View on GitHub

@jszuminski is already working on this.

Since Oct 28, 2024.

Assessment

This issue has not been assessed yet.

Description

bug only json

When we set allowCodeExecution to false, we get The 'callback', 'resources' and 'customCode' options have been disabled for this server.

When we set allowCodeExecution to true, we get no error.

But when we set callback to a file, it silently ignores it. No error or warning is provided, that allowFileResources has to be enabled / set to true.

That is not ideal and makes debugging harder.

https://github.com/highcharts/node-export-server/blob/e7409447ab621ef4df3da5da70e67edb7b9b1707/lib/chart.js#L416

To reproduce:

highcharts-export-server --allowCodeExecution true --logToFile false --infile "....in.js" --outfile "...out.jpg" --type "jpg" --globalOptions "....globalOptions.json" --callback "some-invalid-path.js" --width 600 throws no error.

highcharts-export-server --allowCodeExecution true --logToFile false --infile "....in.js" --outfile "...out.jpg" --type "jpg" --globalOptions "....globalOptions.js" --callback "some-invalid-path.js" --allowFileResources true --width 600 throws error no such file or directory, open 'some-invalid-path.json'

Dominant language
JavaScript
Stars
368
Forks
265
PR merge metrics
No merged PRs in 30d

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from highcharts/node-export-server

All issues in highcharts/node-export-server

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.