Bug 152706 - TRANSLATION: "Requested clipboard format is not available" error message when using DeepL translation feature
Summary: TRANSLATION: "Requested clipboard format is not available" error message when...
Status: REOPENED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.5.0.0 beta1+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 153461 (view as bug list)
Depends on:
Blocks: Language-Detection DeepL
  Show dependency treegraph
 
Reported: 2022-12-28 12:15 UTC by Dieter
Modified: 2024-06-10 12:33 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
simple sample text in ODT (9.65 KB, application/vnd.oasis.opendocument.text)
2023-11-10 13:06 UTC, Stéphane Guillou (stragu)
Details
I also reproduced it on Linux. (451.35 KB, image/png)
2024-06-10 12:33 UTC, TANAKA Hidemune
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dieter 2022-12-28 12:15:03 UTC
Prerequirements
a) DEEPL API account
b) Connection to DeepL Server (Tools -> Options -> Language Settings -> DeeplL Server)

Steps:
1. Write some text in English
2. Tools -> Translate -> Select a language (I've selected Germen) -> OK.

Actual result
Error message: "Requested clipboard format is not available."

Expected result
Translation
Comment 1 Dieter 2022-12-28 12:18:46 UTC
Miklos, you were involved in developing this feature. So perhaps you are also interested in this problem?
cc: Miklos Vajna
Comment 2 Sebastiaan Veld 2022-12-29 10:59:59 UTC
Works for me: I've tested this for Dutch ("Nederlands") and the message box is correctly stating "Gevraagde klemborindeling is niet beschikbaar" so there is not an translation issue when using LO in Dutch. Tested translating Multiple languages to multiple destination languages, then the message box popup consistently shows Dutch in the popup message. 

Version: 7.5.0.1 (X86_64) / LibreOffice Community
Build ID: 77cd3d7ad4445740a0c6cf977992dafd8ebad8df
CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win
Locale: nl-NL (nl_NL); UI: nl-NL
Calc: CL threaded
Comment 3 Dieter 2022-12-29 11:47:41 UTC
(In reply to Sebastiaan Veld from comment #2)
> Works for me: I've tested this for Dutch ("Nederlands") and the message box
> is correctly stating "Gevraagde klemborindeling is niet beschikbaar" so
> there is not an translation issue when using LO in Dutch. Tested translating
> Multiple languages to multiple destination languages, then the message box
> popup consistently shows Dutch in the popup message. 

Sorry, but I don't understand your comment. You also recieve the error message, but for you this is the expected result and not a bug? Could you please explain this?
Comment 4 Sebastiaan Veld 2022-12-29 14:32:57 UTC
Sorry, misread the issue: so -yes- I have the same issue as I reported as part of bug 152247:

To duplicate:
* Installed fresh 7.5 beta1 in Dutch (Nederlands), reset the user profile
* Start a New document
* Setup Translation in Settings, https://api-free.deepl.com/v2/translate and added verification key.
* Added some English text to my document
* Select no text, all or part of the text and hit Translate from the menu 
* Results in "Requested clipboard format is not available." (in my case this error message is shown in Dutch).

Result:
Noting is translated and the original text selected for translation is lost in the document.

Expected result:
Translated text should be shown in the document.


Version: 7.5.0.1 (X86_64) / LibreOffice Community
Build ID: 77cd3d7ad4445740a0c6cf977992dafd8ebad8df
CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win
Locale: nl-NL (nl_NL); UI: nl-NL
Calc: CL threaded
Comment 5 Dieter 2022-12-29 16:47:16 UTC
(In reply to Sebastiaan Veld from comment #4)
> Sorry, misread the issue: so -yes- I have the same issue as I reported as
> part of bug 152247:

=> NEW
Comment 6 raal 2023-02-21 23:00:17 UTC
*** Bug 153461 has been marked as a duplicate of this bug. ***
Comment 7 Mike Kaganski 2023-10-11 15:26:31 UTC
Can't repro using today's master.
Comment 8 Mike Kaganski 2023-10-11 15:28:18 UTC
FTR: the only related code that handles clipboard formats is SwTranslateHelper::ExportPaMToHTML, used in TranslateDocumentCancellable. If still repro, then exact repro steps needed, and then this function needs debugging.
Comment 9 BogdanB 2023-10-11 15:29:22 UTC Comment hidden (obsolete)
Comment 10 Timur 2023-11-09 16:57:12 UTC
I do not know why it was reported so long ago.
It really stopped working recently for me, but was just fixed with this:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=11f439b861922b9286b2e47ed326f3508a48d44e 

And I guess that may be the reason it works for Mike with fresh master. 
I close as Fixed.

BTW, did you notice that Deepl is still Experimental? Makes no sense to me.
Comment 11 Mike Kaganski 2023-11-09 20:09:00 UTC
(In reply to Timur from comment #10)

This report has nothing to do with what you describe: Michael had upgraded Curl in commit c2930ebff82c4f7ffe8377ab82627131f8544226 on 2023-09-27, which caused the problem that you saw, and then fixed it in commit 11f439b861922b9286b2e47ed326f3508a48d44e on 2023-11-07. But this bug existed and was filed on 2022-12-28 - almost a year before; and I couldn't repro it on 2023-10-11, before Michael created the fix.

I don't restore the resolution myself, because I don't repro, and don't know if Dieter still has it. But your change was unwarranted.
Comment 12 Aron Budea 2023-11-10 01:08:39 UTC
Dieter, can you please check in a fresh daily build to see if the bug is still reproducible for you?
Comment 13 Timur 2023-11-10 09:44:07 UTC
I am aware of what Mike wrote, but:
Sebastian wrote in the other bug later, seems he could use later
Dieter is in QA, he will know himself how to check
error may have also been about curl or NSS
now it works differently and needs a new test anyway
Comment 14 Stéphane Guillou (stragu) 2023-11-10 13:06:16 UTC Comment hidden (obsolete)
Comment 15 Stéphane Guillou (stragu) 2023-11-10 14:25:36 UTC
(In reply to Stéphane Guillou (stragu) from comment #14)
Apologies, my API URL was wrong for that test.

No repro in:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 3aca2d9776a871f15009a1aa70628ba3a03ee147
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

It also worked before the curl upgrade c2930ebff82c4f7ffe8377ab82627131f8544226 in 24.2, and before it's cherrypick into 7.6, 609d4a6b8d66d02a36c57de99efd36a4b1c2b789.

And it also worked in 7.5 at commit d94f1cca0d86184ff6ee855b11cbfefe6a6b58c5 (to be as close as possible to Sebastiaan's version in comment 4.

Back to needinfo to see if Dieter and Sebastiaan can still reproduce after checking their settings.

(would be great if a proper error message was shown when the API URL is not valid...)
Comment 16 Sebastiaan Veld 2023-11-12 16:54:01 UTC
It works for me using the latest daily build, I can now translate a scentence to  another language.

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 50add2043752c7b07beccef9a509bea6c09619f8
CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win
Locale: nl-NL (nl_NL); UI: nl-NL
Calc: CL threaded
Comment 17 Stéphane Guillou (stragu) 2023-11-12 17:27:14 UTC
(In reply to Sebastiaan Veld from comment #16)
> It works for me using the latest daily build
Ok, let's mark as "works for me" then.
Dieter, if you still have issues with a master build, please set back to unconfirmed.
Comment 18 Dieter 2023-11-26 13:15:42 UTC
Still a problem with

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 5fe2bf914c251009ec4709fa8fdc45c3b53f676b
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL threaded

Steps:
1. Tools -> Options -> Language Settings -> DeepL Server
2. API URL: api-free.deepl.com (information from https://www.deepl.com/de/account/summary)
3. Authentication key (information from https://www.deepl.com/de/account/summary)
4. Apply -> OK
5. in a document write some english sentence
6. Select text -> Tools -> Translate
7. Select "German" as target language -> OK

Actual result
error message "Requested clipboard format is not available."

Expected result
Translated text

=> Back to UNCONFIRMED
Comment 19 Dieter 2023-11-26 13:26:38 UTC
Perhaps it was the wrong API. with https://api-free.deepl.com/v2/translate I don't get an error message, but original text just disappears.

So I see two problems:
1. How should people know the correct API? (our documententation doesn't give an info)
2. Text disappears.

But problem of this bug report is solved. Perhaps I will open new reports for the two mentioned problems.

=> RESOLVED WORKSFORME
Comment 20 lal 2023-12-27 13:53:29 UTC
This is still present in LO 7.6.4.1 (X86_64) in Windows 11

Prerequirements
a) DEEPL API account
b) Connection to DeepL Server (Tools -> Options -> Language Settings -> DeeplL Server)

Steps:
1. Write some text in English
2. Tools -> Translate -> Select a language (I've selected Swedish) -> OK.

alternatively:
1. Write some text in Swedish
2. Tools -> Translate -> Select a language (I've selected English) -> OK.

Actual result
Error message: "Requested clipboard format is not available."

Expected result
Translation from/to English/Swedish
Comment 21 lal 2023-12-27 13:55:13 UTC
This is (sadly) still present in the latest version for Windows.

Prerequirements
a) DEEPL API account
b) Connection to DeepL Server (Tools -> Options -> Language Settings -> DeeplL Server)

Steps:
1. Write some text in English
2. Tools -> Translate -> Select a language (I've selected Swedish) -> OK.

Actual result
Error message: "Requested clipboard format is not available."

Expected result
Translation
Comment 22 Stéphane Guillou (stragu) 2023-12-27 14:04:57 UTC
lal, which API URL do you use exactly?
And can you please test the 24.2 pre-release as well?
Comment 23 Dieter 2023-12-27 14:08:12 UTC
(In reply to Stéphane Guillou (stragu) from comment #22)
> lal, which API URL do you use exactly?

Should be https://api-free.deepl.com/v2/translate
Comment 24 Helmut Leininger 2024-01-29 07:28:20 UTC
Problem still present in 24.2.0.2 (Windows11)

Version: 24.2.0.2 (X86_64) / LibreOffice Community
Build ID: b1fd3a6f0759c6f806568e15c957f97194bbec8f
CPU threads: 12; OS: Windows 10.0 Build 22631; UI render: Skia/Vulkan; VCL: win
Locale: de-AT (de_AT); UI: de-DE
Calc: threaded
Comment 25 Shinji Enoki 2024-06-10 12:22:07 UTC
There was a question about this on Japanese ASK, and it seems to be reproducible on Windows.

https://ask.libreoffice.org/t/deepl/106649

It doesn't reproduce in my environment:

Version: 24.2.3.2 (X86_64) / LibreOffice Community
Build ID: 433d9c2ded56988e8a90e6b2e771ee4e6a5ab2ba
CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: ja-JP (ja_JP.UTF-8); UI: ja-JP
Calc: threaded

This issue may only occur on Windows
Comment 26 TANAKA Hidemune 2024-06-10 12:33:32 UTC
Created attachment 194627 [details]
I also reproduced it on Linux.

I also reproduced it on Linux.

Version: 24.2.3.2 (X86_64) / LibreOffice Community
Build ID: 420(Build:2)
CPU threads: 24; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: ja-JP (ja_JP.UTF-8); UI: ja-JP
Ubuntu package version: 4:24.2.3-0ubuntu0.24.04.2
Calc: threaded

$ java -version
openjdk version "1.8.0_412"
OpenJDK Runtime Environment (build 1.8.0_412-8u412-ga-1~24.04.2-b08)
OpenJDK 64-Bit Server VM (build 25.412-b08, mixed mode)