often when I have the Chrome Dev Tools open while developing React Native Android on my device, I get the following Error:
Did not get valid calls back from JS: [[],[],[],[],[]]
callFunction
ReactBridge.java:-2
run
CatalystInstanceImpl.java:203
...
Any idea whats wrong?
I'm using react-native v0.19 with a Nexus 5
This error should no longer be appearing as of React Native 0.23 when debugging with Chrome Dev Tools. The issue was the debugger returning "bogus values" to the app when it fails to handle a request. See this commit for the fix.
However, this error still sometimes occurs when debugging with Nuclide. Here is the issue I opened regarding that problem.
Either way, the app showing this error is just a symptom, where the real problem is that a request from the app to the debugger (in its role as the JS engine) couldn't be handled.
One specific reason I ran into was the Batched Bridge not being set, due to the debugger failing to load the JS app bundle (in my case this was caused by issues with the port at which it tried to fetch the bundle). However, there are probably many other reasons this might happen.
Related
While running VS Code Live Server (Go Live), the browser is crashing with the below mentioned error. I am using Google Chrome as default. I re-installed VS Code after uninstalling completely (from cache even), restarted browser, and then restarted PC as well with no use. When I checked "Use Local Ip" in LiveServer>Settings:, server is taking too long to respond and eventually fails to load the page (Error: "This site can't be reached"). Another important thing is that Chrome is opening every other website properly. This problem exists only when opening VS Code Live Server. Below is the error code:
Chrome Browser Error:
"Aw, Snap!
Something went wrong while displaying this webpage.
Error code: STATUS_BREAKPOINT"
Another popup is also showing up simultaneously:
"DevTools was disconnected from the page.
Once page is reloaded, DevTools will automatically reconnect."
(This didn't seem like a bug in the code of script.js)
Found the Solution:
Indeed it is a bug in the code of script.js.
If you are having exactly the same problem as I described, let us first see what we don't need to do, as I found these suggestions everywhere, and none will work when both VS Code and your browser are perfectly fine (they only appear to be not working):
No need to restart or reinstall VS Code.
No need to restart or reinstall browser.
No need to restart the PC
No need to disable browser extensions or VS Code extensions.
No need to change LiveServer Custom Browser; you can keep it
default.
No need to change LiveServer>Settings>Use local ip or Use browser
preview (you can keep them both unchecked if they are already
unchecked by default)
However, if you use firefox, console shows the error: "Uncaught out of memory"
Here, I got the first hint. Firefox at least told me to look at memory, but it is not about the memory we think. It is not about multiple tabs opened, lack of disk space, unstable disk, etc. It is the accidentally generated infinite loop in the code which is causing the memory problem (check your code carefully to find it).
In my case, I accidentally didn't tell it to execute the next iteration (i.e., missing counter update, increment, i++) and it is stuck in the same while loop forever, as the condition is satisfied forever without any counter update.
After fixing the code, the below error might show up in the console. Just refresh the page and it will go away.
"favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)"
Note: Unless you fix the code or comment it out, other linked files (like .html) in the folder wouldn't work either.
I'm logging JS client errors using Sentry and there's a lot of "TypeError: Load failed" errors. It's only occurring on iOS. I can't find anything on Google. Is this a native Javascript error or something else? What does it mean? This is separate from a seemingly related issue with "TypeError: cancelled".
Screenshot from Sentry of the breadcrumbs
From what I understand, the fetch API may deliberately return very limited error details on failure. (Otherwise, a malicious JS program could issue a variety of fetch requests and look at their results to identify which internal servers exist, which servers the user has access to, etc.)
If you have access to a Mac, you can see this for yourself by experimenting with fetch requests from the Safari DevTools console. For example:
The request for google.com fails due to CORS. The request for example.does-not-exist is an invalid name. The DevTools console gives full details, so a developer who's actually at the browser can troubleshoot, but those details aren't available to JS code; the JS code gets the same "TypeError: Load failed" message in each case.
If you're lucky enough to have a way to access the browser console, you can see more details, but otherwise, I'm not aware of anything you can do to track down the problem - it could presumably be virtually any network error.
Had the same problem, problems occured because of certificate and iphone took addres api as dangerous.
Helped me get into address api directly in safari or chrome for instance: https://my-adres-api/api/product and then choosing allow to connect with that address.
Now requests works excellent
In my case, this issue appeared mostly on iOS 15 in Safari. By debugging an iPhone through Mac I found that preload links with imagesrcset are not handled well in Safari (unless de-prioritized), throwing <link rel=preload> has an invalid imagesrcset value, as described in this question.
The reason why it looks like fetch error in Sentry is that preload link actually uses fetch under the hood.
Given it's just the image preload that is failing, and unless it's causing you performance problems, you can safely ignore this particular issue in Sentry until this webkit Bug 231150 - Safari complains about invalid imagesrcset value in where Chrome doesn't gets fixed.
I need to debug my Ionic React application on Android Emulator, but suddenly I cannot see the source file to debug it.
I cannot debug from bundled js, but the css files are fine tho.
It was not like this before, suddenly today it gives me this error, I cannot debug anything.
What can cause this errors? I cannot see the error message everywhere.
Please help.
I HAVE TRIED
I even try to revert to my last git commit when the error was not exist, apparently when I try to debug my last version, this error comes. I suppose there is something wrong with the chrome browser or maybe the Android Emulator.
UPDATE
I tried to remove my Android Emulator and re-created again, but the errors are still there.
I even tried to debug with Microsoft Edge in edge://inspect, there errors are still there.
I tried to open my other application coded in Ionic React, the application was deployed a long time ago without any of these errors, but now the errors are there.
I have no clue what is happening.
USING MOBILE PHONE WORKS
I tried to debug it in my mobile phone. It works there is no error. So I suppose there is a problem on Chrome to Android Emulator communication.
There really is a problem with my Android Emulator. I tried to create another emulator with different API Level. It works, I suppose removing the emulator from AVD Manager in Android Studio and re-create it, does not really reset the emulator.
My problematic emulator was in API 30 after I create API 29 and debug in it, it works fine.
I successfully run the react-native app and emulator also opended.
I'm also getting emulator loading message too
However After that it crashes and nothing display
And I'm getting an error when reload the bundle as below
I'm unable to figure out the issue since I'm a react-native beginner.
Appreciate your suggestions
It seems your emulator not connected to your react-native development server. Sometimes it happen, devices connected and somehow it lost connection with the development server. Try running adb devices command on your terminal to check is your emulator available and detected.
I know this is old but maybe this will help someone else.
This could be happening due to several reasons.
Check emulator is working or if its storage is full? wipe the data.
Syntax error could be because of this. please recheck latest changes files.
Personally, I was stuck due to a small comma error in my code.
I have an app built around Webview. It has three elements, one a direct link to a website the other two link to internal html files containing java script. The app has been downloaded over 1000 times over the last 2 years without a problem until recently a client reported the internal links threw up "File does not exist or cannot be opened" error.
He reported that the app worked previously on his lenovo device but after a failed upgrade and subsequent factory reset produced the error. Reinstall didn't work.
Is it program error or android issue? Is there a fix?
Yes I came to read that now webview got some authentication issue in loading https pages in latest releases especially when we use onReceivedError() method in it and handle some issue. But I am not 100% sure of it as I havent got this issue. So while using webview properly handle SSl certificate. This issue is occurring only in latest releases. This may fix your issues.