Running Meteor mobile app on physical Android device - javascript

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.

Related

React Native White Screen on iOS Simulator

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

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?

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.

Can't connect to local Node App

I just started with a little bit MEAN-Magic by following along this tutorial. It was working pretty good (installation and so on). Now I'm stuck at:
STEP 4: Creating an ExpressJS application
I executed express mytestapp, cd mytestapp, npm installand node app.jsand am able to see the folder structure in the Terminal, but if I open Safari with "http://localhost:3000" I get the message
Safari can't Connect To Server... Safari can't open the page "localhost:3000" because Safari can't connect to the server "localhost"
How can I troubleshoot this? I'm totally new to this. (Not sure if this matters, but I'm working from a mac at the moment).

Connection issue in MonkeyTalk IDE

I have installed monkey talk IDE to test the android apps and when I try to connect it to android emulator/tethred device, I got a warning
An internal error occurred during: "MonkeyTalk". Error starting adb:
Error running adb: D:\android_sdk (aspire921) on
aspire764\platform-tools\adb.exe forward tcp:16862 tcp:16862 error:
device not found
Your phone must be on the same WiFi network as your PC. The app must be running on the phone in order to connect. About your recording issues, I would have to have more information.
I forgot to check the important thing that both the device and pc would be in same WI-FI Network, while trying to execute monkey-talk enabled apps. Now the connection was set successfully to the device.

Categories