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

Send on Enter not working on Ubuntu 22.04 LTS Flatpak #944

Open
tGitzHub opened this issue Mar 14, 2024 · 11 comments
Open

Send on Enter not working on Ubuntu 22.04 LTS Flatpak #944

tGitzHub opened this issue Mar 14, 2024 · 11 comments
Labels
bug Something isn't working Help needed The developers need help from someone else to fix this. They can not proceed alone.

Comments

@tGitzHub
Copy link

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 tGitzHub added the bug Something isn't working label Mar 14, 2024
@fadelkon
Copy link
Contributor

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

@krille-chan
Copy link
Owner

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

@krille-chan krille-chan added the Help needed The developers need help from someone else to fix this. They can not proceed alone. label Mar 22, 2024
@fadelkon
Copy link
Contributor

fadelkon commented Mar 22, 2024 via email

@kanru
Copy link

kanru commented Mar 24, 2024

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.

@throwException
Copy link

throwException commented Mar 28, 2024

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

@kanru
Copy link

kanru commented Apr 7, 2024

The dependency used for shortcuts is buggy

fluffychat/pubspec.yaml

Lines 161 to 165 in f6c6898

# Upstream pull request: https://github.com/AntoineMarcel/keyboard_shortcuts/pull/13
keyboard_shortcuts:
git:
url: https://github.com/TheOneWithTheBraid/keyboard_shortcuts.git
ref: null-safety

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

@tGitzHub tGitzHub reopened this Apr 17, 2024
@captn3m0
Copy link

captn3m0 commented May 1, 2024

AntoineMarcel/keyboard_shortcuts@6c542bd avoids using debugName, but it was reverted before the merge (?) AntoineMarcel/keyboard_shortcuts#7

@spongythecake
Copy link

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

@EvilOlaf
Copy link

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

@kolorafa
Copy link

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)

@manuke42
Copy link

it seems the Schortcuts widget is not working correctly here.
when i replace this line:

LogicalKeySet(LogicalKeyboardKey.enter): SubmitLineIntent(),

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Help needed The developers need help from someone else to fix this. They can not proceed alone.
Projects
None yet
Development

No branches or pull requests

10 participants