bamlab/react-native-image-resizer

TypeError: Cannot read property 'createResizedImage' of null in Android

isak-sayyed opened this issue · 11 comments

In the function below, I am including all the required parameters:
createResizedImage( path, 960, 1280, 'JPEG', 80 );

but getting TypeError: Cannot read property 'createResizedImage' of null
in Android

Hi, can you provide a reproducible example ?

I am using same code snippet provided in the documentation for the method createResizedImage and passing all the mandotry parameters and I am getting this error

Did you rebuild your android app after adding the dependency ? I can't reproduce your issue on my side.
Can you share a public git repo where the issue is reproducible so that I can have a look ?

In READ ME-Manual linking,package name is wrong in android,should be com.reactnativeimageresizer.ImageResizerPackage."Since version 3.0.0 this library has been moved from react-native-image-resizer to @bam.tech/react-native-image-resizer"

not working same I think the install doc is wrong

Not working on android, uninstalling @bam.tech/react-native-image-resizer fix all my issues 👯

Same issue with me.
Possible Unhandled Promise Rejection (id: 0):
TypeError: null is not an object (evaluating 'ImageResizer.createResizedImage')

with react-native-image-resizer it works fine but after replacing with @bam.tech/react-native-image-resizer this error is comes

The example app inside this project is working on android (you can pull the repository & test it).

It means that there is a difference between our setup & your setup. The error might be in the code or documentation but without a minimal & simple repeatable example, it is going to be difficult to help.

@v2stech-solution, @isak-sayyed, @w3company-leo, or @UrielCh, is it possible for you do that?

@isak-sayyed,

Did a small example here with 3.0.5 & everything just work fine.

If you did a manual install @chaos2171053 already fixed the documentation in this PR #366.

I close it. i let you reopen if you still have any problems.

@taboulot why you closed this issue if still happen....Im install the lib @bam.tech/react-native-image-resizer at this moment...and get the same issue TypeError: Cannot read property 'createResizedImage' of null

@LuisBonsembiante Since 12 June 2023, @cyrilbo & I asked for a minimal example.
We do not reproduce it on our side. Without this example we can do nothing.
If you have one, please share it with us & we will reopen it.