Open arunvenkat1911 opened 2 years ago
@arunvenkat1911 Can you share the build log that contains the failure?
Attaching the Build log. BuildLog.txt
Also please have a look at the errors that we get while running the app from visual studio.
From that build log:
× Build failed with message Building Solution - error code 1. Check your build configuration. × It is possible your installation is missing required software dependencies. Dependencies can be automatically installed by running E:\Samples\CodePush\windowscodepushsample\node_modules\react-native-windows\scripts\rnw-dependencies.ps1 from an elevated PowerShell prompt. For more information, go to http://aka.ms/rnw-deps Re-run the command with --logging for more information
Can you check to see if your dependencies are set up correctly with that script? (and enable logging and report back if it's reporting an issue)
Please have a look at the attached file.
The issue is coming from code push package added. BuildLogWithFullLogging.txt
_E:\Samples\CodePush\windowscodepushsample\node_modules\react-native-code-push\windows\CodePush\CodePushConfig.cpp(18,36): error C2259: 'winrt::Microsoft::CodePush::ReactNative::implementation::CodePushConfig': cannot instant iate abstract class [E:\Samples\CodePush\windowscodepushsample\node_modules\react-native-code-push\windows\CodeP ush\CodePush.vcxproj]_
Something in RNW's codepush support is interacting with cppwinrt wrong. Let's follow up with an issue on that repo to make sure it's tracked.
I am facing same issue, did anyone find solution for same ?
@Rushiraj-karm nope. We did not hear any thing from Microsoft team.
Facing same issue with: react-native: 0.70.3 react-native-windows: 0.70.3 react-native-code-push: 7.0.5 Did smb find any solutions?
I have the exact same issue. Please any solution or workaround? Thanks
@tmjordan Unfortunately I didn't find any working solution. In the case that currently I am not using code-push for especially windows app, only for iOS/Android, I just removed this package from windows platform in react-native.config.js. And waiting for some new updates or whatever
There is no working solution as of now. we are also waiting for the same.
@vmoroz any update on this issue?
Any updates on this issue? Was investigating using Code Push on my team's RNW app but ran into this issue that seems like it's been ongoing for over a year?
any update on this issue?
the CodePushConfig
type does not have a constructor so an instance of it cannot be constructed. It looks like you are supposed to call the static methods on that type only, not construct an instance of it.
See example in https://github.com/microsoft/react-native-code-push/blob/master/Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/App.cpp#L79
I spent an hour or two with an engineer to take a closer look at this:
The header file tries to define a private static instance of this class: https://github.com/microsoft/react-native-code-push/blob/75785cbabcfa9b2934bdb2c6626cfe95ba5d4977/windows/CodePush/CodePushConfig.h#L50
Earlier in the file, there is a CodePushConfigT
template class that seems to be including some logic to allow for CodePushConfig
to be turned into a class to be instantiated.
https://github.com/microsoft/react-native-code-push/blob/75785cbabcfa9b2934bdb2c6626cfe95ba5d4977/windows/CodePush/CodePushConfig.h#L16
However, that template class is auto-generated and not included in the git repository, so I can't include here.
that's just the implementation (see the ::implementation
part of the namespace in line 14), so you're not supposed to use that; instead you should use the same type but without the ::implementation
namespace. See the example in https://github.com/microsoft/react-native-code-push/blob/master/Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/App.cpp#L79
I spent an hour or two with an engineer to take a closer look at this:
The header file tries to define a private static instance of this class:
Earlier in the file, there is a
CodePushConfigT
template class that seems to be including some logic to allow forCodePushConfig
to be turned into a class to be instantiated.However, that template class is auto-generated and not included in the git repository, so I can't include here.
@joshuayoes , it seems that the issue is related to the changes in our project templates that use C++/WinRT. We now prohibit instantiation of WinRT classes directly. They must be created with winrt::make
. I will see how to fix it here.
C++ code is fixed in this commit in my fork: https://github.com/vmoroz/react-native-code-push/commit/06ffaba9311557dfb68dcf5f65e637a504497d7f#diff-817e63f5b664a6f031d60feba3a721bbdab4fc21c058b8548faa485b5cfc523a I need to fix the example bundle creation before I can submit a PR.
Thank you so much for taking a look at this @vmoroz!
I bump to the same issue.
"react-native": "0.72.7", "react-native-code-push": "^8.1.1",
@vmoroz Was your PR sumitted and merged? When can I expect this issue to be resolved?
C++ code is fixed in this commit in my fork: vmoroz@06ffaba#diff-817e63f5b664a6f031d60feba3a721bbdab4fc21c058b8548faa485b5cfc523a I need to fix the example bundle creation before I can submit a PR.
thankyou i'll try that with your change
Problem Description
Hi Team,
I am working on code push for native windows app. I have done the initial set up for the project and got the app working fine in my local. But when I included the code push package, the app is not building.
Steps To Reproduce
1) npx react-native init
2) cd projectName
3) npx react-native-windows-init --overwrite --language cs
5) npm install react-native-code-push
6) npx react-native autolink-windows
7) npx react-native run-windows
Expected Results
The build should be success and the app should be launched fine.
CLI version
6.3.1
Environment
Target Platform Version
No response
Target Device(s)
Desktop
Visual Studio Version
Visual Studio 2022
Build Configuration
Debug
Snack, code example, screenshot, or link to a repository
No response