Skip to content

BUG: CopyToClipboard method throws an error for JSON-RPC v2 plugins #3071

Open
@Yusyuriv

Description

@Yusyuriv

Checks

  • I have checked that this issue has not already been reported.

  • I am using the latest version of Flow Launcher.

Problem Description

When trying to call this method from a JSON-RPC v2 plugins, it throws an error.

Flow Launcher Version

1.19.4

Windows Build Number

10.0.26120.961

Error Log

System.Threading.ThreadStateException: Current thread must be set to single thread apartment (STA) mode before OLE calls can be made.
   at System.Windows.OleServicesContext.SetDispatcherThread()
   at System.Windows.OleServicesContext.get_CurrentOleServicesContext()
   at System.Windows.Clipboard.CriticalSetDataObject(Object data, Boolean copy)
   at Flow.Launcher.PublicAPIInstance.CopyToClipboard(String stringToCopy, Boolean directCopy, Boolean showDefaultNotification) in Z:\flow-launcher\Flow.Launcher\Flow.Launcher\PublicAPIInstance.cs:line 141

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions