React native - console logging with remote debugging - react-native

Tried to do a bit of research without finding a result, however:
I am connecting to my development server over the same wifi network and using hot reloading to update react native Application on physical device, however I can’t seem to find a way to display the console output like I normally would through the temrinal. Normally I would build my app with physical cable and display log through the console and use react-native log-android.
What’s the way to show console logging when connecting wirelessly?
TIA.

have you tried the option Debug Js remotely, which opens a new tab in the browser and from there if you press f12 and go to developer tools ,in the console tab there you can view all the console log statements. And to start Debug Js remotely, you shake the phone and the option will be displayed. I hope it helps.

Related

automate electron based desktop app using testcafe not working

i am trying to automate tests for 'lens' electron based desktop application.i was following this link enter link description here to setup the test for electron app.This link expects a 'mainwindowurl' but application doesn't have any main page, but testcafe give suggestion of the mainwindowurl as an error so tried it works but am not convinced with the suggrstion urls ,but same way want to give fixture page url on the test what should be the url should i need to give? then have got one more error ERROR Unable to establish one or more of the specified browser connections. This can be caused by network issues or remote device failure.Please can you guys suggest what to do?
Each and every Electron application has to navigate to a page after opening a window.
I guess that the mentioned Lens app is an Kubernetes IDE: https://github.com/lensapp/lens.
This app uses the BrowserWindow.loadURL function to navigate to the main page:
https://github.com/lensapp/lens/blob/a61425124f18b1cc2d8a507084a472029acc3e6b/src/main/window-manager.ts#L101.
Digging the code a bit more, I found that the main window URL is just localhost with some port:
https://github.com/lensapp/lens/blob/a61425124f18b1cc2d8a507084a472029acc3e6b/src/main/window-manager.ts#L33.
I guess it is possible to determine or set the port number by looking at the code a bit more or asking Lens developers about it.

React Native Debugger prevents network requests

I'm working on a React Native app, testing in an android emulator. I've used the standalone React Native Debugger app as well as the debugger that opens in Chrome. In the Chrome window, the Network tab shows no activity, so that's no help. In the standalone debugger, the same is true until you right-click and choose Enable Network Inspect. The problem I'm having is that after I enable network inspecting in the debugger, all network requests fail - the inspector shows their status going from Pending to Canceled after a few seconds. I can see in my server logs that no requests are coming in. It's like debugger itself is somehow blocking the requests.
I've set up adb to run as root. When I run react-native run-android the output includes Running adb -s emulator-5554 reverse tcp:8081 tcp:8081, so I think things are starting up fine. The network requests from the app (login etc.) work fine (a typical URL would be http://10.0.2.2:2080/api/LoginScreenController/GetIdentityStatus), until I choose "enable network inspect" in the debugger, at which point all network requests fail as described above.
Any suggestions would be appreciated.
I know that I'm too late but perhaps it will save time for somebody.
During the update of the react-native, I did update the version of the react-native-reanimated from v1 => v2, and after it, I faced the same behavior.
Version 2 requires to enable Hermes engine if it won't be enabled then all the requests will be in pending status

How can I see an actual error from server (react native)?

I send a request:
And get an error:
How can I see details of this error?
You can use the debugger to look at all of your Network requests.
The answer to this question will allow you to view your requests.
(Assuming you're on iOS) - Once you've added the code and your application is running, click on Hardware > Shake Gesture and then select Debug JS Remotely.
Once the debugger opens, you should start to see your requests on the Network tab.

How can I view a ChromeOS App crash log / report?

I have a ChromeOS App that runs well on my PC (windows 10) but it crashes when it runs on a Chromebit.
How can I see the app crash log on Chrome OS?
thanks in advance!
look in chrome://crashes to see if there's anything useful in there. if not, the app crashing isn't generating any logs to disk for you to browse.
sometimes you can get info via the debug console -- go to chrome://extensions, check the developer mode box, and find the app you care about. see if it has a background page which you can inspect -- click the link and it should pop up a console. then try launching the app.

can't able to run react-native app in Android device

hai every one i am trying to run the react-native android app in device then it throws an error like as mentioned below
can any one please give me suggestions for how to solve this error,Any help much appreciated
Try following the steps on the guide page.
You may have to set the address of your dev server.
Configure your app to connect to the local dev server via Wi-Fi
Make sure your laptop and your phone are on the same Wi-Fi network.
Open your React Native app on your device. You can do this the same way you'd open any other app.
You'll see a red screen with an error. This is OK. The following steps will fix that.
Open the Developer menu by shaking the device or running adb shell input keyevent 82 from the command line.
Go to Dev Settings.
Go to Debug server host for device.
Type in your machine's IP address and the port of the local dev server (e.g. 10.0.1.1:8081). On Mac, you can find the IP address in System Preferences / Network. On Windows, open the command prompt and type ipconfig to find your machine's IP address (more info).
Go back to the Developer menu and select Reload JS.