question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Calendar not working - TypeError: Cannot set property 'innerHTML' of null

See original GitHub issue

Hi,

I created my personal site ( https://danielfelix.in/ ) a few weeks back and used Bloggify/github-calendar to display my GitHub Contributions on it.

It was working fine as of last week.

And when I checked today it didn’t display anything, so I checked the console and found the following error.

TypeError: Cannot set property 'innerHTML' of null

I even created a CodePen to test it and have received the same error on its console as well.

Any fixes to this issue?

Thanks in advance…

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:7
  • Comments:5

github_iconTop GitHub Comments

1reaction
Cipher-Codercommented, Feb 5, 2021

In all the SVG’s that GitHub has used to show the contributions graph, there has always been a ‘fill’ attribute. The current SVG that GitHub is using does not contain one and the github-parser library depends on that attribute:

if (!fill) {
            return;
        }

Without it, as you can see, it is doing what it was told. Returning nothing. I did get mine up and running again.

image

I stripped out a bunch of things I did not need, including that if statement. I use my own styling so the ‘fill’ is not important to me. I took a lot of things out that I did not need so I am not sure if you would be able to use it. I also hard coded my own proxy and some other things. You are welcome to check my fork out to give yourselves some ideas. I have browser extensions relying on this, which is why I forked it to begin with and also why I am always in a mad dash to get things working again. This is my fork of the github-parsing library and also my fork of the github-calendar repo. I hope this gives you all some ideas. And hopefully this will make things easier on @IonicaBizau to fix it.

If you have any other questions that I may be able to help with… Hit me up.

0reactions
Ariel-MNcommented, Feb 9, 2021

Thank you so much @IonicaBizau, you are the best.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot set property 'innerHTML' of null - Stack Overflow
If the element referred to has not been saved once the page is loaded is 'null', because the document does not contain it...
Read more >
JavaScript TypeError: cannot set property 'innerHTML'
The “cannot set property 'innerHTML' of null” error is a type error. This means we are trying to apply a property or a...
Read more >
Cannot set property 'innerHTML' of Null in JavaScript
To solve the "Cannot set property 'innerHTML' of null" error, make sure the DOM element you're setting the innerHTML property on exists. The...
Read more >
3 Simple Ways to Fix "cannot set property 'innerHTML' of null ...
It will be executed only on the HTML element. If the getElementById(“”) does not find the required element for the input id, then...
Read more >
cannot set property 'innerhtml' of null react - You.com
The most likely reason why you are getting the error is that your refs are not attached to a DOM element. If you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found