-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Using forked version of react-native 0.43.3 with code-push 2.0.2-beta is causing errors #858
Comments
in our RN fork, we publish the archives for android. It should work then. eg: facebook/react-native@master...4Catalyzer:17_4_6 |
Thanks for your response, Chirag. When I remove the /android/ entry from .gitignore, I don't get any other files added. Seems like I need to compile react-native somehow to generate the archives. Could you let me know how I can do that? From this link https://facebook.github.io/react-native/docs/android-building-from-source.html , it seems like I need to build react-native from source (as I am using a fork branch of react-native with fixes that are yet to be part of react-native release). So I tried the steps described in the link and got the following error. From this link facebook/react-native#11677, it seems like @chirag04 were able to get the react-native to build from source. Could you let me know why I am hitting this error? I installed NDK using my android studio instead of downloading from the zip file included in the link https://facebook.github.io/react-native/docs/android-building-from-source.html here. I followed your guidance in the facebook/react-native#11677, but still hitting the same error as above. UPDATE: Turns out I have to indeed use the older version of Android-NDK listed in the link https://facebook.github.io/react-native/docs/android-building-from-source.html instead of the one that gets installed from Android Studio. That fixed the issues of react-native compilation. Unfortunately, the Code push issues still exist and I have for now removed Code push from our project |
Hi @shrutic, thanks for reaching us. I've just tried to set up clean project that uses |
Code push works just fine upon pointing to 0.43.3 version directly but fails with my forked version. Upon further investigation, I hit similar errors ( Unable to locate symbol ) even after removing codepush from my android project. Then I found out that as per the react-native documentation, there are additional steps to be followed for android when using a forked version of react-native here Building React native from source for android. Upon following the above steps, all the "Unable to locate symbol" errors without codepush were resolved. But upon adding codepush, the react-native errors still showed up. So for now, I have removed codepush from our project. I will continue to investigate why these errors are still happening |
@shrutic, got it, thanks for the clarification, please let me know if you have any questions. |
@shrutic, closing this for now, please let me know if any changes. |
@chirag04 could you help me with how to publish archives from React native fork. I could not find any instructions on how to do that in a fork. All the instructions I can find are how to compile React native android from source. Would really appreciate your help as this is blocking me from using many third party libraries in Android. |
I don't remember the exact steps but Just follow the steps in this script: https://github.com/facebook/react-native/blob/master/scripts/publish-npm.js |
Thanks @chirag04 for the quick response. I tried the command and was able to generate the jar files. I created a new branch in my fork with these jar files checked in and updated my package.json to point to my new file. After "npm install", I still get the "Unable to locate the symbol" errors. I looked at the publish-npm.js and I did not see any additional steps except npm publish. Do I have to do a npm publish against my fork? I am not sure how that would work. this is the commit I did to my react-native fork shrutic/react-native@b4b0949 |
@shrutic your fork looks good to me. make sure you are not building from source when switching to your fork. also double check you are install react native from your fork. No need to publish your fork to npm. |
@chirag04 I was indeed building from the source in my project where I was using my fork of react-native. Should I make sure that that generated android archive files are also downloaded correctly? Where would they be present in the node_modules? |
somewhere inside: Worst case: i would say it's best to just create a new project and try to replicate the problem with minimum changes. then switch to your fork and see how it goes. |
I could not find the android directory under react-native in node_modules. The relevant path that I did find is ... node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react. But I did not find the react-native directory under it where all the generated archives seemed to get placed when I created the PR shrutic/react-native@b4b0949. Does this mean the fork was not correctly downloaded? I made sure I had the line you specified in my build.gradle.. :( As I mentioned before, I dont get this problem if I point to the facebook's react-native version directly. It happens only when I switch to my fork. I will try to create a new project with my specific third party libraries against my fork and see if that gives any insights. I had one more question. How come all the archives you generated had a version of 10000 while mine has 0.43.3 ( the react-native version that I made a fork of )? |
I do not have the directory android in my node_modules/react-native.
Am I missing something? Maybe this mode of referencing forks does not download everything? UPDATE: |
Description
I am using a forked version of react-native 0.43.3 with 2.0.2-beta with my project. I have recently started developing on Android and I have started seeing the errors reported in this issue #792 even though I am on RN 43 ( albiet a forked version)
Reproduction
Additional Information
"react-native": "git://github.com/shrutic/react-native.git#AppExtensionSafe-ReactNative",
(The more info the faster we will be able to address it!)
The text was updated successfully, but these errors were encountered: