RangeError: toPrecision() argument must be between 1 and 100
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- docker, javascript, node.js
Research direction
Reproduce the example curl request from the issue using the supplied Dockerfile, then inspect the triggerExport stack location in node_modules/highcharts-export-server/lib/export.js:157. Compare the request data and dependency/runtime versions around the failing call; done means the example export completes without the RangeError.
Written by the indexing model from the issue text.
Description
Hello people,
I'm currently try to setup the server with Docker.
Error Message when try the example test curl request: curl -H "Content-Type: application/json" -X POST -d '{"infile":{"title": {"text": "Chart"}, "xAxis": {"categories": ["Jan", "Feb", "Mar"]}, "series": [{"data": [29.9, 71.5, 106.4]}]}}' 127.0.0.1:7801:
highcharts-export-server-1 | Tue May 06 2025 13:15:34 GMT+0000 [verbose] - [export] Got an incoming HTTP request with ID 05520c7efe38433785a289f6a7fb6ceb.
highcharts-export-server-1 | Tue May 06 2025 13:15:34 GMT+0000 [verbose] - [chart] Starting the exporting process.
highcharts-export-server-1 | Tue May 06 2025 13:15:34 GMT+0000 [verbose] - [chart] Attempting to export from a raw input.
highcharts-export-server-1 | Tue May 06 2025 13:15:34 GMT+0000 [verbose] - [pool] Work received, starting to process.
highcharts-export-server-1 | Tue May 06 2025 13:15:34 GMT+0000 [verbose] - [pool] Acquiring a worker handle.
highcharts-export-server-1 | Tue May 06 2025 13:15:34 GMT+0000 [verbose] - [pool] Acquired a worker handle.
highcharts-export-server-1 | Tue May 06 2025 13:15:34 GMT+0000 [verbose] - [pool] Starting work on pool entry with ID c048d55b-c456-4b80-8d7a-1550f76b44b7.
highcharts-export-server-1 | Tue May 06 2025 13:15:34 GMT+0000 [verbose] - [export] Determining export path.
highcharts-export-server-1 | Tue May 06 2025 13:15:34 GMT+0000 [verbose] - [export] Treating as config.
highcharts-export-server-1 | Tue May 06 2025 13:15:34 GMT+0000 [verbose] - [export] The current total size of data passed to a page is around 0.00 MB
highcharts-export-server-1 | Tue May 06 2025 13:15:34 GMT+0000 [error] - [pool] In pool.postWork: For request with ID 05520c7efe38433785a289f6a7fb6ceb - Error encountered during export: 30.137292ms.
highcharts-export-server-1 | RangeError: toPrecision() argument must be between 1 and 100
highcharts-export-server-1 | at triggerExport (evaluate at setAsConfig (file:///home/pptruser/node_modules/highcharts-export-server/lib/export.js:157:15), <anonymous>:94:20)
highcharts-export-server-1 | at #evaluate (file:///home/pptruser/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/ExecutionContext.js:383:19)
highcharts-export-server-1 | at async ExecutionContext.evaluate (file:///home/pptruser/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/ExecutionContext.js:270:16)
highcharts-export-server-1 | at async IsolatedWorld.evaluate (file:///home/pptruser/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/IsolatedWorld.js:96:16)
highcharts-export-server-1 | at async CdpFrame.evaluate (file:///home/pptruser/node_modules/puppeteer-core/lib/esm/puppeteer/api/Frame.js:335:20)
highcharts-export-server-1 | at async CdpPage.evaluate (file:///home/pptruser/node_modules/puppeteer-core/lib/esm/puppeteer/api/Page.js:799:20)
highcharts-export-server-1 | at async default (file:///home/pptruser/node_modules/highcharts-export-server/lib/export.js:224:9)
highcharts-export-server-1 | at async postWork (file:///home/pptruser/node_modules/highcharts-export-server/lib/pool.js:328:20)
highcharts-export-server-1 | at async doExport (file:///home/pptruser/node_modules/highcharts-export-server/lib/chart.js:438:20)
highcharts-export-server-1 | at async exportHandler (file:///home/pptruser/node_modules/highcharts-export-server/lib/server/routes/export.js:225:5)
highcharts-export-server-1 | Tue May 06 2025 13:15:34 GMT+0000 [verbose] - [pool] Releasing a worker with ID c048d55b-c456-4b80-8d7a-1550f76b44b7. Clear page status: true.
I'm already tried different Node versions and HighChart versions but always I've got the toPrecision error but I can't find anything in this direction. I've also tried google-chrome-stable.
Has somebody an idea?
Dockerfile:
FROM node:22
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
ENV PUPPETEER_EXECUTABLE_PATH /usr/bin/chromium
ENV HIGHCHARTS_VERSION=11
RUN apt-get update \
&& apt-get install -y chromium \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY ./deploy/highcharts/fonts/ /usr/share/fonts/truetype/
RUN fc-cache -fv
RUN groupadd -r pptruser && useradd -r -g pptruser pptruser \
&& mkdir -p /home/pptruser/Downloads \
&& chown -R pptruser:pptruser /home/pptruser
USER pptruser
WORKDIR /home/pptruser
RUN npm install highcharts-export-server
EXPOSE 7801
ENTRYPOINT ["node", "/home/pptruser/node_modules/highcharts-export-server/bin/cli.js", "--enableServer", "1"]
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from highcharts/node-export-server
-
Update Puppeteer to version 25.11.0+ to allow ARM64 linux images to run node-export-serverPossibly taken @daniatic claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
highcharts/node-export-server#686 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
highcharts/node-export-server#680 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
highcharts/node-export-server#679 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
highcharts/node-export-server#678 ·
-
Not working on s390xOpen
Difficulty 4/5 3-5 days Newbie friendliness 30/100
highcharts/node-export-server#676 ·
All issues in highcharts/node-export-server
Similar issues
-
Engineering
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
techmatters/terraso-web-client#3095 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Service process inherits the caller's cwd at first use, holding that folder open on Windows (EBUSY)Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nextcloud/viewer#3424 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day