plotly / plotly/plotly.js

internal relayout method called with undefined

未关闭
#6,869 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

bug P3
主要语言
JavaScript
星标
18.3k
派生
2k
平均合并
2 天 12 小时
30 天内合并 PR
28

描述

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

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 src/plot_api/plot_api.js 第 1774 行附近开始,跟踪 astr 的 undefined 或 null 值如何到达内部 relayout 函数。验证警告行为,并确认此路径能够成功完成,而不是被拒绝;考虑 stack trace 将如何帮助诊断,并在定义完成条件之前检查相关的 relayout 行为。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript
领域
data-visualization
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。