calling a method in a smali file using ApplicationContext - applicationcontext

I want to call a method using p0 ApplicationContext:Landroid/content/Context.
How can I get the ApplicationContext for the class?
I tried calling my method from the init method of the class in order to copy p0, but android failed to verify the class with this.
Any ideas? I will provide more detail if required.
#JesusFreke : More info
1 EDITED CRASH
10-06 15:43:48.081 14308 14557 E AndroidRuntime: FATAL EXCEPTION: WFSync
10-06 15:43:48.081 14308 14557 E AndroidRuntime: Process: com.zynga.words3, PID: 14308
10-06 15:43:48.081 14308 14557 E AndroidRuntime: java.lang.VerifyError: Verifier rejected class com.zynga.wfframework.appmodel.game.GameCenter$6: void com.zynga.wfframework.appmodel.game.GameCenter$6.<init>(com.zynga.wfframework.appmodel.game.GameCenter, android.content.Context, com.zynga.wfframework.appmodel.AppModelCallback, java.util.Date, long, java.util.Date, long, com.zynga.wfframework.remoteservice.IRemoteService$PollType, com.zynga.wfframework.appmodel.sync.SyncService$SyncServicePollType, android.content.Intent, int) failed to verify: void com.zynga.wfframework.appmodel.game.GameCenter$6.<init>(com.zynga.wfframework.appmodel.game.GameCenter, android.content.Context, com.zynga.wfframework.appmodel.AppModelCallback, java.util.Date, long, java.util.Date, long, com.zynga.wfframework.remoteservice.IRemoteService$PollType, com.zynga.wfframework.appmodel.sync.SyncService$SyncServicePollType, android.content.Intent, int):
[0x41] 'this' arg must be initialized
(declaration of 'com.zynga.wfframework.appmodel.game.GameCenter$6' appears in /data/app/com.zynga.words3-2/base.apk:classes3.dex)
10-06 15:43:48.081 14308 14557 E AndroidRuntime: at com.zynga.wfframework.appmodel.game.GameCenter.refreshState(SourceFile:1201)
10-06 15:43:48.081 14308 14557 E AndroidRuntime: at com.zynga.wfframework.appmodel.game.GameCenter.refreshState(SourceFile:1144)
10-06 15:43:48.081 14308 14557 E AndroidRuntime: at com.zynga.wfframework.appmodel.sync.SyncService$1.run(SourceFile:189)
10-06 15:43:48.081 14308 14557 E AndroidRuntime: at java.lang.Thread.run(Thread.java:761)
2 PARTIAL CODE
.method constructor <init>(Lcom/zynga/wfframework/appmodel/game/GameCenter;Landroid/content/Context;Lcom/zynga/wfframework/appmodel/AppModelCallback;Ljava/util/Date;JLjava/util/Date;JLcom/zynga/wfframework/remoteservice/IRemoteService$PollType;Lcom/zynga/wfframework/appmodel/sync/SyncService$SyncServicePollType;Landroid/content/Intent;I)V
.registers 16
...
##41
#v0=(Reference,Lcom/zynga/wfframework/remoteservice/RemoteServiceSyncResult;);v1=(Null);p0=(UninitThis,Lcom/zynga/wfframework/appmodel/game/GameCenter$6;);
invoke-virtual {p0, v1, v0}, Lcom/zynga/wfframework/appmodel/game/GameCenter$6;->onPostExecute(ILcom/zynga/wfframework/remoteservice/RemoteServiceSyncResult;)V
Why is p0 not initialised? What can I do to catch it initialised?
Hope you can help. By the way, I fixed the problem in another way, but this relies on an error method in the class being called. I would prefer to find another solution.

In a constructor, the this argument (p0) starts out as uninitialized, and it can't be used until it has been initialized. You must call the superclass's <init> method to initialize it.
e.g. if the super class is Lcom/some/superclass;, and it has a no-args constructor, you would need to add
invoke-direct {p0}, Lcom/some/superclass;-><init>()V
at some point before you try to use p0.
Assuming you're starting out with a working method to begin with, the constructor should already have such an instruction. In which case, you just need to move your method call after it.

Related

Caused by: com.google.firebase.database.DatabaseException:

