I have been trying to make a simple test app using react native but I am getting this
Sometimes the app runs without any error but again after sometime this error pops up so cam someone please help me. Thank You!!
This is my console output:
image
And this is what I am getting in android studio logcat:
12-04 18:19:42.856 4147-4163/com.album E/unknown:ReactNative: Unable to download JS bundle
com.facebook.react.common.DebugServerException: The development server returned response error code: 500
URL: http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false
Body:
{"type":"InternalError","errors":[],"message":"Metro Bundler has encountered an internal error, please check your terminal error output for more details"}
at com.facebook.react.devsupport.BundleDownloader.processBundleResult(BundleDownloader.java:225)
at com.facebook.react.devsupport.BundleDownloader.access$100(BundleDownloader.java:40)
at com.facebook.react.devsupport.BundleDownloader$1.onResponse(BundleDownloader.java:192)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:135)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
12-04 18:19:42.899 4147-4164/com.album E/Surface: getSlotFromBufferLocked: unknown buffer: 0xb407eec0
12-04 18:19:42.902 4147-4147/com.album E/unknown:ReactNative: Exception in native call
com.facebook.react.common.DebugServerException: The development server returned response error code: 500
URL: http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false
Body:
{"type":"InternalError","errors":[],"message":"Metro Bundler has encountered an internal error, please check your terminal error output for more details"}
at com.facebook.react.devsupport.BundleDownloader.processBundleResult(BundleDownloader.java:225)
at com.facebook.react.devsupport.BundleDownloader.access$100(BundleDownloader.java:40)
at com.facebook.react.devsupport.BundleDownloader$1.onResponse(BundleDownloader.java:192)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:135)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Localization is locating a character or restricting it to a particular place. In the case of application development, it is about developing the application according to the local language. For Localization, we will use the LocalizedStrings component of the react-native-localization library.
I restarted my laptop and it worked for me.
I am not saying this is the correct solution but it worked for me.
Sometimes this error can occur because the application cache needs to be cleaned.
You could try to get into the Android folder in the react-native project directory and run this command:gradlew clean
then go back to react-native root folder and try to run android emulator react-native run-android
. Also you could try react-native start --reset-cache
.
Just try this line of code in your terminal
Try this
1.sudo lsof -i :<Your port>
2.Run sudo kill -9 <PID>
3.Run application again
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With