-
Notifications
You must be signed in to change notification settings - Fork 265
Description
OpenIM Server Version
3.8.3
Operating System and CPU Architecture
macOS (AMD)
Deployment Method
Source Code Deployment
Bug Description and Steps to Reproduce
在iOS 模拟器,获取相册图片(使用AssetPicker.pickAssets),使用createImageMessageFromFullPath创建成功。
真机则失败,抛出错误:
Unhandled Exception: FormatException: Unexpected end of input (at character 1)。
_ChunkedJsonParser.fail (dart:convert-patch/convert_patch.dart:1376:5)
#1 _ChunkedJsonParser.close (dart:convert-patch/convert_patch.dart:494:7)
#2 _parseJson (dart:convert-patch/convert_patch.dart:36:10)
#3 JsonDecoder.convert (dart:convert/json.dart:610:36)
#4 JsonCodec.decode (dart:convert/json.dart:216:41)
#5 jsonDecode (dart:convert/json.dart:155:10)
#6 Utils.formatJson (package:flutter_openim_sdk/src/utils.dart:11:46)
#7 Utils.toObj (package:flutter_openim_sdk/src/utils.dart:7:71)
把图片复制到磁盘目录也不行。
可能有帮助:获取相册时候返回对象File,再拿到file.path,createImageMessageFromFullPath使用file.path。在iOS里面URL,获取url.absoluteString,再通过url.absoluteString生成URL是会有失败的。
Screenshots Link
No response