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

Maxcdn has shut down, cdn not working anymore. #580

Closed
simplexx opened this issue Jan 9, 2023 · 78 comments
Closed

Maxcdn has shut down, cdn not working anymore. #580

simplexx opened this issue Jan 9, 2023 · 78 comments
Labels

Comments

@simplexx
Copy link

simplexx commented Jan 9, 2023

Is there an alternative cdn? Max cdn has shut down and https://twemoji.maxcdn.com/v/latest/twemoji.min.js is down as well.


@WebReflection amend

User-land Solution

#580 (comment)

twemoji.parse(
  document.body,
  { base: 'https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/' }
)

What is going on?

MaxCDN doesn't exist anymore and we had it hard coded as default option but that was never meant to be the only CDN able to serve twemoji so that you can simply specify a base field as option to parse with a different CDN or wait for the new package to be deployed on npm (📣 the new package is called @twemoji/api and has been already deployed) and use the new hard coded default. The lesson to learn here is that some CDN might not be there forever, so it's always good to know there are escape hatches within the code, like it is for twemoji.

📣 New Package Details

#580 (comment)

@Xstoudi
Copy link
Contributor

Xstoudi commented Jan 9, 2023

sweating-nervous

@Axsag
Copy link

Axsag commented Jan 9, 2023

this-is-fine-its-fine

@ElMehdiBouamama
Copy link

ElMehdiBouamama commented Jan 9, 2023

@Xstoudi
Copy link
Contributor

Xstoudi commented Jan 9, 2023

There is alternative CDNs, for example: https://unpkg.com/browse/twemoji@14.0.2/
The problem right now is that it doesn't ship the icons and MaxCDN is basically hardcoded:
loFIfOJU06

@ElMehdiBouamama
Copy link

ElMehdiBouamama commented Jan 9, 2023

Here is an alternative CDN for twemojis: https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/72x72/1f1e6-1f1fd.png

@simplexx
Copy link
Author

simplexx commented Jan 9, 2023

there is no js file there though, only images..

Here is an alternative CDN for twemojis: https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/72x72/1f1e6-1f1fd.png

@ElMehdiBouamama
Copy link

there is no js file there though, only images..

Here is an alternative CDN for twemojis: https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/72x72/1f1e6-1f1fd.png

True that

@Eejit43
Copy link

Eejit43 commented Jan 9, 2023

Uhoh the world is ending!!

@Xstoudi
Copy link
Contributor

Xstoudi commented Jan 9, 2023

I'm gonna make a PR. The images doesn't need to be on the same CDN. If https://unpkg.com/browse/twemoji@14.0.2/ uses cloudflare url.

@ElMehdiBouamama
Copy link

As a quick fix i took twemoji-parser and manually changed the index.js code where it directs to max.cdn to the new cdn.
This is a very fast fix if your code is in production

@JosephShepin
Copy link

ezgif-3-261ea64e9f

@simplexx
Copy link
Author

simplexx commented Jan 9, 2023

elon-musk-smoke

@WebReflection
Copy link
Contributor

As a quick fix i took twemoji-parser and manually changed the index.js code where it directs to max.cdn to the new cdn.
This is a very fast fix if your code is in production

I can assure you my code hasn't changed in 7 years so if you keep license around, as you should, and just update the static parts to point at a different path, everything should work as expected.

the related PR already addressed this, so fork away and live happily ever after.

@WebReflection
Copy link
Contributor

WebReflection commented Jan 9, 2023

@simplexx among all the things, twemoji has always been a Twitter service for the community.

At my times in there, we had a great agreement / deal with MaxCDN so that it's hard to blame the boss this time, as MaxCDN is a completely different company/story.

What I see is some poor attention to this project, as companies don't close from a day to another (usually?) but as we all know what's going on @ twitter, I can't really blame any of my former colleagues, or new arrivals there.

Please let's not make it a wall of shame for all the people that worked on this, thanks for your understanding (I've left 7 years ago or more, as example, I've got pinged by some follower and I'm just trying to help you out anyway).

@jdecked
Copy link
Contributor

jdecked commented Jan 9, 2023

For what it's worth, while I was still there we were in talks with MaxCDN to have the same deal when they migrated to be Stackpath. Everyone who had worked on the deal with MaxCDN had left and left no record of that deal, so it was taking them a bit longer to work out than expected – MaxCDN used to offer free hosting to OSS projects, but Stackpath wouldn't be doing that. They were working on an exception for us, but any emails they send to our Twitter emails now get bounced, so I guess they could've gotten this sorted out before shutting down MaxCDN... but it's not like we're there on the other end to make it happen, so it appears we'll never know.

