Site icon Techomoro

Common Errors I have faced During React Native App Development

Image is loading ...

We all know that React Native is one of the favorite frameworks of developers concentrated in mobile apps. I am also a big fan of React Native. But sometimes, it’s really annoying for me in getting errors during development. I even took more than 1 weak in searching for the correct solutions for the errors. Here I am sharing those errors and their solutions which make the job easier.

1. Unable to load script from assets index.android.bundle

You can see various solutions for this error online. The recommended solution for this error on StackOverflow is

(in project directory) mkdir android/app/src/main/assets

react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res

react-native run-android

Yes, it will solve your issue in some cases. But not in all cases.

The solution I recommend to you is the below one.

SOLUTION
In my case, this error is occurred because of the user limit on the total number of inotify watches was reached for the watchman. So the below steps solved my issue.

On terminal,

echo 999999 | sudo tee -a /proc/sys/fs/inotify/max_user_watches
echo 999999 | sudo tee -a /proc/sys/fs/inotify/max_queued_events
echo 999999 | sudo tee -a /proc/sys/fs/inotify/max_user_instances
watchman watch-del-all
watchman shutdown-server

You have to do this solution every time the error occurs.

 



Exit mobile version