React Native White Screen on iOS Simulator - javascript

Up until recently, my app was running on iOS. I am now running into a white screen issue when running npx run-ios.
When running npx run-ios, the simulator starts up and builds the application, but Metro bundler says warn No apps connected. Sending "reload" to all React Native apps failed. Make sure your app is running in the simulator or on a phone connected via USB. on the terminal. Which is odd as the command itself opens the simulator and builds the application.
I am also unable to access the developer menu in both the terminal and on the simulator. So I can't access/edit bundler configs.
Things I've tried:
I've tried to delete the node_modules and run npm-install.
Deleting the Pods folder and Podfile.lock and then running pod install.
As I was working in a development branch, so I checked out to the main branch, which was working fine before, but the same issue persists, so I am doubtful that it's my code (I might be wrong however".
Doing Clear device and settingson the simulator.
Trying a different simulator.
I've seen on different similar posts that the simulator and my dev environment should be on the same network. However, this was never an issue before, and there is also no wifi edit function on the simulator.
Running the iOS application from Xcode instead

Related

expo react-native - disable timeout to metro in tunnel connection

My development environment is in ubuntu on wsl2 with vscode as editor running on windows using the remote wsl extension. I am running it on a physical android device using the Expo Go app using the tunnel connection on the same wifi network.
Everything works fine from scanning the QR Code to editing the code and it auto refreshes everytime I make changes on vscode. The problem is when I became idle(not making changes) for a short time, the connection somehow times out giving the error:
Cannot connect to Metro.
Cannot connect to Metro screenshot
What should be done here? How to disable the timeout if there's a way?

Can i make console logs visible in a cordova app running on an emulator?

Hello i'am currently building an app with cordova and the quasar framework.
I'm experiencing some problems in my android version running on an emulator that dont happen in my web version.
Is there a way to make the errors visible in some way or another.
Im using android studio as my emulator.
Open a chrome window on the same machine the emulator is running on. Navigation to chrome://inspect/#devices, you should be able to debug the emulator from there, giving you the full devtools, providing the APK is a dev build. This will not work for production builds.

nativescript 4.2. Error while building android app with release flag

I've done some app for IOS and Android.
IOS is working fine and it's poblished on App store since 3 weeks.
So, the time has come for android. I have to do some css tweaks, beacuse android was looking different in some aspects.
After when i did it, i run tns run android, next emulator appear.
All is working well, so i've run tests on Firebase console.
It was a suprise for me, beacuse i saw this error: (Emulator installed is launching app without issues.)
Nativescript fails to load code that holds common js functions.
Here is part of my app.js
And, right now i'm able to see this error in my emulator.
Steps to reproduce:
- run tns run android (app is working well)
- do some typo in any js file (make any error): livesync will run again, and as result i will see this error.
My question is: do android have problems with requiring this file? IOS is working very well, but i'm unable to deploy android.
Thank you.

Ionic run android not working

After pulling from the git repo after some time and few changes done by my colleagues, running app on my android device stopped working. I was able to run my app on my device before with usb debugging enabled, but now I get the following error after running the command ionic run android:
No target specified, deploying to emulator Error: No emulator images
(avds) found.
1. Download desired System Image by running: /Users/myUser/Library/Android/sdk/tools/android sdk
2. Create an AVD by running: /Users/myUser/Library/Android/sdk/tools/android avd HINT: For a
faster emulator, use an Intel System Image and install the HAXM device
driver
Go to the Android Studio open the AVD Manager then create AVD(if not yet created) and launch it in the emulator. Now execute the command ionic run android it will run correctly.
Possible duplicate of adb not finding my device / phone (MacOS X)
I had the same problem and can resolve this by restart my device and my Mac.

Running Meteor mobile app on physical Android device

I'm having an hard time trying to run my Meteor app on my Android device (LG G2).
I googled for answer and didn't find anything like what I encounter. I followed the instuction and everything went fine, added the Android platform to my project and ran it with meteor run android-device. The device LG G2 is plugged with a USB cable to the machine I'm building and running the app with, and the device has USB debugging enabled. Everything seem to be fine, my terminal indicates:
Started proxy.
Started app on Android Device.
I20150530-16:38:11.280(3)? - waiting for device -
Started MongoDB.
Started your app.
App running at: http://localhost:3000/
No error indication, nothing suspicous, but the app doesn't come up on the device. Nothing happens. Anyone has a clue? I tried to give my own IP and port to the command without a change.
You need to set the USB connexion on your android device as "camera". Whith my s4 mini I had the same symptoms and that was the solution.
I'll list what I've done to solve it, because it's a mix of all the solutions I got here.
I'm using Ubuntu, and LG G2 as device.
I created the /etc/udev/rules.d/51-android.rules. file with
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="1004", GROUP="plugdev" inside. (Detailed instructions here on step 3: http://developer.android.com/tools/device.html#setting-up, thank you #ChristianFritz). Pay attention that "1004" is the vendor
ID of LG.
I realised that for some reason I didn't have the ADB on my machine so I couldn't use adb devices and connect with my device. I followed this guide:
http://lifehacker.com/the-easiest-way-to-install-androids-adb-and-fastboot-to-1586992378 to install the missing ADB (linux section).
I got an error: adb server is out of date. killing... which terminated connection between the device to the machine, but after following #yoh advice, I changed my USB connection from MTP to PTP and tried again. This time worked.
Managed to run my app successfully on physical LG G2 after those steps using Ubuntu.

Categories