@WebReflection
Copy link
Contributor

WebReflection commented Jan 9, 2023

@jdecked apologies for saying "poor attention" then, it looks like Twitter has no fault beside circumstances that made that attention poor (can I say "poor handover" then?). Anyway, I'd be happy to help out keeping this project alive, except its RegExp came from another repository which I've no idea if it's still working/going or not + it needs assets attention which I am not sure it's sill the case.

There's no shame in making this deprecated or dead neither though, I know there are alternatives and yet, it'd be a sad story to tell (imho).

@jdecked
Copy link
Contributor

jdecked commented Jan 9, 2023

Yeah, we didn't exactly get a chance to hand anything over before getting laid off. Usually a company with the ability to plan business operations would allot time for that, but we all got spontaneously locked out of our computers in the middle of the night, so. Poor handover would imply having tried to hand over. 🥲

The regex comes from https://github.com/twitter/twemoji-parser, where I open sourced the Scala generator for the regex last year so we aren't missing anything there. It also has the same problem of the default options being broken due to MaxCDN, but specifying another path is possible as an option. Assets are kept only in twemoji not twemoji-parser. For longer term maintenance beyond just this one issue, we'd eventually need to fork twemoji-parser too for regex updates – I have NPM publish access to it, but there actually seems to be nobody left with GitHub write access who previously committed to it.

I'd be pretty sad to deprecate Twemoji honestly, especially when the designer is willing to work on a fork of it with me. I was hoping to get wherever I worked next to adopt Twemoji though, so the details are a little up in the air. Maybe we just fork now for compatibility but without substantial support, although I know that would annoy some people.

@burgoyn1
Copy link

burgoyn1 commented Jan 9, 2023

@WebReflection @jdecked I had posted in the PR but will add it here. My business partner and I discussed and our company would be potentially interested in keeping it going either on a fork or a completely new repository. We using it a ton at our company and replacing it would actually be more of a pain than maintaining/improving it.

@Xstoudi
Copy link
Contributor

Xstoudi commented Jan 9, 2023

Yosh,
First things first: sorry for the annoyance and ten thousands thanks to ex-employees for the fast reaction.
For me Twemoji is part of the internet furniture and I definitely would like to see it continuing it's existence.

I hope #581 can end up merged and deployed to put ducktape on the leak, but I don't consider this as a long-term solution and it will be a pleasure to help if a fork emerges.

@jdecked I definitely think it's better to fork even without substantial support to ensure compatibility and let the door of "yeah today I have some time let review a PR or fix an issue" open.
Having people that already worked on it and even the designer would give a realy chance to the fork to live and having people that want to see it live like @burgoyn1 or me could discharge the "owners" of some of the annoying work.

@rlocatelli9
Copy link

rlocatelli9 commented Jan 9, 2023

#580 (comment)
Here is an alternative CDN for twemojis: https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/72x72/1f1e6-1f1fd.png

it's worked for me

@karptonite
Copy link

karptonite commented Jan 9, 2023

If you don't want to use a fork, this was my hot fix in the one place we used twemoji:

result = twemoji.parse(segment.text, {
  folder: 'svg',
  ext: '.svg',
});
// temporary fix because maxcdn has stopped supporting twemoji
return result.replace(
  'twemoji.maxcdn.com/v',
  'cdnjs.cloudflare.com/ajax/libs/twemoji',
);

@jimaek
Copy link

jimaek commented Jan 9, 2023

Consider switching to jsDelivr https://www.jsdelivr.com/package/npm/twemoji

How to use #580 (comment)

We also host Bootstrap CDN.

@burgoyn1
Copy link

burgoyn1 commented Jan 9, 2023

Consider switching to jsDelivr https://www.jsdelivr.com/package/npm/twemoji We also host Bootstrap CDN.

The problem is the images/svg still point to maxcdn.com. Those images are not on jsdeliver.

@jimaek
Copy link

jimaek commented Jan 9, 2023

If someone who controls the domain is reading then please get in contact cause we can provide a custom CDN to get all sites back online

@sajus
Copy link

sajus commented Jan 9, 2023

