I have a problem, while running a react native application on an android device, my application works perfectly but when i debug it remotely, it shows this error.
I have a second terminal running with react-native start(also tried with npm start) a new chrome tab also gets open in my browser but it shows that error is related to debuggerWorker.js.
I cant understand whats happening, any help will be highly appreciated!!!
Environment: OS: Linux 4.15 Node: 10.0.0 Yarn: Not Found npm: 6.0.0 Watchman: 4.7.0Xcode: N/A Android Studio: 3.1 AI-173.4819257 Packages: (wanted => installed) react: 16.3.1 => 16.3.1 react-native: 0.55.4 =>
Related
I am working on a react native expo project. I was running expo start with no problem until I updated my MacBook. Now, I am facing this error:
Could not get status from Metro bundler. Connect ECONNREFUSED 127.0.0.1:19003
Connecting to Metro bundler failed.
My expo diagnostics is as below:
Expo CLI 3.22.3 environment info:
System:
OS: macOS 10.15.5
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.18.3 - /usr/local/bin/node
npm: 6.14.6 - /usr/local/bin/npm
IDEs:
Android Studio: 3.6 AI-192.7142.36.36.6200805
Xcode: 11.6/11E708 - /usr/bin/xcodebuild
npmPackages:
expo: ^38.0.0 => 38.0.8
react: 16.11.0 => 16.11.0
react-dom: 16.11.0 => 16.11.0
react-native: https://github.com/expo/react-native/archive/sdk-38.0.2.tar.gz =>
0.62.2
react-native-web: ~0.11.7 => 0.11.7
npmGlobalPackages:
expo-cli: 3.22.3
Ciao, according to this github page, you can:
Restart your computer
Run rm -rf .expo
Instead, according to Expo forum you can try to launch expo start with -c like expo start -c
I am running a simple test to render react native component using enzyme and jest. It's a monorepo setup using lerna for web and mobile with shared components. There is babel, jest config that's shared between packages. The app starts and works successfully using the component that I am testing without any warnings or errors. But for some weird reason when I run a test, I am getting this error
● Test suite failed to run
TypeError: Cannot read property 'customBubblingEventTypes' of undefined
at node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:2357:8
at Object. (node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:17:3)
at Object. (node_modules/react-native/Libraries/Renderer/shims/ReactNative.js:18:17)
This is the info from react-native info command.
info Fetching system and libraries information...
System:
OS: macOS 10.15.3
CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU # 2.30GHz
Memory: 377.90 MB / 8.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.16.0 - ~/.nvm/versions/node/v12.16.0/bin/node
Yarn: Not Found
npm: 6.13.4 - ~/.nvm/versions/node/v12.16.0/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.9.1 - /Users/amal/.rvm/gems/ruby-2.3.1/bin/pod
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
Build Tools: 27.0.3, 28.0.3
Android NDK: Not Found
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5692245
Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_202 - /usr/bin/javac
Python: 2.7.17 - /usr/local/bin/python
npmPackages:
#react-native-community/cli: Not Found
react: Not Found
react-native: 0.63.0 => 0.63.0
npmGlobalPackages:
*react-native*: Not Found
react and #react-native-community/cli is installed in root node-modules as hoisted by lerna in monorepo. maybe that's why the cli says it's not found.
This is a new react native setup with only the babel and shared node_modules as customised changes code. Only the test fails and it would be great if somebody can give insights. Thanks in advance.
This error was related to enzyme and not react native. It looks like though the enzyme website says it can be made to work with react-native, when using other packages like styled-components it never works. https://github.com/enzymejs/enzyme/issues/1436 - In case anyone is interested to follow the conversation in enzyme repo.
I used https://github.com/callstack/react-native-testing-library instead of enzyme for testing react native and it works smoothly!
I was using expo for some days. And after startups it always shown the Tunnel ready message as it should. I use expo-cli globally.
Somehow from today on that message does not appear anymore. It's not only the message. The Metro tunnel is actually not available.
Here the expo diagnostics:
Expo CLI 3.21.3 environment info:
System:
OS: Windows 10 10.0.18363
Binaries:
Node: 12.16.3 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.4 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.14.4 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 4.0.0.0 AI-193.6911.18.40.6514223
npmPackages:
expo: ^37.0.12 => 37.0.12
react: 16.13.1 => 16.13.1
react-dom: 16.13.1 => 16.13.1
react-native: https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz => 0.61.4
react-native-web: ~0.11.7 => 0.11.7
This is what Expo log tells me:
There is nothing else happening. Even when I wait for a long time. No error or warning.
Maybe I use a buggy version of Expo? I also tried the latest version of expo without any change. And I completely deleted the node_modules folder completely. But no change. Also I was thinking about Windows blocking the 19001 port, so I restarted the PC. Not no change as well.
What could be the reason?
Hint: there is another very similar issue: Expo Tunnel not starting but actually in my case I not even get the error message which is even more strange
Tunnel support has to be installed in the local machine.
Go to the Left-hand side of the metro bundler web UI, and click on Tunnel. This should install the tunnel.
just try disable windows firewall.
Actually deploying to web and to Android still works. It's really just the message that is not printed out anymore. So maybe the expo version has updated and now does not print the
Tunnel ready
message anymore.
I have tried to create a new project in react-native, After creating when I have opened the iOS project, in libraries folder I could not any libraries and i am not able to run the iOS Project.
I have tried react-native run-ios
Got error like "error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening AppName.xcodeproj."
Steps To Reproduce
Lis
cd AppName
open ios/AppName.xcodeproj inxcode and build.
react-native init AppName
I have tried to create multiple projects, but still no luck of getting libraries
react-native info logs
System:
OS: macOS 10.14.5
Binaries:
Node: 11.3.0 - /usr/local/bin/node
Yarn: 1.5.1 - /usr/local/bin/yarn
npm: 6.11.3 - /usr/local/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5692245
Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.6 => 16.8.6
react-native: 0.60.5 => 0.60.5
npmGlobalPackages:
react-native-cli: 2.0.1
I have fixed the issue, by searching over SO and found a solution
In React-native 0.60 +, you need to install pods
Step1: cd ios
Step2: pod install
Step3: pod update
After completion you can run.
I am getting a network request failed only for iOS. Android seems fine.
Environment:
OS: macOS High Sierra 10.13.3
Node: 9.4.0
Yarn: 1.3.2
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.3 Build version 9E145
Android Studio: 3.0 AI-171.4443003
Packages:
react: 16.3.1 => 16.3.1
react-native: 0.55.1 => 0.55.1
Error Message:
Network Request Failed
Please help me, not sure what is the issue. I have tried to update the NSAppTransportSecurity on Info.plist. Nothing worked. Any help would be apprecieated.
Allow Arbitrary Loads YES in App Transport Security Settings in Info.plist file of your project