internal relayout method called with undefined
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 18.3k
- Forks
- 2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 28
Description
We have observed a relayout failure immediately after this warning:
WARN: Relayout fail. undefined undefined
Non-Error promise rejection captured with value: undefined
coming from: https://github.com/plotly/plotly.js/blob/24b6f75e2d3b58cb1cd9cdd850894720404373d3/src/plot_api/plot_api.js#L1774
I'm not sure which exact circumstances triggered this failure, but the relayout internal function probably should not reject if astr is undefined, as this simply means there is nothing to update (recording the warning seems fine as it helps to diagnose call sites which are not correctly omitting the relayout, but it should not cause the function to fail).
I suggest that this branch should return successfully after logging a warning if astr is undefined / null.
It would also be useful for diagnosing the root cause further if the warning could include a stack trace.
Plotly.js version: 2.26.2
Contributor 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.
Research direction
Start in src/plot_api/plot_api.js around line 1774 and trace how an undefined or null astr value reaches the internal relayout function. Verify the warning behavior and confirm that this path completes successfully rather than rejecting; consider how a stack trace would aid diagnosis, and check the relevant relayout behavior before defining completion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100