dialect-app / dialect

A translation app for GNOME.
https://dialectapp.org/
GNU General Public License v3.0
609 stars 69 forks source link

Deepl API key not working #412

Open wokawoka opened 2 weeks ago

wokawoka commented 2 weeks ago

Hello, I was trying to enter my deepl API key (free but working, I have used it with other tools before) and I am able to enter it, dialect validates the key correctly and closes the pop-up dialog but apparently nothing happens.

My key is validated (and I don't get any invalid key error, as was happening e.g. here https://github.com/dialect-app/dialect/issues/389 ) but it is simply not considered by dialect.

Any suggestion? Thank you!

rafaelmardojai commented 2 weeks ago

So the API key is validated and saved in the preferences right? Then what happens? Do you get an "Invalid API key" error when translating or opening the app?

wokawoka commented 2 weeks ago

Actually the key is not saved in the preferences (but at the same time I do not get any red error as when I enter an invalid key) and when I click on the check button the dialog just closes. Since the key is not saved, the main screen of the program remains on “API key is required to use the service” when I close the options window The key is valid and I am copying it from the deepl dashboard

mufeedali commented 2 weeks ago

What platform are you using and how was the package installed? I'm unable to reproduce this with my API key on the Flatpak

wokawoka commented 2 weeks ago

Ubuntu 24.04 / KDE 5.27.11 installed version 2.5.0 via flatpak I just create a fresh deepl API key and tried again but I am still getting the same issue just let me know if I can provide more info to try to debug in a deeper way thank you very much

mufeedali commented 2 weeks ago

Can you run the app from a terminal using flatpak run app.drey.Dialect, try to save the API key and send us the terminal logs?

wokawoka commented 2 weeks ago

this is the message I am getting after trying to save the API key:

(dialect:2): Gtk-WARNING **: 19:43:16.781: GtkText - did not receive a focus-out event.
If you handle this event, you must return
GDK_EVENT_PROPAGATE so the default handler gets the event as well
WARNING:root:g-dbus-error-quark: org.freedesktop.DBus.Error.ServiceUnknown (2)
mufeedali commented 2 weeks ago

@wokawoka Can share the complete log?

wokawoka commented 2 weeks ago

@wokawoka Can share the complete log?

sure here it is:

$ flatpak run app.drey.Dialect
WARNING:root:g-dbus-error-quark: org.freedesktop.DBus.Error.ServiceUnknown (2)
WARNING:root:g-dbus-error-quark: org.freedesktop.DBus.Error.ServiceUnknown (2)
WARNING:root:g-dbus-error-quark: org.freedesktop.DBus.Error.ServiceUnknown (2)
MESA-INTEL: warning: ../src/intel/vulkan/anv_formats.c:763: FINISHME: support YUV colorspace with DRM format modifiers
MESA-INTEL: warning: ../src/intel/vulkan/anv_formats.c:794: FINISHME: support more multi-planar formats with DRM modifiers
WARNING:root:g-dbus-error-quark: org.freedesktop.DBus.Error.ServiceUnknown (2)
WARNING:root:g-dbus-error-quark: org.freedesktop.DBus.Error.ServiceUnknown (2)
WARNING:root:g-dbus-error-quark: org.freedesktop.DBus.Error.ServiceUnknown (2)
WARNING:root:g-dbus-error-quark: org.freedesktop.DBus.Error.ServiceUnknown (2)
WARNING:root:g-dbus-error-quark: org.freedesktop.DBus.Error.ServiceUnknown (2)
WARNING:root:g-dbus-error-quark: org.freedesktop.DBus.Error.ServiceUnknown (2)

(dialect:2): Gtk-WARNING **: 19:57:47.820: GtkText - did not receive a focus-out event.
If you handle this event, you must return
GDK_EVENT_PROPAGATE so the default handler
gets the event as well
WARNING:root:g-dbus-error-quark: org.freedesktop.DBus.Error.ServiceUnknown (2)
WARNING:root:g-dbus-error-quark: org.freedesktop.DBus.Error.ServiceUnknown (2)
mufeedali commented 2 weeks ago

(dialect:2): Gtk-WARNING **: 19:57:47.820: GtkText - did not receive a focus-out event. If you handle this event, you must return GDK_EVENT_PROPAGATE so the default handler gets the event as well

I have this too, but it doesn't cause any issues in my case.

I wonder why the org.freedesktop.DBus.Error.ServiceUnknown error is happening though? @rafaelmardojai , any clues?

wokawoka commented 1 week ago

is there something else I could try in order to collect more information to debug this issue? I would love to be able to use deepl through dialect. Thank you!

rafaelmardojai commented 1 week ago

@wokawoka we're a bit lost right now on what can be the issue. Maybe you can try the development version of Dialect to see if something is different since we refactored a few things.