Closed gunti96 closed 2 weeks ago
Hi @gunti96
Can you please confirm whether you have enabled the new architecture option for React-Native 74?
At present we are seeing issues with this configuration due to changes introduced that alter the native bridge between the JS layer and Android layer when the new architecture option is enabled. We are investigating this issue and will be sure to keep you informed of any updates.
Hi @clr182 , thanks for your response. I can confirm that the new architecture is not enabled for this project.
Hi @gunti96
Thanks for your patience here.
After looking through this issue again, I believe there's a chance this is being caused by using an outdated version of the BugSnag React Native SDK. You mention using v7.22.3, but support for RN 73 was added in v7.22.4. As you do not have the new architecture enabled and have recently upgraded, I'd assume this is the issue.
Can you confirm whether you were using a RN version below 73 prior to this upgrade? Are you able to upgrade to a newer version of @bugsnag/react-native
and let us know whether this fixes the issue?
Hi @mclack
Thanks for your response. Just tried with the latest versions:
"@bugsnag/react-native": "^7.23.0",
"@bugsnag/react-native-performance": "^2.6.0",
and unfortunately similar error is thrown for the android build:
/path/node_modules/@react-native/codegen/lib/cli/combine/combine-js-to-schema-cli.js:62
.parseSync();
^
TypeError: yargs.option(...).option(...).parseSync is not a function
at Object.<anonymous> (/path/node_modules/@react-native/codegen/lib/cli/combine/combine-js-to-schema-cli.js:62:4)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
at node:internal/main/run_main_module:28:49
Node.js v21.1.0
As mentioned above, if I just uninstall the performance library then the build succeeds
Hi @gunti96
Thanks for sharing that with us.
We've added a task to our backlog to investigate this issue further. We'll make sure to post any updates on this thread.
Hi @gunti96,
We haven't been able to reproduce this on a fresh 0.74 project, either on old or new architecture.
It seems like this is an issue with codegen and yargs, and not just related to BugSnag - please see https://github.com/expo/expo/issues/28494#issuecomment-2081770811
I'm going to close this as I don't think it's an issue with @bugsnag/react-native-performance
- but if the linked solution above doesn't work and you're able to provide a reproduction example then we'd be happy to reopen and try to investigate further.
Hi @yousif-bugsnag, It seems that the linked solution doesn't work after a fresh install, but will try to investigate more in-depth and maybe provide an example if possible.
EDIT:
It seems to work by also installing yargs
into the project using npm i -D yargs
.
Thanks for your patience!
Describe the bug
@bugsnag/react-native-performance
package, the build works successfully.Steps to reproduce
npm install --save @bugsnag/react-native-performance react-native-file-access @react-native-community/netinfo
Environment
"@bugsnag/react-native-performance": "^2.5.0"
"@bugsnag/react-native": "^7.22.3"