fluffychat icon indicating copy to clipboard operation
fluffychat copied to clipboard

Send on Enter not working on Ubuntu 22.04 LTS Flatpak

Open tGitzHub opened this issue 11 months ago • 14 comments

Bug Description

For a view versions now, send on enter does not work for me. Trying to turn it off and on doesnt change that. enter button just makes hard line break instead

Steps to Reproduce

Write text in a chat press enter move mouse over and actually click on send button

Expected Behavior

sending on enter

App Version

1.18.0

Additional Platform Information

PC (Ubuntu 22.10 LTS, Flatpak)

Additional Context

this is my first github issue, i hope that's how it's done...

tGitzHub avatar Mar 14 '24 16:03 tGitzHub

Same for me!

I'm on Debian 12 with this version of fluffychat

> flatpak info im.fluffychat.Fluffychat

fluffychat.im - Chat with your friends

          ID: im.fluffychat.Fluffychat
         Ref: app/im.fluffychat.Fluffychat/x86_64/stable
        Arch: x86_64
      Branch: stable
     Version: 1.18.0
     License: AGPL-3.0-only
      Origin: flathub
  Collection: org.flathub.Stable
Installation: system
   Installed: 90,9 MB
     Runtime: org.freedesktop.Platform/x86_64/23.08
         Sdk: org.freedesktop.Sdk/x86_64/23.08

      Commit: c256e9624c7a01f07ebad1ea30c0cf12cb5f0c154e62e9d0c179884789547290
      Parent: 5eaeed028f1e9e10ff4693a47a7636df6204ed7aeb0f431f616040725b049e51
     Subject: ci: Automerge flathub bot prs (4becf2cf)
        Date: 2024-02-25 14:26:15 +0000

and this version of flatpak, just in case:

> flatpak --version
Flatpak 1.14.4

fadelkon avatar Mar 20 '24 21:03 fadelkon

I cannot reproduce this on Ubuntu 23.10 with FluffyChat installed as snap :-/

krille-chan avatar Mar 22 '24 16:03 krille-chan

Can you check with flatpak?

El 22 de març de 2024 17:52:56 CET, Krille-chan @.***> ha escrit:

I cannot reproduce this on Ubuntu 23.10 with FluffyChat installed as snap :-/

-- Reply to this email directly or view it on GitHub: https://github.com/krille-chan/fluffychat/issues/944#issuecomment-2015504470 You are receiving this because you commented.

Message ID: @.***>

fadelkon avatar Mar 22 '24 17:03 fadelkon

I can also reproduce, both with Wayland and X11.

Operating System: Fedora Linux 40.20240324.n.0 (Silverblue Prerelease)

Screencast from 2024-03-25 08-00-39.webm

fluffychat.im - Chat with your friends

          ID: im.fluffychat.Fluffychat
         Ref: app/im.fluffychat.Fluffychat/x86_64/stable
        Arch: x86_64
      Branch: stable
     Version: 1.18.0
     License: AGPL-3.0-only
      Origin: fedora-flathub
  Collection: org.flathub.Stable
Installation: system
   Installed: 90.9 MB
     Runtime: org.freedesktop.Platform/x86_64/23.08
         Sdk: org.freedesktop.Sdk/x86_64/23.08

      Commit: c256e9624c7a01f07ebad1ea30c0cf12cb5f0c154e62e9d0c179884789547290
      Parent: 5eaeed028f1e9e10ff4693a47a7636df6204ed7aeb0f431f616040725b049e51
     Subject: ci: Automerge flathub bot prs (4becf2cf)
        Date: 2024-02-25 14:26:15 +0000

[Context]
shared=network;ipc;
sockets=x11;wayland;pulseaudio;fallback-x11;
devices=all;
filesystems=xdg-download;

[Session Bus Policy]
chat.fluffy.fluffychat=own
org.freedesktop.Notifications=talk

I notice that for each keypress there are severl lines of logs in console (not in the builtin log viewer)

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value
#0      _isPressed.<anonymous closure> (package:keyboard_shortcuts/keyboard_shortcuts.dart:51)
#1      WhereIterator.moveNext (dart:_internal/iterable.dart:451)
#2      _isPressed (package:keyboard_shortcuts/keyboard_shortcuts.dart:55)
#3      _KeyBoardShortcuts.listener (package:keyboard_shortcuts/keyboard_shortcuts.dart:135)
#4      RawKeyboard.handleRawKeyEvent (package:flutter/src/services/raw_keyboard.dart:875)
#5      KeyEventManager.handleRawKeyMessage (package:flutter/src/services/hardware_keyboard.dart:1164)
#6      BasicMessageChannel.setMessageHandler.<anonymous closure> (package:flutter/src/services/platform_channel.dart:235)
#7      _DefaultBinaryMessenger.setMessageHandler.<anonymous closure> (package:flutter/src/services/binding.dart:603)
#8      _invoke2 (dart:ui/hooks.dart:344)
#9      _ChannelCallbackRecord.invoke (dart:ui/channel_buffers.dart:45)
#10     _Channel.push (dart:ui/channel_buffers.dart:135)
#11     ChannelBuffers.push (dart:ui/channel_buffers.dart:343)
#12     PlatformDispatcher._dispatchPlatformMessage (dart:ui/platform_dispatcher.dart:737)
#13     _dispatchPlatformMessage (dart:ui/hooks.dart:257)

BTW, FluffyChat is fantastic.

kanru avatar Mar 24 '24 23:03 kanru

