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

NEED A UPDATE #387

Open
Kevinhellomove opened this issue Nov 15, 2024 · 17 comments
Open

NEED A UPDATE #387

Kevinhellomove opened this issue Nov 15, 2024 · 17 comments

Comments

@Kevinhellomove
Copy link

For working with new React-native and expo version we need an update because now dependencys are working for old versions.

@RonRadtke
Copy link
Owner

RonRadtke commented Nov 15, 2024

Do you hava little more information for me maybe? What exactly is needed?

@Kevinhellomove
Copy link
Author

The peer dependencies of the library refer to older versions of react native and expo which generates problems when working with the new versions and new architecture.

@RonRadtke
Copy link
Owner

The peer dependencies currently don't refer to any specific version but actually just to "*".
So it shouldn't cause any problems.

Can you maybe hint me on how to reproduce it?

@TVeskilt
Copy link

TVeskilt commented Nov 18, 2024

after updating my app to react native 0.76.2 my android build doesnt build any more. i get this error:

`
Task :react-native-blob-util:generateCodegenArtifactsFromSchema FAILED

/Users/tristanveskilt/WebstormProjects/cara-health-app/node_modules/react-native/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleJniCpp.js:478
.map(({name: propertyName, typeAnnotation}) => {
^

TypeError: Cannot read properties of undefined (reading 'map')
at /Users/tristanveskilt/WebstormProjects/cara-health-app/node_modules/react-native/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleJniCpp.js:478:16
at Array.map ()
at generate (/Users/tristanveskilt/WebstormProjects/cara-health-app/node_modules/react-native/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleJniCpp.js:455:8)
at Object.generate (/Users/tristanveskilt/WebstormProjects/cara-health-app/node_modules/react-native/node_modules/@react-native/codegen/lib/generators/RNCodegen.js:212:9)
at generateSpecFromInMemorySchema (/Users/tristanveskilt/WebstormProjects/cara-health-app/node_modules/react-native/scripts/codegen/generate-specs-cli-executor.js:78:22)
at Object.generateSpec [as execute] (/Users/tristanveskilt/WebstormProjects/cara-health-app/node_modules/react-native/scripts/codegen/generate-specs-cli-executor.js:115:3)
at main (/Users/tristanveskilt/WebstormProjects/cara-health-app/node_modules/react-native/scripts/generate-specs-cli.js:51:12)
at Object. (/Users/tristanveskilt/WebstormProjects/cara-health-app/node_modules/react-native/scripts/generate-specs-cli.js:61:1)
`

any idea what could be wrong?

@RonRadtke
Copy link
Owner

Are you useing expor or anything other special? Which version of the library?

@TVeskilt
Copy link

TVeskilt commented Nov 18, 2024

nope, no expo, vanilla react-native. Library version "react-native-blob-util": "^0.19.11",

Update: Got it working, issue on my side

@paksa92
Copy link

paksa92 commented Nov 20, 2024

This library works fine on the latest versions of react-native and Expo

@trajano
Copy link

trajano commented Nov 22, 2024

The other block is the @config-plugins/react-native-blob-util if it was managed by this project and not tied to expo@51 it will help, but please make sure you still allow expo 51 so people are not forced to update if they don't need to. You can use "expo": "51 || 52" much like I did on https://github.com/revtel/react-native-nfc-manager/pull/758/files

@RonRadtke
Copy link
Owner

@trajano jsut so I understand it correctly. The problems technically ist in https://www.npmjs.com/package/@config-plugins/react-native-blob-util ? ANd, probably, the expo version etc there?

So what you're asking me to do, is, adding the peer depedencies for expo so we don't need the plugin right?

@trajano
Copy link

trajano commented Nov 22, 2024

@RonRadtke for my issue specifically yes. Though we can lock to the current version if we need to remain in Expo 51 since it works so far. However, if you update to support Expo 52 (which includes the config plugin).

Looking at what https://github.com/expo/config-plugins/blob/main/packages/react-native-blob-util/src/withReactNativeBlobUtil.ts it seems to add some permissions specific to Android. Then again looking at your README. I don't particularly see it matching

e.g.
"android:name": "android.intent.action.DOWNLOAD_COMPLETE",

     $: {
    "android:name": "com.facebook.react.modules.blob.BlobProvider",
    "android:authorities": "@string/blob_provider_authority",
    "android:exported": "false",
  },

@RonRadtke
Copy link
Owner

Honesrtly my understanding of all that expo stuff is not good enough to judge what is going on int the config plugin.
The DOWNLOAD_COMPLETE ident is used, when using the downloadmanager.
If you ahve a working version that covers expo 52 and 51 I am willing to merge it, as long as it doesn't iimpact non expo users

@trajano
Copy link

trajano commented Nov 23, 2024

I'm not sure if I can make one yet the main reason for using this library is react-native-pdf which doesn't seem to work on Expo 52 at all.

@griffinshuth
Copy link

react-native-pdf does work with Expo 52 unless you have the new architecture turned on. You need to use a patch if you want to use react-native-pdf with the new architecture.

@trajano
Copy link

trajano commented Nov 27, 2024

@griffinshuth yep I enabled new arch to see what happens. Also new arch is default with new Expo 52 template

@RonRadtke
Copy link
Owner

@trajano this lib should work fine with the new arch.

@RonRadtke
Copy link
Owner

But regardless, if anyone can provide a PR and test it accordingly I would be very grateful.
Then I don'T have to dig trough all the expo stuff.

@trajano
Copy link

trajano commented Nov 27, 2024

@RonRadtke I just need react-native-pdf to work with new arch as well. The reason for this lib for me was primarily for that module as Expo provides similar APIs already.

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

6 participants