-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Does not work with React Native Expo SDK 42+ Please Remove Isomorphic-Webcrypto #22628
Comments
Label prediction was below confidence level |
@jeremymeng can you look into this and make a recommendation for how to best resolve? |
cosmos uses
In app config we use Our current sample provides the polyfill using azure-sdk-for-js/samples/frameworks/react-native-expo/ts/appconfigBasic/shims.ts Lines 5 to 6 in bdf740c
If Another approach is to provide digest/hmac functionality using RN-native packages. But I haven't found any "blessed" packages for this. |
Update: I found a temporary workaround, which is to use Expo's classic build service, instead of their newer EAS build service. Unfortunately, the classic build service is deprecated and goes offline in about 160 days. So I'm reaching out to them and see if they can get EAS build to work like classic in this regard, or hold off on deprecating classic. Thanks @jeremymeng and @xirzec for looking into it. I wish you luck finding another polyfill. |
Glad you found a workaround for now. If they have any recommendations for replacing isomorphic-webcrypto or if you stumble into such in your travels, let us know, we'll keep working on the problem for our side. |
Update: can confirm that this issue is affecting android builds on Expo EAS, not just ios. Any progress on removing isomorphic-webcrypto? |
@charlestbell I opened a draft PR #23156. Edited: remove link to old artifact |
PR #23156 doesn't work in my testing. I will spend some more time on this then get back to you. |
@charlestbell here's an updated version that I was able to use to run some cosmos test in Android Emulator (with polyfills). Please give it a try |
Thank you, I'll take a look. This will be my first time using a non-npm package, you'll have to bear with me. |
I pasted the updated package slice inside my node modules folder in @azure/cosmos, but I'm still fuzzy on how to polyfill crypto. |
@charlestbell I was able to use import "react-native-url-polyfill/auto";
import "react-native-get-random-values";
import "text-encoding-polyfill";
const getRandomValues = global.crypto.getRandomValues;
import * as crypto from "isomorphic-webcrypto";
global.crypto = crypto;
global.crypto.getRandomValues = getRandomValues; |
Pardon my ignorance, but if this is still using isomorphic-webcrypto. Then how does it help me with my problem? |
I don't have an issue with Android Emulator, I have an issue with Expo Application Services' build process, using the eas-cli. |
@charlestbell My PR removes cosmos' hard-coded |
Understood. Thank you. I don't know where to find a polyfill either, so I'm in the same boat. Thanks for doing what you've done though. If anyone knows of another polyfill, I'll give it a try with the version you provided. |
Add flush rest api specs (Azure#22628) * Adds base for updating Microsoft.Cache from version preview/2022-11-01-preview to version 2023-03-01-preview * Updates readme * Updates API version in new specs and examples * Adding flush rest api specs * Add pattern for cluster and database parameters * Minor changes * fix lint error . 2. Revert parameter pattern change Please enter the commit message for your changes. Lines starting * updating the texts * Make the ids of the flush parameters to be optional
Getting issue without expo |
Can isomorphic-webcrypto be replaced with expo-crypto? Getting the same issue as well. |
The problem is @azure/cosmos has a dependency on isomorphic-webcrypto: isomorphic-webcrypto has a dependency on @unimodules/core - @unimodules/core is deprecated. Maybe we could update isomorphic-webcrypto to not have a dependency on @unimodules/core? |
@jeremymeng I think you can probably use the https://github.com/webview-crypto/react-native-webview-crypto Just used it for a private project where I couldn't use |
There is a fork here that removes the @unimodules/core dependency and uses expo-crypto: For this to work with eas build I think you would need to add the following to the the
|
Hi @charlestbell, we deeply appreciate your input into this project. Regrettably, this issue has remained unresolved for over 2 years and inactive for 30 days, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support. |
Currently building a React Native app and just finished porting it over from Firebase to CosmosDB.
Everything looked great, but when I went build it for deployment, I get this error on eas build:
❌ ld: 12 duplicate symbols for architecture arm64
Turns out, I am by no means the first. Others in the community narrowed down the problem to a package called @unimodules/core, which is a dependency of isomorphic-webcrypto, which is a dependency of @azure/cosmos.
The issue has been open on the isomorphic-webcrypto package for some time kevlened/isomorphic-webcrypto#65
But that package has only one maintainer, and hasn't been updated in over a year.
Because there is no movement on the isomorphic-webcrypto package, I am asking that the Azure Team please remove isomorphic-webcrypto as a dependency, so that react-native Expo devs can use an up-to-date version of Expo.
Thank you so much!
The text was updated successfully, but these errors were encountered: