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:
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)