plotly / plotly/react-plotly.js

Uncaught TypeError: Cannot read property 'match' of null when clicking any options in the ModeBar

Open
#215 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.1k
Forks
138
Avg merge
3d 2h
Merged PRs (30d)
4

Description

"plotly.js": "^1.55.2"
"react": "^16.13.1"
"react-plotly.js": ^"2.5.0"

I am using react-plotly.js for our project.

I haven't modified much on this ModeBar (image below)

image

Added only two configs to the ModeBar

config={{
          displayModeBar: true,
          toImageButtonOptions: {
            filename: "something",
          },
        }}

It doesn't always happen but time to time, by clicking one of the options from the ModeBar, it still does the job without crashing the app but in console, it prints the following errors.

image

Right after I created this issue, just refreshed the app and went over exact same steps but no warning message this time.

I am quite new to React and this error message only comes from ModeBar buttons so I am assuming it's something to do with plotly.js library?

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start with the reported plotly.js, react, and react-plotly.js versions and the ModeBar config containing displayModeBar and toImageButtonOptions. Reproduce the intermittent error by clicking ModeBar options, capture the console stack trace, and determine whether the failure belongs to this React wrapper or plotly.js; the issue is resolved when ownership and a reliable reproduction are established.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
data-visualization, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.