I also see this issue on debian 12 with flatpak

fluffychat.im - Chat with your friends

          ID: im.fluffychat.Fluffychat
         Ref: app/im.fluffychat.Fluffychat/x86_64/stable
        Arch: x86_64
      Branch: stable
     Version: 1.18.0
     License: AGPL-3.0-only
      Origin: flathub
  Collection: org.flathub.Stable
Installation: system
   Installed: 90.9 MB
     Runtime: org.freedesktop.Platform/x86_64/23.08
         Sdk: org.freedesktop.Sdk/x86_64/23.08

      Commit: c256e9624c7a01f07ebad1ea30c0cf12cb5f0c154e62e9d0c179884789547290
      Parent: 5eaeed028f1e9e10ff4693a47a7636df6204ed7aeb0f431f616040725b049e51
     Subject: ci: Automerge flathub bot prs (4becf2cf)
        Date: 2024-02-25 14:26:15 +0000

throwException avatar Mar 28 '24 22:03 throwException

The dependency used for shortcuts is buggy

https://github.com/krille-chan/fluffychat/blob/f6c6898fb6f89f912ef57e6515c348a6c012c1c8/pubspec.yaml#L161-L165

It references LogicalKeyboardKey.debugName -> String?

https://github.com/TheOneWithTheBraid/keyboard_shortcuts/blob/a3d4020911860ff091d90638ab708604b71d2c5a/lib/keyboard_shortcuts.dart#L50-L52

The document says

The debug string to print for this keyboard key, which will be null in release mode.

https://api.flutter.dev/flutter/services/LogicalKeyboardKey-class.html

kanru avatar Apr 07 '24 12:04 kanru

https://github.com/AntoineMarcel/keyboard_shortcuts/pull/7/commits/6c542bd15cff2b22a9d0816fc693083cdae7e12e avoids using debugName, but it was reverted before the merge (?) https://github.com/AntoineMarcel/keyboard_shortcuts/pull/7

captn3m0 avatar May 01 '24 12:05 captn3m0

Compiled directly from source, v1.20.0, this exact same issue happens on my build.

spongythecake avatar May 05 '24 18:05 spongythecake

Confirmed with flathub version 1.19.2 on Linux Mint (based on Ubuntu Jammy).

EvilOlaf avatar May 22 '24 06:05 EvilOlaf

Same with flathub version 1.20.0 using Linux Arch

After opening app the console was floodded with the same message @kanru got:

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value
#0      _isPressed.<anonymous closure> (package:keyboard_shortcuts/keyboard_shortcuts.dart:51)
#1      WhereIterator.moveNext (dart:_internal/iterable.dart:451)
#2      _isPressed (package:keyboard_shortcuts/keyboard_shortcuts.dart:55)
#3      _KeyBoardShortcuts.listener (package:keyboard_shortcuts/keyboard_shortcuts.dart:135)
#4      RawKeyboard.handleRawKeyEvent (package:flutter/src/services/raw_keyboard.dart:875)
#5      KeyEventManager.handleRawKeyMessage (package:flutter/src/services/hardware_keyboard.dart:1164)
#6      BasicMessageChannel.setMessageHandler.<anonymous closure> (package:flutter/src/services/platform_channel.dart:235)
#7      _DefaultBinaryMessenger.setMessageHandler.<anonymous closure> (package:flutter/src/services/binding.dart:603)
#8      _invoke2 (dart:ui/hooks.dart:344)
#9      _ChannelCallbackRecord.invoke (dart:ui/channel_buffers.dart:45)
#10     _Channel.push (dart:ui/channel_buffers.dart:135)
#11     ChannelBuffers.push (dart:ui/channel_buffers.dart:343)
#12     PlatformDispatcher._dispatchPlatformMessage (dart:ui/platform_dispatcher.dart:737)
#13     _dispatchPlatformMessage (dart:ui/hooks.dart:257)

kolorafa avatar May 26 '24 09:05 kolorafa

it seems the Schortcuts widget is not working correctly here. when i replace this line: https://github.com/krille-chan/fluffychat/blob/cc828411243d9c1293027e008a0f90c68c4c905b/lib/pages/chat/input_bar.dart#L404

with: SingleActivator(LogicalKeyboardKey.enter): SubmitLineIntent(), then it works correctly for me on linux. But I can't say what else is breaking by that change (if at all). The error message in the keyboard_shortcuts package seems unrelated to this problem, that package seems to be only used for the emoji and file picker.

manuke42 avatar Jun 11 '24 21:06 manuke42

issue seems to be gone with 1.21.2 on my computer (y)

tGitzHub avatar Aug 12 '24 11:08 tGitzHub

nope. no idea what ive done - i think i pasted something with ctrl-v - now it is back to not working :(

tGitzHub avatar Aug 12 '24 12:08 tGitzHub

Still not working for Flatpak

Versions: flatpak : im.fluffychat.Fluffychat 1.22.1 stable uname -r : 6.10.11-1-MANJARO

NastyaGrifon avatar Sep 26 '24 16:09 NastyaGrifon

I seem to have this issue on Ubuntu 24.04 as well.

image

I cannot "send on enter" no matter what the setting in the "Settings-->Chat" is set to.

tallthom avatar Oct 05 '24 02:10 tallthom

I do have the same on Ubuntu 22.04 (Linux Mint, FlatPak), and on macOS too (AppStore version marked as for iPad).

Wohlstand avatar Oct 22 '24 17:10 Wohlstand