react native with firebase storage getDownloadUrl() error in android - android

I'm using react native in Android and I'm hoping to download files from Firebase Storage.
But I'm getting this error when I use firebase storage .getDownloadUrl() method
(NB: The database works just fine)
Could not close WebSocket connection for id 0
java.net.SocketException: Socket is closed
at com.android.org.conscrypt.OpenSSLSocketImpl.checkOpen(OpenSSLSocketImpl.java:247)
at com.android.org.conscrypt.OpenSSLSocketImpl.-wrap0(OpenSSLSocketImpl.java)
at com.android.org.conscrypt.OpenSSLSocketImpl$SSLOutputStream.write(OpenSSLSocketImpl.java:756)
at okio.Okio$1.write(Okio.java:80)
at okio.AsyncTimeout$1.write(AsyncTimeout.java:155)
at okio.RealBufferedSink.flush(RealBufferedSink.java:221)
at com.squareup.okhttp.internal.ws.WebSocketWriter.writeControlFrame(WebSocketWriter.java:151)
at com.squareup.okhttp.internal.ws.WebSocketWriter.writeClose(WebSocketWriter.java:112)
at com.squareup.okhttp.internal.ws.RealWebSocket.close(RealWebSocket.java:135)
at com.facebook.react.modules.websocket.WebSocketModule.close(WebSocketModule.java:186)
at java.lang.reflect.Method.invoke(Native Method)
at com.facebook.react.bridge.BaseJavaModule$JavaMethod.invoke(BaseJavaModule.java:343)
at com.facebook.react.bridge.NativeModuleRegistry$ModuleDefinition.call(NativeModuleRegistry.java:187)
at com.facebook.react.bridge.NativeModuleRegistry.call(NativeModuleRegistry.java:62)
at com.facebook.react.bridge.CatalystInstanceImpl$NativeModulesReactCallback.call(CatalystInstanceImpl.java:432)
at com.facebook.react.bridge.queue.NativeRunnableDeprecated.run(Native
Method)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
at android.os.Looper.loop(Looper.java:148)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:187)
at java.lang.Thread.run(Thread.java:818)
version:
react-native: 0.25.1
I don't get this error in my IOS emulator
Any help would be appreciated,

Related

com.firebase.ui.auth.data.model.UserCancellationException: Unknown error in Android using Firebase Auth

Hey Everyone I am facing the same error:
2020-07-24 21:26:34.918 16841-16841/com.nts.newssafe E/AuthUI: A sign-in error occurred.
com.firebase.ui.auth.data.model.UserCancellationException: Unknown error
at com.firebase.ui.auth.data.remote.GoogleSignInHandler.onActivityResult(GoogleSignInHandler.java:104)
at com.firebase.ui.auth.ui.idp.SingleSignInActivity.onActivityResult(SingleSignInActivity.java:142)
at android.app.Activity.dispatchActivityResult(Activity.java:7226)
at android.app.ActivityThread.deliverResults(ActivityThread.java:4477)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4524)
at android.app.ActivityThread.-wrap22(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1691)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6692)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)
When logging in using email with domain #gmail.com the sign is getting successful but when signing in using custom domain address of Google apps account like company domain email it is failing with this specific error. Any help will be appreciated. Thanks.

java.lang.RuntimeException in react native app

This is a stack trace from crashlytics in my react native app, it happens quite often and is the top crash by volume by far.
I'm not really sure where to begin investigating this? Does anyone have any ideas?
This happens on Android, using react native 0.55
Fatal Exception: java.lang.RuntimeException: Error invoking callback 520
at com.facebook.react.bridge.queue.NativeRunnable.run(NativeRunnable.java)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
at android.os.Looper.loop(Looper.java:145)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192)
at java.lang.Thread.run(Thread.java:818)
Caused by com.facebook.jni.CppException: Failed to create Value from JSON:
at com.facebook.react.bridge.queue.NativeRunnable.run(NativeRunnable.java)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
at android.os.Looper.loop(Looper.java:145)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192)
at java.lang.Thread.run(Thread.java:818)
Using fetch() and then doing response.json() when the server sends
malformed JSON causes a crash.Use axios as web client to call api.
If you are using react-native-fetch-blob and react-native-cached-image then also this error occur as fetch-blob using fecth() method.

GraphQLHttpFailureDomain - Facebook Login on real device

I'm having serios issues with facebook log in using a real device. I'm getting this error
-10-29 15:23:28.622 21689-21689/apps.vanilla.edvin.myapplication W/System.err: CONNECTION_FAILURE: TigonError(3): GraphQLHttpFailureDomain(401) HTTP Error
at com.facebook.login.LoginManager.onActivityResult(LoginManager.java:219)
at com.facebook.login.LoginManager$1.onActivityResult(LoginManager.java:174)
at com.facebook.internal.CallbackManagerImpl.onActivityResult(CallbackManagerImpl.java:92)
at com.vanillapps.caietvirtual.Start.Autentication.LoginFragment.onActivityResult(LoginFragment.java:269)
at android.support.v4.app.FragmentActivity.onActivityResult(FragmentActivity.java:160)
at android.app.Activity.dispatchActivityResult(Activity.java:7289)
at android.app.ActivityThread.deliverResults(ActivityThread.java:4516)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4563)
at android.app.ActivityThread.-wrap22(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1698)
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)
Using the emulator, login works without issues.
Any suggestions regarding my issue? Thanks.

