(PlatformException(Clipboard error, Unable to open clipboard, 5, null)
PlatformException (PlatformException(Clipboard error, Unable to open clipboard, 5, null))
I'm getting this error on Windows 11 Home running the example app. It sometimes throws the error on the first copy, sometimes after one or two successful copies. I don't know if this is related.
I have the same problem
[ ] #0 JSONMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:171:7) [ ] #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:310:18) [ ] <asynchronous suspension> [ ] #2 Clipboard.getData (package:flutter/src/services/clipboard.dart:52:42) [ ] <asynchronous suspension>
PlatformException (PlatformException(Clipboard error, Unable to open clipboard, 5, null))I'm getting this error on Windows 11 Home running the example app. It sometimes throws the error on the first copy, sometimes after one or two successful copies. I don't know if this is related.
This error may occur when there are other applications simultaneously accessing the clipboard, and the previous program has not released the clipboard lock, resulting in inability to acquire the lock.
You can independently implement the corresponding platform method and then add a delayed retry mechanism, which can basically eliminate the problem