@jimaek after pointing to https://cdnjs.cloudflare.com/ajax/libs/emojione/2.2.7/assets/svg/1f44d.svg emojis are loading fine, do you have any other custom CDN path?

@yhatt
Copy link

yhatt commented Jan 9, 2023

FYI how to use jsDelivr to serve twemoji images:

twemoji.parse(
  document.body,
  { base: 'https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/' }
)

brendaninnis added a commit to brendaninnis/satle that referenced this issue Apr 2, 2024
@byeoon
Copy link

byeoon commented Apr 2, 2024

Twemoji seems to be broken yet again.

@elyesgherib
Copy link

Yes, I ended up self-hosting it.

@jimaek
Copy link

jimaek commented Apr 2, 2024

Please consider moving to jsDelivr directly https://www.jsdelivr.com/package/npm/twemoji It's a multi-CDN with focus on production use.

https://cdn.rawgit.com has temporarily issues due to a BunnyCDN outage

@simplexx
Copy link
Author

simplexx commented Apr 4, 2024

The problem is that the assets are down (the actual emoji images), which causes issues with rendering and blocks the site loading. I suggest using this: https://github.com/jdecked/twemoji - I tested it and it works perfectly well. Also, @jdecked, who worked on the original script, is actively developing it! In my opinion this project here should be put to rest and the first sentence of the description should link to https://github.com/jdecked/twemoji. This would be the best solution for everybody.

This was referenced Apr 11, 2024
adereksisusanto added a commit to adereksisusanto/laravel-translations that referenced this issue Apr 19, 2024
@WilliamR1987
Copy link

In the meantime, this is happening: From Bitdefender:
chrome.exe attempted to establish a connection relying on an unmatching security certificate to twemoji.maxcdn.com. We blocked the connection to keep your data safe since the used certificate was issued for a different web address than the targeted one.

@jimaek
Copy link

jimaek commented Apr 19, 2024

Stackpath broke the CDN by changing their DNS and pointing it to a different IP. In the past they worked with us to ensure nothing breaks, but this time they simply made the switch without warning. Since the *.maxcdn.com domain is controlled by them there is nothing we can do to fix it unfortunately. I recommend to simply switch to jsDelivr, which is a CDN focused on production use cases

MohmmedAshraf pushed a commit to MohmmedAshraf/laravel-translations that referenced this issue Apr 19, 2024
* 🐞 fix: route domain, path and middleware
* 🐞 fix:  Flag Icons (twitter/twemoji#580)
@SukkaW
Copy link

SukkaW commented Apr 23, 2024

@jimaek jsDelivr could host a twemoji.jsdelivr.net or cdn.jsdelivr.net/twemoji/ since currently there is no alternative on cdn.jsdelivr.net:

https://cdn.jsdelivr.net/npm/twemoji@14.0.2/dist/twemoji.js

image

The assets still point to twemoji.maxcdn.com and are not on cdn.jsdelivr.net.

@WebReflection
Copy link
Contributor

WebReflection commented Apr 23, 2024

as first creator and maintainer of this project, where literally nothing changed since 2014 around my written code, I would be happy to help migrating the CDN from max to jsdelivr if that's all it takes to have this project still up and running.

edit arguaby I could just fork it too, but beside my code which was written while hired at Twitter at that time, there's a lot of assets from designers I don't want to upset, as the JS code was the surface, the real work was on those people creating all the amazing assets behind. That's why I haven't ever considered a fork, it'd be easily close to copyright violation, something I have no time, money, or brain to deal with.

edit 2 to whom it might concern though, those properties are all defaults, all you need to do is to pass a different base that points to another end point with all assets in place. If other CDNs already have those assets, there's no need to panic or fork this project, just use its primitives (unless, of course, I wrote a bug around those).

tagatac added a commit to tagatac/bagoup that referenced this issue Jul 10, 2024
Earu pushed a commit to Earu/EasyChat that referenced this issue Sep 5, 2024
* Replace MaxCDN urls with CDNJS

twitter/twemoji#580 states the usual cdn (MaxCDN) is no longer working, this replaces it to use cdnjs instead on the latest version (14.0.2).

* use jdecked/twemoji version instead of official twemoji

* Switch to jdecked.github.io URL instead of jsdelivr

Co-authored-by: Cynthia Foxwell <gamers@riseup.net>

---------

Co-authored-by: Cynthia Foxwell <gamers@riseup.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests