Skip to content

Uncaught TypeError: Cannot read property 'className' of null #103

@rudza

Description

@rudza

Uncaught TypeError: Cannot read property 'className' of null nprogress.js:463
classList nprogress.js:463
removeClass nprogress.js:444
NProgress.remove nprogress.js:257
(anonymous function) nprogress.js:98

Activity

frankie-loves-jesus

frankie-loves-jesus commented on Jan 5, 2015

@frankie-loves-jesus

Please set up a reduced testcase:

http://css-tricks.com/reduced-test-cases/

You're most likely just missing your NProgress container.

martinratinaud

martinratinaud commented on Sep 10, 2015

@martinratinaud
Contributor

This happens when you start a NProgress with a custom selector for Settings.parent and you change page (this happens to me with angular).
Nprogress will remove the progress bar after a certain timeout (based on speed) and this means that if you change the page and selector does not exists anymore, nprogress.remove() will be fired anyway, resulting in the above error.

I made a PR for that #129

Cheers

xtrasimplicity

xtrasimplicity commented on Nov 10, 2015

@xtrasimplicity

I can confirm that Martinratinaud's commit has changed the problem (at least, for me). :)

dukhevych

dukhevych commented on Jun 14, 2019

@dukhevych

OMG 4 years? Really?

danielbarion

danielbarion commented on Aug 12, 2020

@danielbarion

This issue is already solved into the master javascript file, but not released until now.

juanpablocs

juanpablocs commented on Aug 15, 2020

@juanpablocs

any notice? :/

patjagielski

patjagielski commented on Oct 4, 2021

@patjagielski

When will this change be implemented and the package be updated?

kostia7alania

kostia7alania commented on Oct 26, 2022

@kostia7alania

++

kostia7alania

kostia7alania commented on Oct 26, 2022

@kostia7alania

7 years ....

danielbarion

danielbarion commented on Oct 26, 2022

@danielbarion

For people that use React.js / Next.js:

https://www.npmjs.com/package/@tanem/react-nprogress

Dimchykus

Dimchykus commented on Feb 28, 2023

@Dimchykus

8 years ....

arlanschouwstra

arlanschouwstra commented on Jan 12, 2024

@arlanschouwstra

9 years?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @rudza@dukhevych@martinratinaud@frankie-loves-jesus@juanpablocs

      Issue actions

        Uncaught TypeError: Cannot read property 'className' of null · Issue #103 · rstacruz/nprogress