Platane / snk

🟩⬜ Generates a snake game from a github user contributions graph and output a screen capture as animated svg or gif
https://platane.github.io/snk
4.39k stars 1.11k forks source link

Fixes for action failing with "Cannot read properties of undefined (reading 'split')" | Updated selectors & matches #76

Closed milaabl closed 1 year ago

milaabl commented 1 year ago

After an update, GitHub client returns the user's contributions as a table, instead of a generated svg. That's why there's a sudden build error in the workflow.

Please have a look @Platane . Should be fixed now! :)

Thanks

SkyDynamic commented 1 year ago

hey guy, i just tried building svg using your repo, but it still Action failed with "Cannot read properties of undefined (reading 'split')"

and the action in this

action-img

AzeemIdrisi commented 1 year ago

Wow! That was quick.

milaabl commented 1 year ago

@SkyDynamic , will have a look now! Thanks

milaabl commented 1 year ago

@SkyDynamic , figured it out. Turns out one more file should have included the update. I'll add a new commit with a fix and let's see.

SkyDynamic commented 1 year ago

@SkyDynamic , figured it out. Turns out one more file should have included the update. I'll add a new commit with a fix and let's see.

@milaabl I just tried to , there had a new error: Action failed with "document is not defined"

I don't konw is there no definition the document

also, I will provide the action line too, please click there

milaabl commented 1 year ago

@SkyDynamic , figured it out. Turns out one more file should have included the update. I'll add a new commit with a fix and let's see.

@milaabl I just tried to , there had a new error: Action failed with "document is not defined"

I don't konw is there no definition the document

also, I will provide the action line too, please client there

Yes, I see that error, currently working on it

milaabl commented 1 year ago

@SkyDynamic , seems to be working with my latest fixes. I have checked on my profile: https://github.com/milaabl/milaabl-readme/actions/runs/5561652253/jobs/10159466961

Please check it out too

SkyDynamic commented 1 year ago

@SkyDynamic , seems to be working with my latest fixes. I have checked on my profile: https://github.com/milaabl/milaabl-readme/actions/runs/5561652253/jobs/10159466961

Please check it out too

Yes, it complete! Good

But still have some problem Look at that image

milaabl commented 1 year ago

@SkyDynamic , seems to be working with my latest fixes. I have checked on my profile: https://github.com/milaabl/milaabl-readme/actions/runs/5561652253/jobs/10159466961 Please check it out too

Yes, it complete! Good

But still have some problem Look at that image

Just noticed it on my profile too. Hmm, probably some attributes were retrieved incorrectly. Will have a look

SkyDynamic commented 1 year ago

@SkyDynamic , seems to be working with my latest fixes. I have checked on my profile: https://github.com/milaabl/milaabl-readme/actions/runs/5561652253/jobs/10159466961 Please check it out too

Yes, it complete! Good But still have some problem Look at that image

Just noticed it on my profile too. Hmm, probably some attributes were retrieved incorrectly. Will have a look

Still hava problem the svg is vertical

milaabl commented 1 year ago

@SkyDynamic Thanks, I see. The problem is the y axis variable. The previous (currently broken) version built by @Platane uses the "y" attribute, but as there's no svg rect based chart data provided by GitHub anymore. Will try to figure it out, if anyone has any ideas -- your help is really welcome

pdqdat commented 1 year ago

Did you figure out the solution?

milaabl commented 1 year ago

@pdqdat , not yet. I'm not sure how we can retrieve the y axis the new way, but will try to have a look at it tomorrow

aelassas commented 1 year ago

@milaabl Issue fixed. Check out my pull request: https://github.com/Platane/snk/pull/77

Platane commented 1 year ago

thanks for taking the time to edit a patch.

I rather go with the github API solution, which is more stable. I also published a version with a patched parser, I did not took yours because I didn't want to bundle jsdom in the action.