I try to use google play services as authentication in my Android app project but it display this error - google-play-services

Errors:
02/15 09:33:30: Launching app
$ adb push C:\Users\hp\AndroidStudioProjects\recevienotfirebase\app\build\outputs\apk\app-debug.apk /data/local/tmp/com.example.hp.recevienotfirebase
$ adb shell pm install -r "/data/local/tmp/com.example.hp.recevienotfirebase"
Success
$ adb shell am start -n "com.example.hp.recevienotfirebase/com.example.hp.recevienotfirebase.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Client not ready yet..Connected to process 2360 on device Nexus_6P_API_24 [emulator-5554]
I/art: Not late-enabling -Xcheck:jni (already on)
W/art: Unexpected CPU variant for X86 using defaults: x86
W/System: ClassLoader referenced unknown path: /data/app/com.example.hp.recevienotfirebase-1/lib/x86
I/InstantRun: Instant Run Runtime started. Android package is com.example.hp.recevienotfirebase, real application class is null.
[ 02-15 09:33:38.693 1497: 1520 D/ ]
HostConnection::get() New Host Connection established 0x8fdb9800, tid 1520
W/System: ClassLoader referenced unknown path: /data/app/com.example.hp.recevienotfirebase-1/lib/x86
D/FirebaseApp: com.google.firebase.auth.FirebaseAuth is not linked. Skipping initialization.
W/InstanceID/Rpc: Found 10012
D/FirebaseApp: com.google.firebase.crash.FirebaseCrash is not linked. Skipping initialization.
I/FA: App measurement is starting up, version: 10084
I/FA: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
D/FA: Debug-level message logging enabled
D/FA: AppMeasurement singleton hash: 91568628
V/FA: Collection enabled
V/FA: App package, google app id: com.example.hp.recevienotfirebase, 1:1056127560632:android:663d67b615c99e63
I/FA: To enable faster debug mode event logging run:
adb shell setprop debug.firebase.analytics.app com.example.hp.recevienotfirebase
V/FA: Registered activity lifecycle callback
I/FirebaseInitProvider: FirebaseApp initialization successful
V/FA: State of service unknown
V/FA: Checking service availability
W/GooglePlayServicesUtil: Google Play services out of date. Requires 10084000 but found 9452470
D/FA: Service container out of date
V/FA: Setting useService: true
V/FA: Using measurement service
V/FA: Connecting to remote service
W/GooglePlayServicesUtil: Google Play services out of date. Requires 10084000 but found 9452470
W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
V/FA: onActivityCreated
V/FA: Using measurement service
V/FA: Connection attempt already in progress
V/FA: Activity resumed, time: 51631
W/gralloc_ranchu: Gralloc pipe failed
[ 02-15 09:33:52.817 2360: 2360 D/ ]
HostConnection::get() New Host Connection established 0x9e59ea40, tid 2360
W/FA: Service connection failed: ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null, message=null}
I/OpenGLRenderer: Initialized EGL, version 1.4
D/OpenGLRenderer: Swap behavior 1
V/FA: Session started, time: 61634
I/FA: Tag Manager is not found and thus will not be used
D/FA: Logging event (FE): _s, Bundle[{_o=auto, _sc=MainActivity, _si=-2727167516359703917}]
V/FA: Using measurement service
V/FA: Connecting to remote service
W/GooglePlayServicesUtil: Google Play services out of date. Requires 10084000 but found 9452470
W/FA: Service connection failed: ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null, message=null}
W/FA: Tasks have been queued for a long time
Google Play services out of date. Requires 10084000 but found 9452470

You may want to check this thread which states that you'll get this error when the activity is not exported. Be noted that the activity has to be exported to be accessible from adb.
Also, based from this SO post, you have to add the following to your android manifest: <action android:name="com.google.firebase.INSTANCE_ID_EVENT"/> or maybe the problem was that the onTokenRefresh() method was not called when the app was starting. Try calling FirebaseInstanceId.getInstance().getToken() in the MainActivity and see if it works.

Related

How to run pipeline with GStreamer binded by Qt?

