openimsdk / open-im-flutter-demo

Demo developed based on flutter open IM SDK.
https://openim.io
Apache License 2.0
310 stars 209 forks source link

[BUG] ios sends picture error operation not permitted #119

Closed yanjian123456 closed 1 month ago

yanjian123456 commented 2 months ago

OpenIM Server Version

3.8.0

Operating System and CPU Architecture

macOS (AMD)

Deployment Method

Source Code Deployment

Bug Description and Steps to Reproduce

2024-09-25 02:38:43.732 INFO [PID:765] [version:3.8.0] [open_im_sdk/caller.go:265] func call req {"operationID": "1727231923669", "function name": "github.com/openimsdk/openim-sdk-core/v3/internal/conversation_msg.(Conversation).CreateImageMessageFromFullPath-fm", "args": ["/var/mobile/Containers/Data/Application/8E5E072B-814A-456B-821A-37D9EE6E84EC/Library/Caches/pic/3eb69f8fbf1408ae27397d385f09842b_exif.jpg"]} 2024-09-25 02:38:43.733 ERROR [PID:765] [version:3.8.0] [open_im_sdk/caller.go:260] fn call error {"operationID": "1727231923669", "function name": "github.com/openimsdk/openim-sdk-core/v3/internal/conversation_msg.(Conversation).CreateImageMessageFromFullPath-fm", "cost time": "0 ms", "error": "open /var/mobile/Containers/Data/Application/8E5E072B-814A-456B-821A-37D9EE6E84EC/Documents9cfb1b7abf36e12c2b64d92c9bb2761f.jpg: operation not permitted"}

使用demo的创建图片方法,报上面的错 void sendPicture({required String path}) async { final file = await IMUtils.compressImageAndGetFile(File(path));

var message = await OpenIM.iMManager.messageManager.createImageMessageFromFullPath(
  imagePath: file!.path,
);
_sendMessage(message);

}

Screenshots Link

No response

std-s commented 2 months ago

The path is incorrect.