react-native-photo-editor: Path param error

The path key value is file:///Users/username/Library/Developer/CoreSimulator/Devices/42134366-48F1-46B6-951B-A525B89B82C0/data/Containers/Data/Application/606F6963-86A0-4E16-8124-8F5F3C5E5EB7/Documents/8D11DDDE-D992-489F-B7EA-627A86AF8B3F.jpg

2018-09-13 15:28:38.180634+0530 Frills[70239:1900744] [framework] CUICatalog: Invalid asset name supplied: '(null)'
2018-09-13 15:28:38.180824+0530 Frills[70239:1900744] [framework] CUICatalog: Invalid asset name supplied: '(null)'
2018-09-13 15:28:38.181080+0530 Frills[70239:1900744] [framework] CUICatalog: Invalid asset name supplied: '(null)'
2018-09-13 15:28:38.181295+0530 Frills[70239:1900744] [framework] CUICatalog: Invalid asset name supplied: '(null)'
Fatal error: Unexpectedly found nil while unwrapping an Optional value
2018-09-13 15:28:38.569267+0530 Frills[70239:1900744] Fatal error: Unexpectedly found nil while unwrapping an Optional value

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 1
  • Comments: 22 (8 by maintainers)

Commits related to this issue

Most upvoted comments

@srameshr this works… Issue can be closed screen shot 2018-09-26 at 2 36 12 pm

Hi @prscX & @srameshr — I ran into this same issue with RNCamera alongside react-native-image-crop-picker. The difference between the two is that the picker (which worked fine with the editor) returns just a path without protocol, e.g. /Users/username/Library..., while the camera component returns a path with file:/// at the front of it.

If I had to guess, I’d say the editor is internally adding the protocol, such that what it’s trying to load is actually file:///file:///Users/username/Library.... Just stripping out the protocol at the beginning of the uri returned from RNCamera with a string .replace() solved the issue for me.