cnhefang / image_picker_saver

Other
50 stars 45 forks source link

iOS 13.2 保存成功返回null 问题在debugPrint("saved filePath:" + filePath) 导致没法判断是否保存成功 #39

Open Cyclonecat opened 4 years ago

Cyclonecat commented 4 years ago

2020-01-02 17:52:35.094731+0800 Runner[3982:988747] Success PHImageFileURLKey (null) 2020-01-02 17:52:35.096814+0800 Runner[3982:988939] [VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception: Invalid argument(s)

0 _StringBase.+ (dart:core-patch/string_patch.dart:265:57)

1 ImagePickerSaver.saveFile (package:image_picker_saver/image_picker_saver.dart:85:34)

#2 _onCaptureAndSave (package:cloud_intercom/pages/intercom_call_page/effect.dart:46:43) #3 combineEffects. (package:fish_redux/src/redux_component/helper.dart:74:32) #4 EnhancerDefault._inverterEffect. (package:fish_redux/src/redux_component/enhancer.dart:117:56) #5 _pageAnalyticsMiddleware... (package:cloud_intercom/app.dart:136:24) #6 createEffectDispatch. (package:fish_redux/src/redux_component/helper.dart:89:39) #7 createDispatch. (package:fish_redux/src/redux_component/helper.dart:109:39) #8 LogicContext.dispatch (package:fish_redux/src/redux_component/context.dart:77:38) #9 buildView. (package:cloud_intercom/pages/intercom_call_page/view.dart:82:43) #10 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:706:14) #11 _InkResponseState.build. (package:flutter/src/material/ink_well.dart:789:36) #12 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24) #13 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:486:11) #14 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:264:5) #15 BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:199:7) #16 PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:467:9) #17 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:76:12) #18 PointerRouter._dispatchEventToRoutes. (package:flutter/src/gestures/pointer_router.dart:117:9) #19 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:379:8) #20 PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:115:18) #21 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:101:7) #22 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:218:19) #23 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:198:22) #24 GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:156:7) #25 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:102:7) #26 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:86:7) #27 _rootRunUnary (dart:async/zone.dart:1138:13) #28 _CustomZone.runUnary (dart:async/zone.dart:1031:19) #29 _CustomZone.runUnaryGuarded (dart:async/zone.dart:933:7) #30 _invoke1 (dart:ui/hooks.dart:273:10) #31 _dispatchPointerDataPacket (dart:ui/hooks.dart:182:5)
pxc0215 commented 4 years ago

遇到同样的问题,在外面 catch 了一下,但是也不好根据 filePath 判断否成功了。看上去新版已经解决了这个问题:https://github.com/cnhefang/image_picker_saver/pull/30