Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Failed to load Emojis when using Twemoji renderer #280

Open
traone opened this issue Jun 12, 2023 · 13 comments
Open

Failed to load Emojis when using Twemoji renderer #280

traone opened this issue Jun 12, 2023 · 13 comments
Labels
bug Something isn't working waiting

Comments

@traone
Copy link

traone commented Jun 12, 2023

There seems to be a problem when loading up Picmo when Twemoji renderer is enabled. The getTwemojiKey function fails and results in "Failed to load emojis". Pressing try again doesn't resolve the issue.

This can be replicated in the Playbook.

@laxell
Copy link

laxell commented Jun 14, 2023

@traone Have you found any workaround for this issue?
@joeattardi What could suddenly be causing this?

@alexchakmakov
Copy link

alexchakmakov commented Jun 16, 2023

@joeattardi Have you found a fix?

visualize1

We are getting in the browser console:

Uncaught (in promise) TypeError: a is undefined [renderer-twemoji.js:2]

What might be causing this error? Our users are really annoyed, please find a fix as soon as possible!

@traone Have you found a way to fix this error?

@vladislavayoncheva
Copy link

Hello!
I have the same problem. Do you get a decision for this error "Uncaught (in promise) TypeError: a is undefined [renderer-twemoji.js:2]"?

@joeattardi
Copy link
Owner

Our users are really annoyed, please find a fix as soon as possible!

I'm sorry that your users are really annoyed and I hope to be able to find the cause of this soon.

However you need to manage your expectations. I'd like to remind you that maintaining PicMo is something I do on the side in my spare time. I have never made a single cent from my work (despite companies like Tinder and Starbucks benefitting from the work).

I have a full time job that takes up a huge chunk of my time, I am also writing a book right now which takes up another huge chunk.

I appreciate you using PicMo but keep in mind that you assume a certain amount of risk when using open source software, including the risk that bugs might not be fixed on a timeline that you would prefer.

I hope to have some time soon to look into this, but for now I'd recommend using the native renderer instead.

@joeattardi joeattardi added the bug Something isn't working label Jun 16, 2023
@joeattardi
Copy link
Owner

It looks like Twemoji is in bad shape right now. A while back Twitter all but abandoned the open source project. There is a fork now, but they have not yet finished adding all of the new emojis for Emoji 15.

I can't draw emoji images so it's effectively blocked for the time being.

However! If you still want to use Twemoji and are ok with using Emoji 14 only, you can specify emojiVersion: 14 in the picker options and this should hopefully resolve the issue for now.

@alexchakmakov
Copy link

@joeattardi I appreciate your prompt reply!

We are OK with using Emoji Version 14 as there seem to be no issues at the moment.

@typhoon11
Copy link

typhoon11 commented Jun 19, 2023

Failed to load emojis is coming for me only on iOS when using and viewing the emoji picker from my laptop that's windows it's working but when viewing the emoji picker from my iPhone on Safari it's giving Failed to load emojis.

Mobile_SS
PC_ss

@joeattardi
Copy link
Owner

What options are you passing to the picker?

Is there a stack trace?

@typhoon11
Copy link

typhoon11 commented Jun 19, 2023

What options are you passing to the picker?

Is there a stack trace?

This is my config for createPop:

autoFocus: 'search',
            initialCategory: 'custom',
            theme: darkTheme,
            className: 'my-picker',
            maxRecents: 10,
            categories: [
                'recents',
                'custom',
                'smileys-emotion',
                'people-body',
                'animals-nature',
                'food-drink',
                'travel-places',
                'activities',
                'objects',
                'symbols',
                'flags',
            ],
            renderer: new TwemojiRenderer(),
            custom: emotes,
            i18n: {
                'categories.activities': 'Activities',
                'categories.animals-nature': 'Animals & Nature',
                'categories.custom': '<%=guild.name%>',
                'categories.flags': 'Flags',
                'categories.food-drink': 'Food & Drink',
                'categories.objects': 'Objects',
                'categories.people-body': 'People & Body',
                'categories.recents': 'Recently Used',
                'categories.smileys-emotion': 'Smileys & Emotion',
                'categories.symbols': 'Symbols',
                'categories.travel-places': 'Travel & Places',
                'error.load': 'Failed to load emojis',
                'recents.clear': 'Clear recent emojis',
                'recents.none': 'You haven\'t selected any emojis yet.',
                'retry': 'Try again',
                'search.clear': 'Clear search',
                'search.error': 'Failed to search emojis',
                'search.notFound': 'No results found',
                'search': 'Search emojis...'
            }
        },{
            referenceElement: trigger,
            triggerElement: trigger,
            position: 'bottom',
            showCloseButton: false
        }

@joeattardi
Copy link
Owner

Please see above #280 (comment)

Twemoji is broken for the latest emoji version, it's out of my control. If you use emoji version 14 it should work again.

@typhoon11
Copy link

Please see above #280 (comment)

Twemoji is broken for the latest emoji version, it's out of my control. If you use emoji version 14 it should work again.

Oh it's due to the above one only? beacuse i thought it's opening on laptop and not mobile then it should be due to something else.
Btw got this in console from mobile browser:
IMG_1278

@joeattardi
Copy link
Owner

My mistake, looks like this is something different, sorry about that.

@joeattardi joeattardi reopened this Jun 19, 2023
@typhoon11
Copy link

My mistake, looks like this is something different, sorry about that.

But when I changes the version of Twemoji the issue got fixed, weird

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working waiting
Projects
None yet
Development

No branches or pull requests

6 participants