E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.poster, PID: 23677
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.poster/com.example.poster.MainActivity}: com.google.firebase.database.DatabaseException: Failed to get FirebaseDatabase instance: Specify DatabaseURL within FirebaseApp or from your getInstance() call.
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2984)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3045)
at android.app.ActivityThread.-wrap14(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1642)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6776)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1496)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1386)
Caused by: com.google.firebase.database.DatabaseException: Failed to get FirebaseDatabase instance: Specify DatabaseURL within FirebaseApp or from your getInstance() call.
at com.google.firebase.database.FirebaseDatabase.getInstance(com.google.firebase:firebase-database##16.0.4:114)
at com.google.firebase.database.FirebaseDatabase.getInstance(com.google.firebase:firebase-database##16.0.4:71)
at com.example.poster.MainActivity.onCreate(MainActivity.java:48)
at android.app.Activity.performCreate(Activity.java:6955)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1126)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2927)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3045) 
at android.app.ActivityThread.-wrap14(ActivityThread.java) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1642) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:154) 
at android.app.ActivityThread.main(ActivityThread.java:6776) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1496) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1386) 
add these dipendencies for java
implementation platform('com.google.firebase:firebase-bom:28.4.2')
implementation 'com.google.firebase:firebase-database'
for kotlin
implementation platform('com.google.firebase:firebase-bom:28.4.2')
implementation 'com.google.firebase:firebase-database-ktx'
then if using instance outside us1 for the database add url
FirebaseDatabase database = FirebaseDatabase.getInstance("**url here**);
DatabaseReference myRef = database.getReference("**path here**");

react native development build working, but release apk crashes after login

I am using react native version 0.61.5 My application works fine in development build but when i create a release (signed) apk, it crashes after login. I have already created a logcat file, in logcat it shows error
04-24 20:13:26.448 24977 25054 E AndroidRuntime: Process: com.reactnativestarter, PID: 24977
04-24 20:13:26.448 24977 25054 E AndroidRuntime: com.facebook.react.common.JavascriptException: TypeError: undefined is not a function, js engine: hermes, stack:
04-24 20:13:26.448 24977 25054 E AndroidRuntime: anonymous (address at#1:479896
04-24 20:13:26.448 24977 25054 E AndroidRuntime: apply#-1
04-24 20:13:26.448 24977 25054 E AndroidRuntime: value (address at#1:81355
04-24 20:13:26.448 24977 25054 E AndroidRuntime: apply#-1
04-24 20:13:26.448 24977 25054 E AndroidRuntime: value (address at#1:76764
04-24 20:13:26.448 24977 25054 E AndroidRuntime: anonymous (address at#1:75185
04-24 20:13:26.448 24977 25054 E AndroidRuntime: value (address at#1:76361
04-24 20:13:26.448 24977 25054 E AndroidRuntime: value (address at#1:75143
04-24 20:13:26.448 24977 25054 E AndroidRuntime:
04-24 20:13:26.448 24977 25054 E AndroidRuntime: at com.facebook.react.modules.core.ExceptionsManagerModule.reportException(ExceptionsManagerModule.java:71)
04-24 20:13:26.448 24977 25054 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
04-24 20:13:26.448 24977 25054 E AndroidRuntime: at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:371)
04-24 20:13:26.448 24977 25054 E AndroidRuntime: at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:150)
04-24 20:13:26.448 24977 25054 E AndroidRuntime: at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
04-24 20:13:26.448 24977 25054 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:873)
04-24 20:13:26.448 24977 25054 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
04-24 20:13:26.448 24977 25054 E AndroidRuntime: at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:26)
04-24 20:13:26.448 24977 25054 E AndroidRuntime: at android.os.Looper.loop(Looper.java:214)
04-24 20:13:26.448 24977 25054 E AndroidRuntime: at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:225)
04-24 20:13:26.448 24977 25054 E AndroidRuntime: at java.lang.Thread.run(Thread.java:764)
already tried to set this false def enableProguardInReleaseBuilds = false but didn't work.
I also tried to disable Hermes but didn't work. Please help!
probably you have an error in that component please recheck your login

Can't run my app with -variant=release, crashes immediately

I'm creating a fairly small app, 3 screens using simple components such as Flatlist, Image and Searchbar. It runs nicely except when I try to test with --variant=release.
I did the signing process and I can confirm this part works as I've deployed my app in Google Beta successfully (only to see the test report from Google showing my app crashed on all simulators).
I've also tried everything I could find on Google (cleaning, reset cache, upgrading everything to last version, even starting my project from scratch and just copy pasting my src folder in).
Here's my package.json, in case something's wrong with my dependencies I couldn't see :
"dependencies": {
"#react-native-community/async-storage": "^1.6.2",
"axios": "^0.19.0",
"he": "^1.2.0",
"moment": "^2.24.0",
"react": "16.9.0",
"react-native": "0.61.2",
"react-native-device-info": "^4.0.1",
"react-native-elements": "^1.2.6",
"react-native-extended-stylesheet": "^0.12.0",
"react-native-fast-image": "^7.0.2",
"react-native-gallery-swiper": "^1.23.1",
"react-native-gesture-handler": "^1.4.1",
"react-native-reanimated": "^1.3.0",
"react-native-vector-icons": "^6.6.0",
"react-navigation": "^4.0.10",
"react-navigation-drawer": "^2.2.2",
"react-navigation-hooks": "^1.1.0",
"react-navigation-stack": "^1.9.4",
"react-redux": "^7.1.1",
"redux": "^4.0.4",
"redux-devtools-extension": "^2.13.8",
"redux-persist": "^6.0.0",
"redux-thunk": "^2.3.0"
},
"devDependencies": {
"#babel/core": "^7.6.4",
"#babel/runtime": "^7.6.3",
"#react-native-community/eslint-config": "^0.0.5",
"babel-jest": "^24.9.0",
"eslint": "^6.5.1",
"jest": "^24.9.0",
"metro-react-native-babel-preset": "^0.56.0",
"react-test-renderer": "16.9.0"
},
"jest": {
"preset": "react-native"
}
Here's an extract of the logcat file when I start the app :
10-22 10:40:51.265 32285 32285 E elevenelevenap: Not starting debugger since process cannot load the jdwp agent.
10-22 10:40:51.340 1817 1921 E SurfaceFlinger: ro.sf.lcd_density must be defined as a build property
10-22 10:40:51.341 1817 1921 E SurfaceFlinger: ro.sf.lcd_density must be defined as a build property
10-22 10:40:51.822 1817 1817 E Layer : [Surface(name=AppWindowToken{b55b6c0 token=Token{4cb0043 ActivityRecord{43741f2 u0 com.google.android.apps.nexuslauncher/.NexusLauncherActivity t5}}})/#0x2af8cf8 - animation-leash#0] No local sync point found
10-22 10:40:51.823 1817 1817 E Layer : [Surface(name=AppWindowToken{b55b6c0 token=Token{4cb0043 ActivityRecord{43741f2 u0 com.google.android.apps.nexuslauncher/.NexusLauncherActivity t5}}})/#0x2af8cf8 - animation-leash#0] No local sync point found
10-22 10:40:51.823 1817 1817 E Layer : [Surface(name=AppWindowToken{470f541 token=Token{8241428 ActivityRecord{21c524b u0 com.elevenelevenapp/.MainActivity t95}}})/#0xf0a643b - animation-leash#0] No local sync point found
10-22 10:40:51.823 1817 1817 E Layer : [Surface(name=AppWindowToken{470f541 token=Token{8241428 ActivityRecord{21c524b u0 com.elevenelevenapp/.MainActivity t95}}})/#0xf0a643b - animation-leash#0] No local sync point found
10-22 10:40:51.840 1817 1817 E Layer : [Surface(name=AppWindowToken{b55b6c0 token=Token{4cb0043 ActivityRecord{43741f2 u0 com.google.android.apps.nexuslauncher/.NexusLauncherActivity t5}}})/#0x2af8cf8 - animation-leash#0] No local sync point found
10-22 10:40:51.840 1817 1817 E Layer : [Surface(name=AppWindowToken{470f541 token=Token{8241428 ActivityRecord{21c524b u0 com.elevenelevenapp/.MainActivity t95}}})/#0xf0a643b - animation-leash#0] No local sync point found
10-22 10:40:52.105 32285 32310 E ReactNativeJS: TypeError: undefined is not an object (evaluating 'm.hot.accept')
10-22 10:40:52.107 32285 32310 E ReactNativeJS: Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)
10-22 10:40:52.109 32285 32311 E AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
10-22 10:40:52.109 32285 32311 E AndroidRuntime: Process: com.elevenelevenapp, PID: 32285
10-22 10:40:52.109 32285 32311 E AndroidRuntime: com.facebook.react.common.JavascriptException: TypeError: undefined is not an object (evaluating 'm.hot.accept'), stack:
10-22 10:40:52.109 32285 32311 E AndroidRuntime: <unknown>#383:349
10-22 10:40:52.109 32285 32311 E AndroidRuntime: v#2:1474
10-22 10:40:52.109 32285 32311 E AndroidRuntime: <unknown>#6:58
10-22 10:40:52.109 32285 32311 E AndroidRuntime: v#2:1474
10-22 10:40:52.109 32285 32311 E AndroidRuntime: d#2:876
10-22 10:40:52.109 32285 32311 E AndroidRuntime: global code#968:4
10-22 10:40:52.109 32285 32311 E AndroidRuntime:
10-22 10:40:52.109 32285 32311 E AndroidRuntime: at com.facebook.react.modules.core.ExceptionsManagerModule.reportException(ExceptionsManagerModule.java:71)
10-22 10:40:52.109 32285 32311 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
10-22 10:40:52.109 32285 32311 E AndroidRuntime: at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:371)
10-22 10:40:52.109 32285 32311 E AndroidRuntime: at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:150)
10-22 10:40:52.109 32285 32311 E AndroidRuntime: at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
10-22 10:40:52.109 32285 32311 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:883)
10-22 10:40:52.109 32285 32311 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:100)
10-22 10:40:52.109 32285 32311 E AndroidRuntime: at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:26)
10-22 10:40:52.109 32285 32311 E AndroidRuntime: at android.os.Looper.loop(Looper.java:214)
10-22 10:40:52.109 32285 32311 E AndroidRuntime: at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:225)
10-22 10:40:52.109 32285 32311 E AndroidRuntime: at java.lang.Thread.run(Thread.java:919)
10-22 10:40:52.174 1799 2450 E GnssHAL_GnssInterface: gnssSvStatusCb: a: input svInfo.flags is 8
10-22 10:40:52.174 1799 2450 E GnssHAL_GnssInterface: gnssSvStatusCb: b: input svInfo.flags is 8
10-22 10:40:52.197 2038 2142 E InputDispatcher: channel '1977922 com.elevenelevenapp/com.elevenelevenapp.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
As you can see it shows a few errors but so far I couldn't trace them back to something I could work on, hence asking you guys some help, I'm quite desperate.
Thanks
Maybe you need application to add inside the tag of AndroidManifest.xml android:usesCleartextTraffic="true".
like this:
<application
...
android:usesCleartextTraffic="true"
...
>
...
</application>
Let me know if this works for, though im kind of late right now

App crashes on startup, works fine in debug mode

I have added rnfirebase to my project recently for fcm, I have setup everything as per the documentation and I can even see notifications coming through to my app in emulator(debug mode). But app crashes only in release mode. Says 'Unfortunately app has stopped'. build has no errors, I have even checked android studio and there are no errors there as well.
Can someone help me debug the issue? Thanks
My logcat output is below
12-06 15:15:57.041 9500-9500/? I/art: Not late-enabling -Xcheck:jni (already on)
12-06 15:15:57.116 9500-9500/com.demoparentapp D/SoLoader: init start
adding system library source: /vendor/lib
adding system library source: /system/lib
12-06 15:15:57.117 9500-9500/com.demoparentapp D/SoLoader: adding application source: com.facebook.soloader.DirectorySoSource[root = /data/app/com.demoparentapp-1/lib/x86 flags = 0]
12-06 15:15:57.132 9500-9500/com.demoparentapp D/SoLoader: adding backup source: com.facebook.soloader.ApkSoSource[root = /data/data/com.demoparentapp/lib-main flags = 1]
12-06 15:15:57.133 9500-9500/com.demoparentapp D/SoLoader: Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /system/lib flags = 2]
Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /system/vendor/lib flags = 2]
12-06 15:15:57.134 9500-9500/com.demoparentapp D/SoLoader: Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /data/app/com.demoparentapp-1/lib/x86 flags = 0]
Preparing SO source: com.facebook.soloader.ApkSoSource[root = /data/data/com.demoparentapp/lib-main flags = 1]
12-06 15:15:57.134 9500-9500/com.demoparentapp V/fb-UnpackingSoSource: locked dso store /data/user/0/com.demoparentapp/lib-main
12-06 15:15:57.138 9500-9500/com.demoparentapp I/fb-UnpackingSoSource: dso store is up-to-date: /data/user/0/com.demoparentapp/lib-main
12-06 15:15:57.138 9500-9500/com.demoparentapp V/fb-UnpackingSoSource: releasing dso store lock for /data/user/0/com.demoparentapp/lib-main
12-06 15:15:57.141 9500-9500/com.demoparentapp D/SoLoader: init finish: 4 SO sources prepared
init exiting
12-06 15:15:57.189 9500-9500/com.demoparentapp D/ReactNative: ReactInstanceManager.ctor()
12-06 15:15:57.189 9500-9500/com.demoparentapp D/SoLoader: init exiting
12-06 15:15:57.250 9500-9500/com.demoparentapp D/ReactNative: ReactInstanceManager.createReactContextInBackground()
12-06 15:15:57.253 9500-9500/com.demoparentapp D/ReactNative: ReactInstanceManager.recreateReactContextInBackgroundInner()
12-06 15:15:57.255 9500-9500/com.demoparentapp D/ReactNative: ReactInstanceManager.onJSBundleLoadedFromServer()
12-06 15:15:57.256 9500-9500/com.demoparentapp D/ReactNative: ReactInstanceManager.recreateReactContextInBackground()
12-06 15:15:57.257 9500-9500/com.demoparentapp D/ReactNative: ReactInstanceManager.runCreateReactContextOnNewThread()
12-06 15:15:57.267 9500-9516/com.demoparentapp D/SoLoader: About to load: libreactnativejni.so
12-06 15:15:57.268 9500-9516/com.demoparentapp D/SoLoader: libreactnativejni.so not found on /data/data/com.demoparentapp/lib-main
12-06 15:15:57.269 9500-9516/com.demoparentapp D/SoLoader: libreactnativejni.so found on /data/app/com.demoparentapp-1/lib/x86
Not resolving dependencies for libreactnativejni.so
12-06 15:15:57.346 9500-9517/com.demoparentapp W/unknown:InspectorPackagerConnection: Couldn't connect to packager, will silently retry
12-06 15:15:57.350 9500-9519/com.demoparentapp D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
12-06 15:15:57.394 9500-9500/com.demoparentapp W/unknown:ReactNative: Packager connection already open, nooping.
12-06 15:15:57.420 9500-9516/com.demoparentapp D/SoLoader: Loaded: libreactnativejni.so
About to load: libfb.so
libfb.so not found on /data/data/com.demoparentapp/lib-main
12-06 15:15:57.421 9500-9516/com.demoparentapp D/SoLoader: libfb.so found on /data/app/com.demoparentapp-1/lib/x86
Not resolving dependencies for libfb.so
12-06 15:15:57.424 9500-9516/com.demoparentapp D/SoLoader: About to load: libfb.so
libfb.so not found on /data/data/com.demoparentapp/lib-main
libfb.so found on /data/app/com.demoparentapp-1/lib/x86
Not resolving dependencies for libfb.so
12-06 15:15:57.425 9500-9516/com.demoparentapp I/art: Thread[12,tid=9516,Native,Thread*=0xec47ac00,peer=0x12d5f400,"Thread-110"] recursive attempt to load library "/data/app/com.demoparentapp-1/lib/x86/libfb.so"
12-06 15:15:57.425 9500-9516/com.demoparentapp D/SoLoader: Loaded: libfb.so
Loaded: libfb.so
12-06 15:15:57.431 9500-9516/com.demoparentapp D/ReactNative: ReactInstanceManager.createReactContext()
12-06 15:15:57.440 9500-9516/com.demoparentapp W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTGroupViewManager
12-06 15:15:57.441 9500-9516/com.demoparentapp W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTGroupShadowNode
12-06 15:15:57.442 9500-9516/com.demoparentapp W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTShapeViewManager
12-06 15:15:57.443 9500-9516/com.demoparentapp W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTShapeShadowNode
12-06 15:15:57.444 9500-9516/com.demoparentapp W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTTextViewManager
12-06 15:15:57.445 9500-9516/com.demoparentapp W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTTextShadowNode
12-06 15:15:57.446 9500-9516/com.demoparentapp W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.checkbox.ReactCheckBoxManager
12-06 15:15:57.450 9500-9516/com.demoparentapp W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.uimanager.LayoutShadowNode
12-06 15:15:57.453 9500-9516/com.demoparentapp W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.picker.ReactDialogPickerManager
12-06 15:15:57.454 9500-9516/com.demoparentapp W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.drawer.ReactDrawerLayoutManager
12-06 15:15:57.456 9500-9516/com.demoparentapp W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.picker.ReactDropdownPickerManager
Could not find generated setter for class com.facebook.react.views.scroll.ReactHorizontalScrollViewManager
12-06 15:15:57.458 9500-9516/com.demoparentapp W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.scroll.ReactHorizontalScrollContainerViewManager
Could not find generated setter for class com.facebook.react.views.progressbar.ReactProgressBarViewManager
12-06 15:15:57.459 9500-9516/com.demoparentapp W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.progressbar.ProgressBarShadowNode
12-06 15:15:57.462 9500-9516/com.demoparentapp W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.scroll.ReactScrollViewManager
12-06 15:15:57.465 9500-9516/com.demoparentapp W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.slider.ReactSliderManager
12-06 15:15:57.466 9500-9516/com.demoparentapp W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.slider.ReactSliderManager$ReactSliderShadowNode
Could not find generated setter for class com.facebook.react.views.switchview.ReactSwitchManager
12-06 15:15:57.470 9500-9516/com.demoparentapp W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.switchview.ReactSwitchManager$ReactSwitchShadowNode
Could not find generated setter for class com.facebook.react.views.toolbar.ReactToolbarManager
12-06 15:15:57.481 9500-9516/com.demoparentapp W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.webview.ReactWebViewManager
12-06 15:15:57.490 9500-9516/com.demoparentapp W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.swiperefresh.SwipeRefreshLayoutManager
12-06 15:15:57.492 9500-9516/com.demoparentapp W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTSurfaceViewManager
Could not find generated setter for class com.facebook.react.views.art.ARTSurfaceViewShadowNode
Could not find generated setter for class com.facebook.react.views.text.frescosupport.FrescoBasedReactTextInlineImageViewManager
12-06 15:15:57.493 9500-9516/com.demoparentapp W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.frescosupport.FrescoBasedReactTextInlineImageShadowNode
12-06 15:15:57.494 9500-9516/com.demoparentapp W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.image.ReactImageManager
12-06 15:15:57.500 9500-9516/com.demoparentapp W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.modal.ReactModalHostManager
12-06 15:15:57.501 9500-9516/com.demoparentapp W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.modal.ModalHostShadowNode
12-06 15:15:57.502 9500-9516/com.demoparentapp W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.ReactRawTextManager
Could not find generated setter for class com.facebook.react.views.text.ReactRawTextShadowNode
12-06 15:15:57.503 9500-9516/com.demoparentapp W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.textinput.ReactTextInputManager
12-06 15:15:57.506 9500-9516/com.demoparentapp W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.textinput.ReactTextInputShadowNode
12-06 15:15:57.507 9500-9516/com.demoparentapp W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.ReactTextViewManager
Could not find generated setter for class com.facebook.react.views.text.ReactTextShadowNode
Could not find generated setter for class com.facebook.react.views.view.ReactViewManager
12-06 15:15:57.508 9500-9519/com.demoparentapp I/OpenGLRenderer: Initialized EGL, version 1.4
12-06 15:15:57.508 9500-9519/com.demoparentapp W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
12-06 15:15:57.508 9500-9516/com.demoparentapp W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.viewpager.ReactViewPagerManager
12-06 15:15:57.509 9500-9516/com.demoparentapp W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.ReactVirtualTextViewManager
12-06 15:15:57.510 9500-9516/com.demoparentapp W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.ReactVirtualTextShadowNode
12-06 15:15:57.511 9500-9519/com.demoparentapp D/EGL_emulation: eglCreateContext: 0xefff9e20: maj 3 min 0 rcv 3
12-06 15:15:57.515 9500-9519/com.demoparentapp D/EGL_emulation: eglMakeCurrent: 0xefff9e20: ver 3 0 (tinfo 0xe9e820d0)
12-06 15:15:57.518 9500-9519/com.demoparentapp E/eglCodecCommon: glUtilsParamSize: unknow param 0x00008cdf
glUtilsParamSize: unknow param 0x00008824
12-06 15:15:57.535 9500-9516/com.demoparentapp D/ReactNative: Initializing React Xplat Bridge.
12-06 15:15:57.541 9500-9516/com.demoparentapp D/ReactNative: Initializing React Xplat Bridge before initializeBridge
12-06 15:15:57.552 9500-9519/com.demoparentapp D/EGL_emulation: eglMakeCurrent: 0xefff9e20: ver 3 0 (tinfo 0xe9e820d0)
12-06 15:15:57.561 9500-9516/com.demoparentapp D/ReactNative: Initializing React Xplat Bridge after initializeBridge
CatalystInstanceImpl.runJSBundle()
12-06 15:15:57.565 9500-9525/com.demoparentapp D/ReactNative: ReactInstanceManager.setupReactContext()
CatalystInstanceImpl.initialize()
12-06 15:15:57.570 9500-9525/com.demoparentapp D/ReactNative: ReactInstanceManager.attachRootViewToInstance()
12-06 15:15:57.570 9500-9525/com.demoparentapp D/SoLoader: About to load: libyoga.so
12-06 15:15:57.571 9500-9525/com.demoparentapp D/SoLoader: libyoga.so not found on /data/data/com.demoparentapp/lib-main
libyoga.so found on /data/app/com.demoparentapp-1/lib/x86
Not resolving dependencies for libyoga.so
12-06 15:15:57.600 9500-9525/com.demoparentapp D/SoLoader: Loaded: libyoga.so
12-06 15:15:57.610 9500-9500/com.demoparentapp W/unknown:ReactNative: Packager connection already open, nooping.
12-06 15:15:57.627 9500-9525/com.demoparentapp D/SoLoader: init exiting
12-06 15:15:57.646 9500-9525/com.demoparentapp W/unknown:ReactNative: Tried to update non-existent root tag: 1
Tried to update non-existent root tag: 1
12-06 15:15:57.902 9500-9525/com.demoparentapp I/WebViewFactory: Loading com.android.webview version 44.0.2403.119 (code 246011960)
12-06 15:15:57.960 9500-9524/com.demoparentapp W/ReactNativeJS: Require cycle: node_modules/react-native-firebase/dist/utils/apps.js -> node_modules/react-native-firebase/dist/modules/core/app.js -> node_modules/react-native-firebase/dist/utils/apps.js
Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
12-06 15:15:57.965 9500-9524/com.demoparentapp W/ReactNativeJS: Require cycle: node_modules/react-native-firebase/dist/modules/admob/index.js -> node_modules/react-native-firebase/dist/modules/admob/Interstitial.js -> node_modules/react-native-firebase/dist/modules/admob/index.js
Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
12-06 15:15:57.970 9500-9524/com.demoparentapp W/ReactNativeJS: Require cycle: node_modules/react-native-firebase/dist/modules/admob/index.js -> node_modules/react-native-firebase/dist/modules/admob/RewardedVideo.js -> node_modules/react-native-firebase/dist/modules/admob/index.js
Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
12-06 15:15:57.970 9500-9525/com.demoparentapp W/System: ClassLoader referenced unknown path: /system/app/webview/lib/x86
12-06 15:15:58.010 9500-9525/com.demoparentapp I/LibraryLoader: Time to load native libraries: 24 ms (timestamps 2122-2146)
Expected native library version number "",actual native library version number ""
12-06 15:15:58.028 9500-9525/com.demoparentapp W/art: Attempt to remove non-JNI local reference, dumping thread
12-06 15:15:58.058 9500-9524/com.demoparentapp W/ReactNativeJS: Require cycle: node_modules/react-native-firebase/dist/modules/database/Reference.js -> node_modules/react-native-firebase/dist/utils/SyncTree.js -> node_modules/react-native-firebase/dist/modules/database/Reference.js
Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
12-06 15:15:58.060 9500-9524/com.demoparentapp W/ReactNativeJS: Require cycle: node_modules/react-native-firebase/dist/modules/core/firebase.js -> node_modules/react-native-firebase/dist/utils/apps.js -> node_modules/react-native-firebase/dist/modules/core/app.js -> node_modules/react-native-firebase/dist/modules/database/index.js -> node_modules/react-native-firebase/dist/modules/core/firebase.js
Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
12-06 15:15:58.063 9500-9524/com.demoparentapp W/ReactNativeJS: Require cycle: node_modules/react-native-firebase/dist/modules/firestore/DocumentSnapshot.js -> node_modules/react-native-firebase/dist/modules/firestore/DocumentReference.js -> node_modules/react-native-firebase/dist/modules/firestore/DocumentSnapshot.js
Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
Require cycle: node_modules/react-native-firebase/dist/modules/firestore/CollectionReference.js -> node_modules/react-native-firebase/dist/modules/firestore/Query.js -> node_modules/react-native-firebase/dist/modules/firestore/QuerySnapshot.js -> node_modules/react-native-firebase/dist/modules/firestore/DocumentChange.js -> node_modules/react-native-firebase/dist/modules/firestore/DocumentSnapshot.js -> node_modules/react-native-firebase/dist/modules/firestore/DocumentReference.js -> node_modules/react-native-firebase/dist/modules/firestore/CollectionReference.js
Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
12-06 15:15:58.064 9500-9524/com.demoparentapp W/ReactNativeJS: Require cycle: node_modules/react-native-firebase/dist/modules/firestore/DocumentReference.js -> node_modules/react-native-firebase/dist/modules/firestore/utils/serialize.js -> node_modules/react-native-firebase/dist/modules/firestore/DocumentReference.js
Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
12-06 15:15:58.073 9500-9524/com.demoparentapp W/ReactNativeJS: Require cycle: node_modules/react-native-firebase/dist/modules/core/firebase.js -> node_modules/react-native-firebase/dist/utils/apps.js -> node_modules/react-native-firebase/dist/modules/core/app.js -> node_modules/react-native-firebase/dist/modules/functions/index.js -> node_modules/react-native-firebase/dist/modules/core/firebase.js
Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
12-06 15:15:58.082 9500-9524/com.demoparentapp W/ReactNativeJS: Require cycle: node_modules/react-native-firebase/dist/modules/storage/index.js -> node_modules/react-native-firebase/dist/modules/storage/reference.js -> node_modules/react-native-firebase/dist/modules/storage/task.js -> node_modules/react-native-firebase/dist/modules/storage/index.js
Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
12-06 15:15:58.086 9500-9524/com.demoparentapp E/ReactNativeJS: Java exception in 'NativeModules'
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/FirebaseApp;
12-06 15:15:58.102 9500-9524/com.demoparentapp E/ReactNativeJS: Module AppRegistry is not a registered callable module (calling runApplication)
12-06 15:15:58.158 9500-9519/com.demoparentapp D/EGL_emulation: eglMakeCurrent: 0xefff9e20: ver 3 0 (tinfo 0xe9e820d0)
12-06 15:16:00.099 9500-9519/com.demoparentapp D/EGL_emulation: eglMakeCurrent: 0xefff9e20: ver 3 0 (tinfo 0xe9e820d0)
12-06 15:16:00.103 9500-9519/com.demoparentapp E/Surface: getSlotFromBufferLocked: unknown buffer: 0xf413ec40
12-06 15:16:00.142 9500-9519/com.demoparentapp E/Surface: getSlotFromBufferLocked: unknown buffer: 0xf413c800
Here is the output from adb logcat command
12-06 18:51:24.991 12241 12260 E Surface : getSlotFromBufferLocked: unknown buffer: 0xee5136e0
12-06 18:51:27.311 1355 1697 W audio_hw_generic: Not supplying enough data to HAL, expected position 15554301 , only wrote 15417164
12-06 18:52:00.056 1271 1318 D hwcomposer: hw_composer sent 110 syncs in 60s
12-06 18:52:15.556 1639 1657 E BluetoothAdapter: Bluetooth binder is null
12-06 18:52:15.557 1639 1657 E KernelCpuSpeedReader: Failed to read cpu-freq
12-06 18:52:15.557 1639 1657 E KernelCpuSpeedReader: java.io.FileNotFoundException: /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state: open failed: ENOENT (No such file or directory)
12-06 18:52:15.557 1639 1657 E KernelCpuSpeedReader: at libcore.io.IoBridge.open(IoBridge.java:452)
12-06 18:52:15.557 1639 1657 E KernelCpuSpeedReader: at java.io.FileInputStream.<init>(FileInputStream.java:76)
12-06 18:52:15.557 1639 1657 E KernelCpuSpeedReader: at java.io.FileInputStream.<init>(FileInputStream.java:103)
12-06 18:52:15.557 1639 1657 E KernelCpuSpeedReader: at java.io.FileReader.<init>(FileReader.java:66)
12-06 18:52:15.557 1639 1657 E KernelCpuSpeedReader: at com.android.internal.os.KernelCpuSpeedReader.readDelta(KernelCpuSpeedReader.java:49)
12-06 18:52:15.557 1639 1657 E KernelCpuSpeedReader: at com.android.internal.os.BatteryStatsImpl.updateCpuTimeLocked(BatteryStatsImpl.java:8002)
12-06 18:52:15.557 1639 1657 E KernelCpuSpeedReader: at com.android.server.am.BatteryStatsService.updateExternalStats(BatteryStatsService.java:1366)
12-06 18:52:15.557 1639 1657 E KernelCpuSpeedReader: at com.android.server.am.BatteryStatsService$BatteryStatsHandler.handleMessage(BatteryStatsService.java:125)
12-06 18:52:15.557 1639 1657 E KernelCpuSpeedReader: at android.os.Handler.dispatchMessage(Handler.java:102)
12-06 18:52:15.557 1639 1657 E KernelCpuSpeedReader: at android.os.Looper.loop(Looper.java:148)
12-06 18:52:15.557 1639 1657 E KernelCpuSpeedReader: at android.os.HandlerThread.run(HandlerThread.java:61)
12-06 18:52:15.557 1639 1657 E KernelCpuSpeedReader: at com.android.server.ServiceThread.run(ServiceThread.java:46)
12-06 18:52:15.557 1639 1657 E KernelCpuSpeedReader: Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
12-06 18:52:15.557 1639 1657 E KernelCpuSpeedReader: at libcore.io.Posix.open(Native Method)
12-06 18:52:15.557 1639 1657 E KernelCpuSpeedReader: at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
12-06 18:52:15.557 1639 1657 E KernelCpuSpeedReader: at libcore.io.IoBridge.open(IoBridge.java:438)
12-06 18:52:15.557 1639 1657 E KernelCpuSpeedReader: ... 11 more
12-06 18:52:15.557 1639 1657 E KernelUidCpuTimeReader: Failed to read uid_cputime
12-06 18:52:15.557 1639 1657 E KernelUidCpuTimeReader: java.io.FileNotFoundException: /proc/uid_cputime/show_uid_stat: open failed: ENOENT (No such file or directory)
12-06 18:52:15.557 1639 1657 E KernelUidCpuTimeReader: at libcore.io.IoBridge.open(IoBridge.java:452)
12-06 18:52:15.557 1639 1657 E KernelUidCpuTimeReader: at java.io.FileInputStream.<init>(FileInputStream.java:76)
12-06 18:52:15.557 1639 1657 E KernelUidCpuTimeReader: at java.io.FileInputStream.<init>(FileInputStream.java:103)
12-06 18:52:15.557 1639 1657 E KernelUidCpuTimeReader: at java.io.FileReader.<init>(FileReader.java:66)
12-06 18:52:15.557 1639 1657 E KernelUidCpuTimeReader: at com.android.internal.os.KernelUidCpuTimeReader.readDelta(KernelUidCpuTimeReader.java:71)
12-06 18:52:15.557 1639 1657 E KernelUidCpuTimeReader: at com.android.internal.os.BatteryStatsImpl.updateCpuTimeLocked(BatteryStatsImpl.java:8031)
12-06 18:52:15.557 1639 1657 E KernelUidCpuTimeReader: at com.android.server.am.BatteryStatsService.updateExternalStats(BatteryStatsService.java:1366)
12-06 18:52:15.557 1639 1657 E KernelUidCpuTimeReader: at com.android.server.am.BatteryStatsService$BatteryStatsHandler.handleMessage(BatteryStatsService.java:125)
12-06 18:52:15.557 1639 1657 E KernelUidCpuTimeReader: at android.os.Handler.dispatchMessage(Handler.java:102)
12-06 18:52:15.557 1639 1657 E KernelUidCpuTimeReader: at android.os.Looper.loop(Looper.java:148)
12-06 18:52:15.557 1639 1657 E KernelUidCpuTimeReader: at android.os.HandlerThread.run(HandlerThread.java:61)
12-06 18:52:15.557 1639 1657 E KernelUidCpuTimeReader: at com.android.server.ServiceThread.run(ServiceThread.java:46)
12-06 18:52:15.557 1639 1657 E KernelUidCpuTimeReader: Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
12-06 18:52:15.557 1639 1657 E KernelUidCpuTimeReader: at libcore.io.Posix.open(Native Method)
12-06 18:52:15.557 1639 1657 E KernelUidCpuTimeReader: at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
12-06 18:52:15.557 1639 1657 E KernelUidCpuTimeReader: at libcore.io.IoBridge.open(IoBridge.java:438)
12-06 18:52:15.557 1639 1657 E KernelUidCpuTimeReader: ... 11 more

System.Runtime.InteropServices.COMException in Winrt Package

I am developing an app in Windows 8 (XAML).
The application runs fine on local machine, however when I create a package in Release Mode and test the app, it crashes.
I saw the application log in my computer and found this error
Application: MyApp.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Runtime.InteropServices.COMException
Stack:
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Threading.WinRTSynchronizationContext+Invoker.b__0(System.Object)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()