How can I see an actual error from server (react native)? - 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.

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 Network Request Failed randomly (HTTPS + URL)

So I have this strange error with React Native, where randomly network requests hangs.
This can be provoked by either listening to a remote audio file, or creating a new user and logging into the app.
This is an issue for all React Native versions at least over 0.59 (havent tested below that).
So to give a bit of background:
When I navigate to a new tab, I load data for that tab. Randomly it will just hang, and give a Network Request Failed with no further information. Once that arrives, and I navigate from and back to the screen it starts working again, until a couple minutes later where it will randomly hang one request.
Tried putting an aggressive timeout on it to provoke an early escape, but seems the native layer has to throw a Network Request Failed for it to start working again.
I've been biting nails for weeks trying to debug this issue, as it's limiting the release of the application.

React native - console logging with remote debugging

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.

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

Play Framework:#6ddhe2a72 - Internal server error, for (GET) [/tasks]

I have followed the PlayFramework 2.1's tutorial and when I was running the application ,the index page shows normally,but when I click the Button "Create" to create the task,it didn't work,and the console shown that #6ddhe2a72 - Internal server error, for (GET) [/tasks].
I'm puzzled now.
Please help me.
You should run playframework in development mode to see the full error. We cannot help you without that.
Instead of play start, simply launch play run (read this page for more details)
You could also see the stacktrace in the file log/application.log.