I want to run 'qmlplayer' example from Qt GStreamer binder on my embedded system. My camera rtsp address uri is:
rtsp://admin:1234#192.168.2.106:554/ipcam_mjpeg.sdp
rtsp path is correct because I can run stream in VLS Player and run example with working camera view on my Ubuntu18 system. When I want run example on my embedded system I got error:
"Could not get/set settings from/on resource."
I checked in terminal:
[root#comp ~]# gst-launch-1.0 uridecodebin uri='rtsp://admin:1234#192.168.2.106:554/ipcam_mjpeg.sdp'
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://admin:1234#192.168.2.106:554/ipcam_mjpeg.sdp
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
ERROR: from element /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source: Could not get/set settings from/on resource.
Additional debug info:
gstrtspsrc.c(6441): gst_rtspsrc_setup_streams (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source:
Could not setup transport.
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
What could be the reason? Missing linux driver? Ping is ok, iptables are droped

Address already in use when restarting my web application

What I have:
ASP.NET Core 2.1 Web Application (self-hosted deployment, not using IIS).
When I pass --register-service or --unregister-service as command line arguments to my app, it (un)registers itself as a Windows Service and then exits.
MSI installer (WiX Toolset 3.11) which registers the web application as a Windows Service by using the above command line argument in a Custom Action.
When doing an upgrade from version 1 to version 2 of my application, the MSI installer successfully performs the following steps:
Unregister version 1 as Windows Service
Remove binaries of version 1
Copy binaries of version 2
Register and (attempt to) start version 2 as Windows Service
Problem:
The newly installed version 2 does not start properly because apparently the port is still blocked:
System.IO.IOException: Failed to bind to address https://[::]:5001: address already in use. ---> Microsoft.AspNetCore.Connections.AddressInUseException: Only one usage of each socket address (protocol/network address/port) is normally permitted ---> System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted
Interestingly when any of these two versions is installed, I can stop and start the Windows Service without any issues. The problem with the blocked port seems to occur specifically in the context of an MSI upgrade.
What I tried:
Once the MSI installer is finished, I can just restart the newly installed service manually and it runs fine. So it looks like it just takes some more time for the port to become available. So what I tried is some kind of a re-try mechanism, along these lines (simplified):
IWebHost host = null;
Start:
host?.Dispose();
host = CreateWebHost();
try
{
await host.RunAsync(ct);
}
catch (IOException ex) when (ex.InnerException is AddressInUseException)
{
await Task.Delay(TimeSpan.FromSeconds(5), ct);
goto Start;
}
However, then I get the following exception in some service where I try to use an injected IServiceScopeFactory when doing the first re-try:
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'IServiceProvider'.
So it looks like even I'm creating a completely new IWebHost for retrying, the DI container still seems to be in a bad state from the first try.
Questions:
What could be the reason for this blocked port, apparently only in the context of an MSI update? Could it be that the Windows Installer itself is not releasing the port? How to solve or workaround this?
With regards to the workaround I tried: Why do I get that ObjectDisposedException? Is there a better way to re-try while the port is still blocked?

unknown SSL error -12218 (SSL_ENCRYPTION_FAILURE) while launching upwork application on debian stretch

Recently I've been installing upwork application on my debian system.It has installed fine.But when I try to launch it from cli typing: upwork
a bunch of errors happen.
[1008/213534:ERROR:browser_main_loop.cc(173)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
[1008/213535:ERROR:renderer_main.cc(200)] Running without renderer sandbox
[1008/213542:ERROR:renderer_main.cc(200)] Running without renderer sandbox
[1008/213542:WARNING:channel.cc(549)] Failed to send message to ack remove remote endpoint (local ID 1, remote ID 1)
[1008/213542:WARNING:channel.cc(549)] Failed to send message to ack remove remote endpoint (local ID 2147483648, remote ID 2)
[1008/213542:ERROR:channel.cc(300)] RawChannel read error (connection broken)
[1008/213542:ERROR:renderer_main.cc(200)] Running without renderer sandbox
[1008/213543:WARNING:channel.cc(549)] Failed to send message to ack remove remote endpoint (local ID 1, remote ID 1)
[1008/213543:WARNING:nss_ssl_util.cc(370)] Unknown SSL error -12218 (SSL_ERROR_ENCRYPTION_FAILURE) mapped to net::ERR_SSL_PROTOCOL_ERROR
[1008/213600:WARNING:nss_ssl_util.cc(370)] Unknown SSL error -12218 (SSL_ERROR_ENCRYPTION_FAILURE) mapped to net::ERR_SSL_PROTOCOL_ERROR
[1008/213600:WARNING:nss_ssl_util.cc(370)] Unknown SSL error -12218 (SSL_ERROR_ENCRYPTION_FAILURE) mapped to net::ERR_SSL_PROTOCOL_ERROR
[1008/214550:WARNING:channel.cc(549)] Failed to send message to ack remove remote endpoint (local ID 1, remote ID 1)
[
How to overcome this errors?
After online searching the decision was found on upwork site forum
unknown ssl error
The problem was how to use the 2 versions of libnss3 packet simultaneously.Libnss3 goes as a security related packet so instead of downgrading it on the system you can simply download the old version of libnss3 compatible with upwork app and then dynamically add a path to this old version to the linker when you need to use upwork app, while the system will have the newest one.

RestComm build and run on MAC OS from source

I am new to restcomm two days ago i start following getting start guide and build restcomm from source. I am able to build successfully on my Mac machine but when i am trying to run JBoss server to run the application it is giving me some errors which i am not sure why. So my question is can i run restcomm application on MAC OS ?as mostly i see there are lot of answers are about linux OS.
MacBook-Pro:restcomm bilal$ ./start-restcomm.sh
BASEDIR: /Users/muhammadbilal/Restcomm-Connect/release/Restcomm-JBoss-AS7-7.0.2/bin/restcomm
RESTCOMM_HOME: /Users/muhammadbilal/Restcomm-Connect/release/Restcomm-JBoss-AS7-7.0.2
Looking for the appropriate interface
Looking for the IP Address, subnet, network and broadcast_address
Use of uninitialized value $ARGV[0] in concatenation (.) or string at /usr/local/bin/ipcalc line 136.
RestComm automatic configuration started:
Executing configuration file /Users/muhammadbilal/Restcomm-Connect/release/Restcomm-JBoss-AS7-7.0.2/bin/restcomm/autoconfig.d/config-dialogic-xms.sh...
Configuring Dialogic XMS...MS_MODE: mms
...activated Dialogic XMS...
...finished configuring Dialogic XMS!
Finished executing configuration file /Users/muhammadbilal/Restcomm-Connect/release/Restcomm-JBoss-AS7-7.0.2/bin/restcomm/autoconfig.d/config-dialogic-xms.sh!
Executing configuration file /Users/muhammadbilal/Restcomm-Connect/release/Restcomm-JBoss-AS7-7.0.2/bin/restcomm/autoconfig.d/config-jboss-as.sh...
Configuring JBoss AS...
...disabled JBoss splash screen...
Finished configuring JBoss AS!
Finished executing configuration file /Users/muhammadbilal/Restcomm-Connect/release/Restcomm-JBoss-AS7-7.0.2/bin/restcomm/autoconfig.d/config-jboss-as.sh!
Executing configuration file /Users/muhammadbilal/Restcomm-Connect/release/Restcomm-JBoss-AS7-7.0.2/bin/restcomm/autoconfig.d/config-load-balancer.sh...
Deactivated Load Balancer on SIP stack configuration file
Finished executing configuration file /Users/muhammadbilal/Restcomm-Connect/release/Restcomm-JBoss-AS7-7.0.2/bin/restcomm/autoconfig.d/config-load-balancer.sh!
Executing configuration file /Users/muhammadbilal/Restcomm-Connect/release/Restcomm-JBoss-AS7-7.0.2/bin/restcomm/autoconfig.d/config-mobicents-ms.sh...
TRUSTSTORE_FILE is not set
Configuring Mobicents Media Server... MS_ADDRESS BIND_ADDRESS NETWORK 192.168.1.0 SUBNET_MASK RTP_LOW_PORT 34534 RTP_HIGH_PORT 65535
Configured UDP Manager
Updated log configuration
Finished configuring Mobicents Media Server!
Finished executing configuration file /Users/muhammadbilal/Restcomm-Connect/release/Restcomm-JBoss-AS7-7.0.2/bin/restcomm/autoconfig.d/config-mobicents-ms.sh!
Executing configuration file /Users/muhammadbilal/Restcomm-Connect/release/Restcomm-JBoss-AS7-7.0.2/bin/restcomm/autoconfig.d/config-restcomm.sh...
Configuring RestComm...
Updated mobicents-dar properties
Updated RestComm configuration
Configured Fax Service credentials
Configured Sms Aggregator using OUTBOUND PROXY
Configured the Speech Recognizer
Configured Acapela Speech Synthesizer
Configured VoiceRSS Speech Synthesizer
Disabled TeleStax Proxy
sed: 1: "/Users/muhammadbilal/Re ...": invalid command code m
Configured SMPP Account Details
Configured RestComm!
Finished executing configuration file /Users/muhammadbilal/Restcomm-Connect/release/Restcomm-JBoss-AS7-7.0.2/bin/restcomm/autoconfig.d/config-restcomm.sh!
Executing configuration file /Users/muhammadbilal/Restcomm-Connect/release/Restcomm-JBoss-AS7-7.0.2/bin/restcomm/autoconfig.d/config-sip-connectors.sh...
Configuring Application Server...
Configured SIP Connectors and Bindings
sed: 1: "/Users/muhammadbilal/Re ...": invalid command code m
Configured gather-statistics
TRUSTSTORE_FILE is not set
Finished configuring Application Server!
Finished executing configuration file /Users/muhammadbilal/Restcomm-Connect/release/Restcomm-JBoss-AS7-7.0.2/bin/restcomm/autoconfig.d/config-sip-connectors.sh!
RestComm automatic configuration finished!
./start-restcomm.sh: line 182: ${MS_EXTERNAL^^}: bad substitution
TelScale RestComm started running on standalone mode. Screen session: restcomm.
Using IP Address:
Yes you can run Restcomm on Mac OSX, the main difference is that you need to do some more configuration manually since the auto configuration scripts don't work there as well as they do for GNU/Linux.
Please check this guide:
https://github.com/RestComm/Restcomm-Connect/wiki/Restcomm-OSX-native-installation
If you still have issues after trying such configuration, please post back here.
Best regards,
Antonis Tsakiridis

How to stop gracefully a Spark Streaming application on YARN?

I'm running a Spark Streaming application on YARN in cluster mode and I'm trying to implement a gracefully shutdown so that when the application is killed it will finish the execution of the current micro batch before stopping.
Following some tutorials I have configured spark.streaming.stopGracefullyOnShutdown to true and I've added the following code to my application:
sys.ShutdownHookThread {
log.info("Gracefully stopping Spark Streaming Application")
ssc.stop(true, true)
log.info("Application stopped")
}
However when I kill the application with
yarn application -kill application_1454432703118_3558
the micro batch executed at that moment is not completed.
In the driver I see the first line of log printed ("Gracefully stopping Spark Streaming Application") but not the last one ("Application stopped").
ERROR yarn.ApplicationMaster: RECEIVED SIGNAL 15: SIGTERM
INFO streaming.MySparkJob: Gracefully stopping Spark Streaming Application
INFO scheduler.JobGenerator: Stopping JobGenerator gracefully
INFO scheduler.JobGenerator: Waiting for all received blocks to be consumed for job generation
INFO scheduler.JobGenerator: Waited for all received blocks to be consumed for job generation
INFO streaming.StreamingContext: Invoking stop(stopGracefully=true) from shutdown hook
In the executors log I see the following error:
ERROR executor.CoarseGrainedExecutorBackend: Driver 192.168.6.21:49767 disassociated! Shutting down.
INFO storage.DiskBlockManager: Shutdown hook called
WARN remote.ReliableDeliverySupervisor: Association with remote system [akka.tcp://sparkDriver#192.168.6.21:49767] has failed, address is now gated for [5000] ms. Reason: [Disassociated]
INFO util.ShutdownHookManager: Shutdown hook called
I think the problem is related to how YARN send the kill signal the application. Any idea on how can I make the application stop gracefully?
you should go to the executors page to see where your driver is running ( on which node). ssh to that node and do the following:
ps -ef | grep 'app_name'
(replace app_name with your classname/appname). it will list couple of processes. Look at the process, some will be child of the other. Pick the id of the parent-most process and send a SIGTERM
kill pid
after some time you'll see that your application has terminated gracefully.
Also now you don't need to add those hooks for shutdown.
use spark.streaming.stopGracefullyOnShutdown config to help shutdown gracefully
You can stop spark streaming application by invoking ssc.stop when a customized condition is triggered instead of using awaitTermination. As the following pseudocode shows:
ssc.start()
while True:
time.sleep(10s)
if some_file_exist:
ssc.stop(True, True)