App being crashed after adding the react-native-jitsi-meet library - react-native

I'm trying to implement the video conference functionality by using the react-native-jitsi-meet library. But app is being crashed without showing any issue.
I have used added the package and implemented the android process for the react version > 0.60 as mentioned in the document(https://github.com/skrafft/react-native-jitsi-meet) unable to find the issue. Haven't added any code in the JS file too.
I have tried react-native-jitsi-meet module not found also but still the issue continues.

As it is specified in documentation we already changed the app.bundle as rename and it is bundling incorrectly so do this changes.
Remove the following file
android/app/src/main/assets/index.android.bundle
npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/app.bundle --assets-dest android/app/src/main/res/ && cd android && ./gradlew assembleDebug

Related

Metro bundler is not shown up after : npx react-native run-android

when I run my project I cannot see the bundler running, it just loads and builds successfully but then disconnects. what is the problem?
I recommend these steps:
make sure you have a compatible version of SDK build-tools, try to keep only one. (Also, SDK 11 might be better than SDK 14), Gradle version might have to be downgraded to 6.3, and start with Marshmellow (API 23), (that is what React Native page recommends).
Try this option if you cannot connect to the development server:
create assets folder if you cannot find it in:
cd android/app/src/main/assets
then cd to project folder and run:
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
some people say that react-native-cli might cause some issues, so try uninstalling it.

Why release build works differently than debug?

I built a new APK after I added react-redux and persist. The debug build is working perfect but the release one seems it didn't get the new code cause its working like before.
I'm not sure, why it's happening?. I tried ./gradlew clean too but it didn't help.
Delete the build folder from the android/app directory. Delete Node Modules and do a fresh install. If this does not work then run metro bundler using the below command.
react-native start --reset-cache
The solution was to run react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/ and then building the apk again

React Native using android emulator

I'am just starting with react native using Android emulator on windows. When I follow the react native getting started tutorial and run the app I see 'unable to load script from assets index.android.bundle' error and fixed it by following these steps as explained here :
(in project directory) mkdir android/app/src/main/assets react-native
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
This worked good - App.js renders ok, but I am now unable to see any changes made to the code in the emulator (I have tried running npm-start and react-native run-android but no luck). When I hit reload button in the emulator (RR) I see this error : error
I have also tried resetting cache(react-native start --reset-cache) and no luck.
How could I get my changes refreshed in the app please and fix this error? Thanks :)

Sourcemaps not working for React Native Android app in production

I using Sentry to log crashes in my app in production. The sourcemaps are working as expected for iOS app but for Android, I don't the actual file and line number at which the crash happened. The stack trace contains references to index.android.bundle. I use the following command to create the bundle and the map file
react-native bundle --dev false --platform android --entry-file index.android.js --bundle-output index.android.bundle --sourcemap-output index.android.map
I upload the bundle and map files to sentry using command
sentry-cli releases files 1.0.10 upload-sourcemaps --rewrite --url-prefix / ./
I wanted to ask whether anyone has been able to get the sourcemaps to work for Android using Sentry. Are there any other instructions that I need to follow to get the sourcemaps to work for Android app?
It should work if you just call ./gradlew assembleRelease if you are running the latest version of react-native-sentry.
As described here:
https://docs.sentry.io/clients/react-native/#android-specifics

React native building release isn't reflecting changes that debug does (android)

I made some styling changes to my react native app. Everything looks good in debug so I tried to run the release variant using 'react-native run-android --variant=release' and none of that changes in debug show up. I made sure I wasn't crazy and removed the background image. The release variant didn't change at all. I then tried generating the signed apk and installing it manually. Same thing.
I can't seem to find anything on google. Has anyone had this problem before or have suggestions on what to try? I've combed through all the config files and everything seems right. I know its hard without being able to look at the code but I can't share it since its for internal company use only.
For anyone still struggling with this, updating index.android.bundle usually solves this issue:
react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
1 - Perform adb reverse..check below got to platform-tools in cmd
C:\Users\username\AppData\Local\Android\Sdk\platform-tools --> adb reverse tcp:8081 tcp:8081
2 - Then delete any bundle file if present in assets folder
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
3 - run --> react-native run-android --variant=release
or react-native run-android