Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Expo 44 #2

Open
cmosboss opened this issue May 5, 2022 · 5 comments
Open

Issue with Expo 44 #2

cmosboss opened this issue May 5, 2022 · 5 comments

Comments

@cmosboss
Copy link

cmosboss commented May 5, 2022

Not sure if you ever ran into this issue before. Trying to add this to a new Expo 44 project. Everything seems to be working except when I try and actually run the unzip function on my custom development client I get this error.

Error: [TypeError: null is not an object (evaluating 'RNZipArchive.unzip')]

When configuring this did you do anything other than expo install react-native-zip-archive, publish your new development client, and then try and use the code?

@wodin
Copy link
Owner

wodin commented May 6, 2022

Hi @cmosboss

Expo SDK 45 was released today. I'll upgrade this app and give it a go and let you know how it goes.

@wodin
Copy link
Owner

wodin commented May 6, 2022

I messed up the upgrade to begin with, but fixed it and it works fine. My Android dev client is here if you want to give it a try:

https://expo.dev/accounts/wodin/projects/zip-test/builds/9a91e09c-2513-489c-84c0-14a89a944745

The error you're getting makes it sound like you don't have the native code in your dev client. It's the same sort of error I would expect from Expo Go, since that doesn't include the native code from react-native-zip-archive.

Is it possible you built the dev client before installing react-native-zip-archive?

Basically what I did was as you describe (except I didn't "publish" anything. Just installed the dev client on my phone):

  • expo init
  • expo install expo-dev-client
  • yarn add react-native-zip-archive
  • eas build ...
  • Install the resulting dev client on a device/emulator/simulator

Then you should be able to edit the JS to use react-native-zip-archive.

@wodin
Copy link
Owner

wodin commented May 7, 2022

Here's a "preview" Simulator build that works fine for me too:

https://expo.dev/accounts/wodin/projects/zip-test/builds/69443994-5d2e-4bfd-88a2-147276cfb15f

@tacitomv
Copy link

tacitomv commented Aug 9, 2022

I just got the same block and found this issue here. I'm using Expo Go... I had in mind it would work :D

I'm new to this expo thing, am I expecting something I shouldn't?

@wodin
Copy link
Owner

wodin commented Aug 10, 2022

Hi @tacitomv

react-native-zip-archive needs some native code that is not included in Expo Go, so it will not work in Expo Go.
But you can build a custom dev client (a.k.a. a development build.) to use instead of Expo Go.
A custom dev client is basically a custom version of Expo Go that is built using your dependencies instead of just what's in the Expo SDK. So if you need react-native-zip-archive, then you can build that into your dev client.

See: https://docs.expo.dev/development/introduction/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants