OrangeDrangon / android-messages-desktop

Android Messages as a Cross-platform Desktop App
Other
304 stars 26 forks source link

Emoji not visible in chats, but are visible on chat list column on left #425

Closed kevev closed 8 months ago

kevev commented 10 months ago

5.4.1 seems to have caused this. Seems to be a Google change as stated below.

prisoner881 commented 10 months ago

Also seeing this same behavior.

ikeeki320 commented 10 months ago

I went to Messages for Web in Chrome and saw that some of the emojis, like thumbs up and rolling laughing, are now animated. It appears that this new feature may be the culprit as to why they aren't showing up in the message window, but still show up in the left side message list.

innesst commented 10 months ago

The behavior I am seeing: When the message (either outgoing or incoming) contains only emoji (one or more) and no text, nothing appears in the app. There is a blank space where the emoji should appear - the space can be clicked to select the "item" - the size of the selected area is proportionate to the number of emojis (more emojis = wider). The shading of the selected area varies from exactly the same as the background color, to darker or lighter. However, on the web version in chrome, the emojis appear, are large and are animated (though I they are just normal size and not animated on my phone). Same behavior with light or dark theme.

This only happens if the emojis are animated. Tears of joy, heart and peanut are not animated in chrome, and appear in the app fine. But eyeroll, poop and zanyface are animated and don't appear. Note that there are animated versions of the tears of joy and heart, but they don't appear animated on the web version. https://emojipedia.org/animated-noto-color-emoji

If the message contains text, then the emojis display properly in the app.

I am using SMS only, not RCS. Same behavior if the other person is apple or android.

OrangeDrangon commented 10 months ago

I will give this a look this weekend hopefully.

Thanks Kyle

On Thu Sep 7, 2023, 03:15 PM GMT, innesst @.***> wrote:

The behavior I am seeing: When the message (either outgoing or incoming) contains only emoji (one or more) and no text, nothing appears in the app. There is a blank space where the emoji should appear - the space can be clicked to select the "item" - the size of the selected area is proportionate to the number of emojis (more emojis = wider). The shading of the selected area varies from exactly the same as the background color, to darker or lighter. However, on the web version in chrome, the emojis are appear, are large and are animated (though I they are just normal size and not animated on my phone). Same behavior with light or dark theme. This only happens if the emojis are animated. Tears of joy, heart and peanut are not animated in chrome, and appear in the app fine. But eyeroll, poop and zanyface are animated and don't appear. Note that there are animated versions of the tears of joy and heart, but they don't appear animated on the web version. https://emojipedia.org/animated-noto-color-emoji https://emojipedia.org/animated-noto-color-emoji If the message contains text, then the emojis display properly in the app. I am using SMS only, not RCS. Same behavior if the other person is apple or android. — Reply to this email directly, view it on GitHub https://github.com/OrangeDrangon/android-messages-desktop/issues/425#issuecomment-1710336577, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGB2A7JTQWNUIGSVVHWFHITXZHQKDANCNFSM6AAAAAA4LDOCEA. You are receiving this because you are subscribed to this thread.Message ID: @.***>

innesst commented 10 months ago

Single animated emojis that are blank in the app appear properly as static images in the Windows notification pop up.

OrangeDrangon commented 10 months ago

Alright I was able to reproduce this.

kevev commented 10 months ago

Alright I was able to reproduce this.

Any progress? :)

gregeeh commented 9 months ago

I too have this issue. Any progress?

tbarnettsgf commented 9 months ago

Is this something that is going to be fixed? thx

agottschling commented 9 months ago

Still seeing this. My account recently got the animated emojis

mhoffmeyerDC commented 9 months ago

It looks like the root cause is how the Lottie Library, which is loaded dynamically on chats with emoji, is registering itself.

Since nodeIntegration is true, module.exports is provided as a global but when lottie loads itself its registering with the node process instead of the renderer.

As a quick hack I set window,module.exports = null in bridge.ts and viola, that forces the lottie library to register to the window object instead and all the animations showed up. Manualy pasting in the contents of https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.12.2/lottie.min.js into the console without any modifications to the source code also caused the emoji to show properly.

Not sure what the best way to fix it long term would be but that's at least the root cause of the problem.

OrangeDrangon commented 9 months ago

Thanks for this investigation. I will stew on something.

Thanks Kyle

On Sun Oct 15, 2023, 11:28 PM GMT, Mark Hoffmeyer @.***> wrote:

It looks like the root cause is how the Lottie Library, which is loaded dynamically on chats with emoji, is registering itself. Since nodeIntegration is true, module.exports is provided as a global but when lottie loads itself its registering with the node process instead of the renderer. As a quick hack I set window,module.exports = null in bridge.ts and viola, that forces the lottie library to register to the window object instead and all the animations showed up. Manualy pasting in the contents of https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.12.2/lottie.min.js https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.12.2/lottie.min.js into the console without any modifications to the source code also caused the emoji to show properly. Not sure what the best way to fix it long term would be but that's at least the root cause of the problem. — Reply to this email directly, view it on GitHub https://github.com/OrangeDrangon/android-messages-desktop/issues/425#issuecomment-1763535759, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGB2A7LHLLFN6SMUS3JTEVDX7RWRZAVCNFSM6AAAAAA4LDOCECVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRTGUZTKNZVHE. You are receiving this because you commented.Message ID: @.***>

dmyurych commented 8 months ago

Just wanted to add that this is not a Windows only issue and also appears for me on MacOS. Let me know if I can help in any way be providing more info.

LarveyOfficial commented 8 months ago

@mhoffmeyerDC for your fix, did you just add window.module.exports = null next to window.Notification.permission = "granted"; in bridge.ts?

mhoffmeyerDC commented 8 months ago

Yup, just added it at the end of bridge.ts. I'm looking at my changes and I had also set webSecurity: false, within webPreferences on background.ts not sure if that has any effect or not.

LarveyOfficial commented 8 months ago

@mhoffmeyerDC Thanks a bunch, I will look into this for my fork.

kevev commented 8 months ago

Can someone let us know when a build is released by anyone?

LarveyOfficial commented 8 months ago

@kevev my branch has this implementation https://github.com/LarveyOfficial/google-messages-desktop

OrangeDrangon commented 8 months ago

PR?

kevev commented 8 months ago

Still hoping for a build. :)

OrangeDrangon commented 8 months ago

It is building rn

OrangeDrangon commented 8 months ago

Published