Understanding "Application has not been registered" error - react-native

I've been given a new React Native app to maintain and whenever I build it or run it in the simulator, I get the "Application has not been registered" error. There are no other errors in the console before this message (although there are some warnings). I can't find any code issues as if the error message is dismissed in the simulator, the app runs fine so the bundler is running correctly, although on an actual device, this registers as a crash on open.
I'm running in the simulator using react-native run-ios from the project root. Builds for running on actual devices is managed by Fastlane.
My app doesn't make an explicit call AppRegistry.registerComponent due (I think) to the way react-native-navigation is set up, so most of the info online about this error doesn't apply.
Where should I go next to figure this out?

Related

Firebase Crash Reporting automatically generates reports for fatal errors in android phone but not for iPhones?

I have setup firebase in my react native app.
But currently exceptions are not handled means not added any crashlytics logs or recorded errors
But for android app I am getting crashes in firebase but not for IOS.
Can someone explain this in detail?
Crashlytics may only be able to upload the data once the app starts again. Did you restart the app?
This can happen if you are testing while the Xcode debugger is attached.
Check this document, it explains how to test this in iOS.
If that doesn't work, enable debug logging and check if something is causing issues. For this:
After enabling debug mode, run the app.
Then hit "stop" in Xcode.
Run the app in the device and crash it
Run the app again from Xcode
Collect the output from Xcode

Major issues trying to run react native, expo, vs code, android studio

I am brand new to React-Native and have been consistently having major issues getting things up and running. I am using VS Code, Expo, Chrome, and Android Studio. I have encountered at least a dozen major issues trying to get a simple "Hello World" app running and none of the solutions to the particular problems has really worked leading me to believe there is a bigger issue going on. I'll try to run through a few of the issues I've had so far but as I said I'm totally new to this so I can't really understand/remember every issue that has come up.
I have consistently had issues getting metro bundler/expo and the Android Virtual Devices connecting. Sometimes they work, but most of the time I get the warning message "Couldn't adb reverse: device 'adb' not found" followed by the error message "Couldn't start project on Android: Error running adb: device 'adb' not found." If the device does work, if I try to reload from the developer menu or debug from the developer menu, expo crashes on the virtual device. Often I get a blank white screen and the developer menu will no longer open. I've had occasional success stopping the virtual device, restarting it, closing all expo windows, and trying to "run on android" from metro bundler. When this doesn't work, I've tried wiping the virtual device. Sometimes this works. Most often I have to delete the device and create a new one.
When I tried to run the debugger in Chrome, the times it appeared to work, I got console screens that didn't match any guides I've found online. Trying to force errors to understand the Chrome debugger completely crashed the virtual device. Had to close VS Code, Chrome, and delete the virtual device to be able to even begin again.
When I tried to follow guides to debug in VS Code I couldn't get that to work either. Regardless if I put in break points or not when I tried to run "attach to packager" it wouldn't output anything but I could hear my machine running really hard and VS Code seemed like it was trying to do something. I would have to close VS Code to get it working again. The other issue I would get an error telling me that Packager was running outside of VS Code. I would try to close down Android Studio and restart and I would get the same error. One time I almost got it working but the virtual device completely crashed and started flashing a white screen and had to be deleted.
I've had tons of other random errors that have only happened once or twice including some warning message about the binary of the android devices being obsolete or something like that.
Anyone have any idea what could be causing all of this? I've been dealing with this for almost two weeks and it has become incredibly frustrating.

React Native App crashes if signed and released. Works fine in debug mode

React Native App crashes if signed and released. Works fine in debug mode. It doesn't throw any error in the screen. It simply crashes. When I looked at cat log. no error.
I also tried build apk with --info, but no additional info while crashing. I also tried building APK by setting minifyEnabled false.
When run the app in debug mode by connecting my phone via USB, it works.
I'm tried creating apk with --debug but I'm unable to install it my phone, it says parsing error when I try to install using app installer.
I got the following logcat errors. What does it mean?
09-03 11:03:07.968 W/ActivityManager(1344): Force finishing activity com.myapp/.MainActivity
09-03 11:03:08.012 W/BroadcastQueue(1344): Skipping deliver [background] BroadcastRecord{cb72147 u-1 android.net.conn.CONNECTIVITY_CHANGE} to ReceiverList{7bf2161 22421 com.myapp/10100/u0 remote:b9cdcc8}: process crashing
09-03 11:03:08.035 W/ActivityManager(1344): Dismiss app error dialog : com.myapp
09-03 11:03:13.095 I/WindowState(1344): WIN DEATH: Window{3f22c22 u0 /com.myapp.MainActivity}
I finally found the cause. There is module called react-native-material-design-searchbar which was causing the issue. The weird part is, if directly copy the SearchBar.js from that module and use it all works fine even in release, but if use module as direct import it's not working only in release mode. So weird. The SearchBar is good, so now I'm using directly by copying the file to my project.
I fixed this error by uninstalling uglifyjs and reinstalled the latest (using NPM).

iOS Simulator Crash Logs

When I use the iOS simulator and the app crashes, I can't find the crash logs. I've been looking all over the internets and can't figure out how to enable them. I know I can just run on an actual device and get the crash logs that way, but the bug I'm trying to fix right now tends to cause the program to be hung in the debugger. Then there's no qlaunchsuccess packet sending and it's a huge pain, especially when I have to run the program over and over. The only advice I've been able to find says the use CrashReporterPrefs, but a search of my hard drive reveals nothing named something even close to this. I've also dug into the package contents of XCode and the files of the iOS simulator. The iOS simulator has a crash logs folder, but it is empty. Anyone know how to get this working? Thanks.
Run your App with Xcode to install the App to iOS Simulator
Launch your App on Simulator without Xcode
reproduce steps for crash
the Crash log should show up under this directory
~/Library/Logs/DiagnosticReports/
It appears if you aren't running Xcode (mine is 4.5.2) but just the simulator (mine is 6.0) that when an app crashes it does save a crash report. To view it bring up the Application/Utilities/Console and
(1) make sure it shows the log list (see top left of console to make sure not hidden)
(2) under "DIAGNOSTIC AND USAGE INFORMATION" there is a "User Diagnostic Reports" that if you open up should have your crash reports
(3) the area on the right of the console has the log
A Crash log is just an output of what the debugger already gives you. When you are running in the simulator attached to the debugger, and you hit the crash, you can view the back trace information in the debug navigator (default key binding is cmd+5)

Cannot Install into iPhone Simulator

I've got an Xcode project that I've been working on over the past few weeks.
I just made some changes to an embedded framework that I'm working on (recompiled, to be specific) now, however, I am unable to launch the application in the simulator.
The app hangs on "Attaching to [app name]," if I have a debugger on. If I don't have a debugger on, Xcode just says the app has finished running.
There is no icon installed on the device.
Here's what I've done so far:
Restarted
Reset simulator
Clean and build
Deleted derrived data
I cannot install onto a device either, but then I get an error:
Error launching remote program: No such file or directory (/Users/peter/Library/Developer/Xcode/DerivedData/x-gtwuuwmavjonyrcxjmpcletdpyjw/Build/Products/Debug-iphoneos/x.app/x).
Oddly enough, what worked was installing another app in the sim (just launched another project and ran it) and then launching the other app in the sim.
I'm not sure what the issue was, but I tried it on two computers and it was hanging on each, so it was related to the project rather than the simulator. There's an issue to think about...