iOS Native Module - Invariant Violation: Native module cannot be null - ios

I have an issue with upgrading react-native version from 0.59.10 to 0.61.5. We are using our own native modules and it seems like to be problem with them. This problem I have only on iOS.
ERROR:
Invariant Violation: Native module cannot be null.
React Native version:
System:
OS: macOS 10.15.2
CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU # 2.30GHz
Memory: 70.44 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 11.5.0 - /usr/local/bin/node
Yarn: 1.12.3 - /usr/local/bin/yarn
npm: 6.12.0 - /usr/local/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
Android SDK:
API Levels: 27, 28, 29
Build Tools: 28.0.3, 29.0.0, 29.0.1, 29.0.2
System Images: android-26 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom
Android NDK: 20.0.5594570
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5791312
Xcode: 11.3/11C29 - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.5 => 0.61.5
npmGlobalPackages:
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
react-native: 0.61.5
GITHUB: https://github.com/facebook/react-native/issues/27975

Related

Automatic signing failed. Xcode failed to provision this target. Please file a bug report

Error: Xcode failed to provision this target. Please file a bug report at https://feedbackassitant.apple.com and include the Update Signing report from the report navigator.
After upgrade of Xcode, MacOS and React Native running the app on a connected real device using Xcode and local environment cannot be done because build process shows the above error.
Environment:
OS: macOS 13.1
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU # 2.30GHz
Memory: 33.82 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.10.0 - ~/.nvm/versions/node/v16.10.0/bin/node
Yarn: 1.22.18 - /usr/local/bin/yarn
npm: 7.24.0 - ~/.nvm/versions/node/v16.10.0/bin/npm
Watchman: 2022.03.21.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK:
API Levels: 26, 27, 28, 29, 30, 31, 32, 33
Build Tools: 27.0.3, 28.0.3, 29.0.0, 29.0.2, 29.0.3, 30.0.0, 30.0.2, 30.0.3, 31.0.0, 31.0.0, 32.0.0, 32.1.0, 33.0.0, 33.0.0, 33.0.0, 33.0.0, 33.0.1
System Images: android-26 | Intel x86 Atom_64, android-26 | Google Play Intel x86 Atom, android-27 | Intel x86 Atom_64, android-27 | Google Play Intel x86 Atom, android-28 | Intel x86 Atom, android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom, android-28 | Google X86_ARM Intel x86 Atom, android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom_64, android-29 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom_64, android-30 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom_64, android-30 | Google Play Intel x86 Atom, android-30 | Google Play Intel x86 Atom_64, android-31 | Intel x86 Atom_64, android-31 | Google APIs ARM 64 v8a, android-31 | Google APIs Intel x86 Atom_64, android-31 | Google Play ARM 64 v8a, android-31 | Google Play Intel x86 Atom_64, android-32 | Google APIs Intel x86 Atom_64, android-32 | Google Play Intel x86 Atom_64, android-33 | Google APIs Intel x86 Atom_64, android-33 | Google Play Intel x86 Atom_64
Short answer:
There was a problem with provisioning profiles of one of my project targets, <MyProjectName>Tests one. After react native and Xcode update it seems that there is a need for valid profiles for that target to. I removed that target because I don't need it and building and running on real connected devices work now.
Steps:
checked all the certificates
updated my provisioning profiles
checked signing for all targets
removed the test target because that required signing and another update of the provisioning profiles and I didn't need it
cleaned build folder and rebuilt

React native: error: TypeError: Cannot read properties of undefined (reading 'transformFile')

Can anyone guide me on following error,
at Bundler.transformFile (/Users/mobile-app/node_modules/metro/src/Bundler.js:48:30)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Object.transform (/Users/mobile-app/node_modules/metro/src/lib/transformHelpers.js:101:12)
at async processModule (/Users/mobile-app/node_modules/metro/src/DeltaBundler/traverseDependencies.js:137:18)
at async traverseDependenciesForSingleFile (/Users/mobile-app/node_modules/metro/src/DeltaBundler/traverseDependencies.js:131:3)
at async Promise.all (index 0)
at async DeltaBundler.buildGraph (/Users/mobile-app/node_modules/metro/src/DeltaBundler.js:50:5)
info Fetching system and libraries information...
System:
OS: macOS 12.2.1
CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU # 2.00GHz
Memory: 557.49 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
Yarn: Not Found
npm: 8.1.0 - ~/.nvm/versions/node/v16.13.0/bin/npm
Watchman: 2022.02.21.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
Android SDK:
API Levels: 23, 28, 29, 30, 32
Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.2, 30.0.3, 32.0.0, 32.1.0
System Images: android-29 | Intel x86 Atom_64, android-32 | Google APIs Intel x86 Atom_64
Android NDK: Not Found
IDEs:
Android Studio: 2021.1 AI-211.7628.21.2111.8139111
Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
Languages:
Java: 11.0.8 - /usr/bin/javac
npmPackages:
#react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.67.3 => 0.67.3
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
Adding #babel/preset-env to the package has finally fixed it. If deleting and re-installing node_modules didn't work, try this.
"devDependencies": {
"#babel/core": "^7.8.4",
"#babel/preset-env": "^7.16.11",
"#babel/runtime": "^7.8.4",
"#react-native-community/eslint-config": "^0.0.7",
"babel-jest": "^25.1.0",
"eslint": "^6.8.0",
"jest": "^25.1.0",
"metro-react-native-babel-preset": "0.69.0",
"react-test-renderer": "16.9.0"
},
Thanks

