Hey everybody,
I’m running standalone app built with EAS on Android. After requesting permissions via MediaLibrary.requestPermissionsAsync()
and picking an image, I’m trying to resize it using ImageManipulator
with these params:
ImageManipulator.manipulateAsync(
'file:///storage/emulated/0/Pictures/SomeApp/some_image.jpg',
[{
resize: {
height: 1024,
},
}],
{ compress: 0.7 },
);
Which fails and throws an exception:
Encountered an exception while calling native method: Exception occurred while executing exported method manipulateAsync on module ExpoImageManipulator: Attempt to invoke interface method 'void org.unimodules.interfaces.imageloader.ImageLoader.loadImageForManipulationFromURL(java.lang.String, org.unimodules.interfaces.imageloader.ImageLoader$ResultListener)' on a null object reference
It looks like the native ImageLoader
in ImageManipulatorModule
is null.
I’m using monorepo with expo-yarn-workspaces
.
I’ve got expo-image-manipulator
and all unimodules
-related packages (@unimodules/core, @unimodules/react-native-adapter, react-native-unimodules, unimodules-app-loader, unimodules-barcode-scanner-interface, unimodules-camera-interface, unimodules-constants-interface, unimodules-face-detector-interface, unimodules-file-system-interface, unimodules-font-interface, unimodules-image-loader-interface, unimodules-permissions-interface
) symlinked in package.json
and EAS build goes through without an issue.
The operation works fine when app’s running through Expo Go or when built with expo build
.
I’ve come across a thread describing similar exception thrown from permissions module in a bare workflow project. But that one’s been fixed already.
So my question really is if this could be somehow related to build done with EAS or am I missing something on my part? Did you have any issues with ImageManipulator
and EAS?