Realm init fails /data/user

Realm.init(this);
Realm.setDefaultConfiguration(new RealmConfiguration.Builder()
.name("default.realm")
.modules(Realm.getDefaultModule(), new RealmCoreModule())
.schemaVersion(10)
.migration(new SampleRealmMigration())
.build());
Fatal Exception: java.lang.RuntimeException: Unable to create application com.zappos.android.ZapposApplication: io.realm.internal.IOException: failed to create temporary directory: /data/user/0/com.zappos.android/files/.realm.temp
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4800)
at android.app.ActivityThread.access$1600(ActivityThread.java:157)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1417)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5527)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
Caused by io.realm.internal.IOException: failed to create temporary directory: /data/user/0/com.sample.android/files/.realm.temp
at io.realm.internal.SharedRealm.initialize(SharedRealm.java:48)
at io.realm.Realm.init(Realm.java:191)
at com.sample.android.SampleApplication.onCreate(SampleApplication.java:223)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1014)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4797)
at android.app.ActivityThread.access$1600(ActivityThread.java:157)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1417)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5527)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
I've noticed that this fails sometimes and more regularly on LG devices on Android 6.
Disk space was not an issue and neither was RAM. From a little more research it says /data/user/0 is something that gets returned during multiple user profiles on the phone. I haven't had luck trying to replicate it.
An issue at the project repo has been created github.com/realm/realm-java/issues/4430

SSL Error during Facebook Login in Android

I am implementing Facebook Login in my App but its not working on Api 2.3.6
I have tested the App in Emulator and its working Fine upto Api 23
Also it's working in Device with API 21 but not in 2.3.6
The Error is related to SSL
Bcoz I have read in an SO answer that,
in Api level 2.3.6 all connections and authorizations are handled by HTTPS only
while in Api levels above 2.3.6 its not the HTTPS that does every task
Also I have noticed that whenever I am trying to call any URL starting
with HTTPS it's not giving the final result but gets silently stopped as was the case
with Googles Direction Api.
Below is the StackTrace I am getting in 2.3.6 :
V/webkit: LoadListener.handleSslErrorRequest():
url:https://m.facebook.com/v2.4/dialog/oauth?
return_scopes=true&response_type=token%2Csigned_request&redirect_uri
=fbconnect%3A%2F%2Fsuccess&display=touch&sdk=android-
4.5.1&e2e=%7B%22init%22%1232%7D&client_id=1234&default_audience=friends
primary error: 3 certificate: Issued to: CN=*.facebook.com,O=Facebook\,
Inc.,L=Menlo Park,ST=CA,C=US;
Issued by: 1.2.840.113549.1.9.1=#1223,CN=Cyberoam SSL
CA_C016700030,OU=Cyberoam Certificate
Authority,O=Elitecore,L=Ahmedabad,ST=Gujarat,C=IN;
I/System.out: close [socket][/0.0.0.0:52994]
I/webkit/webview: WebView.stopLoading()
D/webkit/webview: WebView.stopLoading(): webcorethread is initialized
I/webkit/webview: WebView.stopLoading()
D/webkit/webview: WebView.stopLoading(): webcorethread is initialized
W/System.err: at
com.facebook.login.LoginManager.onActivityResult(LoginManager.java:173)
W/System.err: at
com.facebook.login.LoginManager$1.onActivityResult(LoginManager.java:139)
W/System.err: at
com.facebook.internal.CallbackManagerImpl.onActivityResult
(CallbackManagerImpl.java:82)
W/System.err: at
com.hogo.integrationapp.FirstActivity.onActivityResult
(FirstActivity.java:179)
W/System.err: at
android.app.Activity.dispatchActivityResult(Activity.java:3975)
W/System.err: at
android.app.ActivityThread.deliverResults(ActivityThread.java:2629)
W/System.err: at
android.app.ActivityThread.handleSendResult(ActivityThread.java:2675)
W/System.err: at
android.app.ActivityThread.access$2000(ActivityThread.java:156)
W/System.err: at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1030)
W/System.err: at android.os.Handler.dispatchMessage(Handler.java:130)
W/System.err: at android.os.Looper.loop(SourceFile:351)
W/System.err: at
android.app.ActivityThread.main(ActivityThread.java:3821)
W/System.err: at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err: at java.lang.reflect.Method.invoke(Method.java:538)
W/System.err: at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run\
(ZygoteInit.java:969)
W/System.err: at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:727)
W/System.err: at dalvik.system.NativeStart.main(Native Method)
Is there any Easy way to solve it ?
Also I want to understand why this is happening ?
I am using Facebook Sdk 4.5.1
For API 4.4.2 :
The Error was due to a File Transfer App open in my Device, when i closed it the error was gone
Thanks in Advance...

Categories

Resources