New expo init bare project not building for iOS

Started by using expo init app and used bare-minimum typescript template, the app is not building using react-native run-ios, but works if expo start in the Expo-go app.
here is the error code:
info Installing "/Users/mac/Library/Developer/Xcode/DerivedData/myproject-ccluoxcwmsrveqavqitrwaszccss/Build/Products/Debug-iphonesimulator/myproject"
An error was encountered processing the command (domain=IXUserPresentableErrorDomain, code=1):
This app could not be installed at this time.
Could not install at this time.
Failed to chmod /Users/mac/Library/Developer/CoreSimulator/Devices/2D6990A9-04F6-4391-BFA3-BFF2AA6890A5/data/Bundle/Application/2B342978-B520-410C-ABB0-F5961248B7BF/myproject.app/myproject : No such file or directory
Underlying error (domain=MIInstallerErrorDomain, code=4):
Failed to chmod /Users/mac/Library/Developer/CoreSimulator/Devices/2D6990A9-04F6-4391-BFA3-BFF2AA6890A5/data/Bundle/Application/2B342978-B520-410C-ABB0-F5961248B7BF/myproject.app/myproject : No such file or directory
info Launching "org.name.myproject"
error Failed to launch the app on simulator, An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=1):
The request to open "org.name.myproject" failed.
The request was denied by service delegate (SBMainWorkspace) for reason: NotFound ("Application "org.name. myproject" is unknown to FrontBoard").
Underlying error (domain=FBSOpenApplicationErrorDomain, code=4):
The operation couldn’t be completed. Application "org.name.myproject" is unknown to FrontBoard.
Application "org.name.myproject" is unknown to FrontBoard.
When app is launched in Xcode the build is successful but the app don't load on simulator and I get this error message:
the config:
Expo CLI 4.1.6 environment info:
System:
OS: macOS 11.0.1
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.15.5 - ~/.nvm/versions/node/v14.15.5/bin/node
Yarn: 1.22.0 - /usr/local/bin/yarn
npm: 6.14.11 - ~/.nvm/versions/node/v14.15.5/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.9.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 13.7, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
Android SDK:
API Levels: 23, 24, 27, 28, 29
Build Tools: 23.0.1, 27.0.3, 28.0.2, 28.0.3, 29.0.2
System Images: android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom
IDEs:
Xcode: 11.7/11E801a - /usr/bin/xcodebuild
npmPackages:
expo: ~40.0.0 => 40.0.1
react: 16.13.1 => 16.13.1
react-dom: 16.13.1 => 16.13.1
react-native: ~0.63.4 => 0.63.4
react-native-web: ~0.13.12 => 0.13.18
Expo Workflow: bare

com.facebook.react.JavaScript (17): EXC_BAD_ACCESS (code=1, address=0xda9bf7c08)

Environment:
OS: macOS Sierra 10.12.6
Xcode: Xcode 9.2 Build version 9C40b
Node: 6.11.1
npm: 3.10.10
Watchman: 4.9.0
react-native-cli: 2.0.1
Description:
When I run my code the app gets crashes in this line context = [JSC_JSContext(contextRef) contextWithJSGlobalContextRef:contextRef] which is from /Users/mac1/Documents/test/project/node_modules/react-native/React/Executors/RCTJSCExecutor.mm. Can anyone help me with this issue???
I have attached the crashlytics log with this.
https://www.dropbox.com/s/nz00ys2reh69k4w/crashlytics_log.txt?dl=0

Xamarin iOS Error initialized task IBTool

I can't run any project for iOS in Xamarin, It shows me the following error "Error Initialized task IBTool: Not registered task IBToll", how I can resolve this error?
I use Xamarin Studio 5.9.4, XCode 5.0, Xamarin Ios 8.10.3.2 (Business Edition) and S.O Mac Os X 10.9.5
I hope you can help me
UPGRADE
=== Xamarin Studio ===
Version 5.9.4 (build 5)
Installation UUID: 616c0f77-e96a-4f5d-a6f7-c303c7e143c3
Runtime:
Mono 4.0.2 ((detached/c99aa0c)
GTK+ 2.24.23 (Raleigh theme)
Package version: 400020005
=== Xamarin.Android ===
Version: 5.1.4.16 (Business Edition)
Android SDK: /Users/student/Library/Developer/Xamarin/android-sdk-mac_x86
Supported Android versions:
2.3 (API level 10)
4.0.3 (API level 15)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
=== Xamarin Android Player ===
Not Installed
=== Apple Developer Tools ===
Xcode 5.0 (3332.22)
Build 5A1412
=== Xamarin.iOS ===
Version: 8.10.3.2 (Business Edition)
Hash: 8b265d6
Branch: master
Build date: 2015-06-30 15:19:13-0400
=== Xamarin.Mac ===
Not Installed
=== Build Information ===
Release ID: 509040005
Git revision: 8010a90f6e246b32364e3fb46ef2c9d1be9c9a2b
Build date: 2015-06-08 16:52:06-04
Xamarin addins: 7e93e9c3503f28770f23ce1b7eafd829919f18e8
=== Operating System ===
Mac OS X 10.9.5
Darwin Students-Mac.local 13.4.0 Darwin Kernel Version 13.4.0
Sun Aug 17 19:50:11 PDT 2014
root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64

Resources