Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sometimes not showing cards #45

Open
edap opened this issue May 16, 2017 · 27 comments
Open

sometimes not showing cards #45

edap opened this issue May 16, 2017 · 27 comments

Comments

@edap
Copy link

edap commented May 16, 2017

Hey, I'm using your widget but since some days I've this error:
screen shot 2017-05-16 at 08 53 44

The page where I'm loading your widget is:
http://davideprati.com/tools

When showing just one card there is no problem, when showing 6 I've this behaviour. This error happens randomly, it is not alway reproducible

@lepture
Copy link
Owner

lepture commented May 16, 2017

I've refreshed the page > 20 times. Nothing happened.

@edap
Copy link
Author

edap commented May 16, 2017

well, it was working when I've installed it. Is it possible that there is a maximal number of cards that you can show in a page?

@lepture
Copy link
Owner

lepture commented May 16, 2017

No.

@edap
Copy link
Author

edap commented May 16, 2017

Sorry, but I do not get your approach. Do you think it is a bug or an error in how I've installed your library?

@edap
Copy link
Author

edap commented May 16, 2017

I think that the problem is that your script is making a request for a single repository and then format it. But it probably should make the requests for all the repository, and then, when all of them have a response, render them. Something like "Promise.all" should do the job. Otherwise, you could get all the repository for a single user and then filter them

@edap
Copy link
Author

edap commented May 18, 2017

I can confirm that it works with 4 cards but it is broken with 6

@darrenbritton
Copy link

possibly somewhat related but this seems to have been completely broken for all cards. it looks like the cdn provided, jsdelivr, is sending back the wrong content type:
capture

@yury-dymov
Copy link
Contributor

@edap download the script and put it locally. Worked fine for me. CDN version seems to be broken

@edap
Copy link
Author

edap commented May 23, 2017

@yury-dymov it is still not working, also when the script is in local http://davideprati.com/tools.
It was working yesterday.

@yury-dymov
Copy link
Contributor

works fine for me: https://dymov.me/
btw, I opened your site and it also worked fine for me.

@darrenbritton
Copy link

@yury-dymov it really shouldn't, are you sure you're not operating from local cache?
screen shot 2017-05-23 at 17 25 41

@edap
Copy link
Author

edap commented May 23, 2017

It is still not working, and in your website is also not working

screen shot 2017-05-23 at 18 25 48

@yury-dymov
Copy link
Contributor

yury-dymov commented May 23, 2017

oh, shi... Probably I am done using this package

update: editing local widget.js should be easy: var t="http://lab.lepture.com/github-cards/ -> var t="https://lab.lepture.com/github-cards/ but I don't like idea to use 3d party service like that

@darrenbritton
Copy link

i managed to get it working (hopefully as a temporary solution) by just including the iframe directly, inspect the bottom of this page to see https://darrenbritton.com/

yury-dymov added a commit to yury-dymov/github-cards that referenced this issue May 23, 2017
lepture added a commit that referenced this issue May 24, 2017
@augnustin
Copy link

Got the same problem, apparently it is uBlock that is preventing execution, as per this issue: gorhill/uBlock#2029

Maybe the architecture should be rethought?

@lepture
Copy link
Owner

lepture commented Jun 12, 2017

New version released.

@lepture lepture closed this as completed Jun 12, 2017
@atd
Copy link

atd commented Jun 27, 2017

Still failing at https://atd.singularities.org with 8 cards

https://cdn.jsdelivr.net/github-cards/latest/widget.js seems to deliver previous version:

(function(e){var t="//cdn.jsdelivr.net/github-cards/1.0.2/" .....

@edap
Copy link
Author

edap commented Jun 27, 2017

@atd if your website is hosted on github, you have access to all your repository without making an API call to github. I've used the css style provided by this repository but I've created a template (in liquid template language) to fetch the repos. https://github.com/edap/edap.github.com/blob/master/_includes/card.html
I do not know if this is your case

@atd
Copy link

atd commented Jun 27, 2017

No, my website is self-hosted. Are there any API call restrictions involved?

@edap
Copy link
Author

edap commented Jun 27, 2017

Some users where reporting it was with the CDN, I did not investigate

@bretonics
Copy link

@edap and @atd, I think it has to do with the CDN in jsDelivr. I opened up and issue #48 and while investigating found that it's probably the CDN.

@edap, I saw your site, how/why are your cards rendering? Did you use that template mentioned above?

@edap
Copy link
Author

edap commented Jul 17, 2017

I'm using jekyll hosted on github, there is a global variable with all the repositories. If you are interested, have a look at https://github.com/edap/edap.github.com/blob/master/tools.html

@lepture lepture reopened this Jul 18, 2017
@lepture
Copy link
Owner

lepture commented Jul 18, 2017

It's due to jsdelivr CDN changes.

@laike9m
Copy link

laike9m commented Jul 30, 2017

I'm looking for solution too.
jsdelivr/jsdelivr#18027
This issue can be reproduced by using an old version of github-card. Example

@MartinKolarik
Copy link

jsDelivr no longer supports serving files with Content-Type: text/html for security reasons, but this change probably shouldn't have been applied to existing files. We've just pushed a fix to remove this restriction for existing files. If you keep getting a cached copy with Content-Type: text/plain, you can ping our bot here to purge the CDN cache. Sorry for the caused problems.

@MartinKolarik
Copy link

@jsdelivrbot
Copy link

I purged this file "/zhihu-card/0.2.3/theme/github.html" from MaxCDN, CloudFlare, Fastly and Quantil.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants