Comments (16)
Some more info here: https://stackoverflow.com/questions/33556780/errorexecution-failed-for-task-appprocessdebuggoogleservices-please-fix/33558478#33558478
from react-native-gcm-android.
Did the link solve your problem?
from react-native-gcm-android.
I modified the code of your module and upgraded this in the build.gradle file:
compile 'com.google.android.gms:play-services:8.3.0'
That got it to stop throwing an error but GCM permissions request is still not showing up in emulator.
from react-native-gcm-android.
OK, this thing should be also mentioned in docs to help others prevent facing this issue.
I didn't test it, but can you test it in device?
Otherwise, you can run adb logcat
in terminal and run the app, and then try searching text GCM Registration Token
or Failed to complete token refresh
. It will get some informations.
from react-native-gcm-android.
Tried running it on device, it crashes when starting up. Here's the adb log:
E/AndroidRuntime(18628): FATAL EXCEPTION: main
E/AndroidRuntime(18628): Process: com.app.name, PID: 18628
E/AndroidRuntime(18628): java.lang.UnsatisfiedLinkError: could find DSO to load: libreactnativejni.so
E/AndroidRuntime(18628): at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:213)
E/AndroidRuntime(18628): at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:178)
E/AndroidRuntime(18628): at com.facebook.react.bridge.JSCJavaScriptExecutor.<clinit>(JSCJavaScriptExecutor.java:19)
E/AndroidRuntime(18628): at com.facebook.react.ReactInstanceManager.onJSBundleLoadedFromServer(ReactInstanceManager.java:310)
E/AndroidRuntime(18628): at com.facebook.react.ReactInstanceManager.initializeReactContext(ReactInstanceManager.java:321)
E/AndroidRuntime(18628): at com.facebook.react.ReactInstanceManager.attachMeasuredRootView(ReactInstanceManager.java:265)
E/AndroidRuntime(18628): at com.facebook.react.ReactRootView$1.run(ReactRootView.java:105)
E/AndroidRuntime(18628): at android.os.Handler.handleCallback(Handler.java:739)
E/AndroidRuntime(18628): at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime(18628): at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime(18628): at android.app.ActivityThread.main(ActivityThread.java:5310)
E/AndroidRuntime(18628): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(18628): at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(18628): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901)
E/AndroidRuntime(18628): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:696)
Try running it on yours if you can. If there's an example project you have that would be great.
from react-native-gcm-android.
No problem. Here you go https://github.com/oney/TestGcm
I run the app in my device with Android 4.1.2, and it just works
Logs are
D/ReactNativeJS(29078): 'Running application "TestGcm" with appParams: {"initialProps":{},"rootTag":1}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF'
D/ReactNativeJS(29078): 'send gcm token to server', 'eoupdMSUPFI:APA91bFdAfjIVcs4dWkhqX8trwHGvStiDOwF2e1QNzSBVIC6qJha-6hjWNDi8gLy0uxldQtq9zHqZOUqw9tJs8MR5wIbvvltGjuo0AxSglcFb8KDKdCAbz4_vW2vSvB3CV2OP1l2Wq1D'
Maybe your problem is related to this. What is your device?
from react-native-gcm-android.
I test the demo app in Genymotion simulator(Google Galaxy Nexus 4.1.1 API 16). It can't get the token.
adb logcat shows
D/GcmRegistrationService( 998): Failed to complete token refresh
D/GcmRegistrationService( 998): java.io.IOException: MISSING_INSTANCEID_SERVICE
D/GcmRegistrationService( 998): at com.google.android.gms.iid.zzc.zza(Unknown Source)
D/GcmRegistrationService( 998): at com.google.android.gms.iid.zzc.zzb(Unknown Source)
D/GcmRegistrationService( 998): at com.google.android.gms.iid.zzc.zza(Unknown Source)
D/GcmRegistrationService( 998): at com.google.android.gms.iid.InstanceID.zzc(Unknown Source)
D/GcmRegistrationService( 998): at com.google.android.gms.iid.InstanceID.getToken(Unknown Source)
D/GcmRegistrationService( 998): at com.oney.gcm.GcmRegistrationService.onHandleIntent(GcmRegistrationService.java:38)
D/GcmRegistrationService( 998): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
D/GcmRegistrationService( 998): at android.os.Handler.dispatchMessage(Handler.java:99)
D/GcmRegistrationService( 998): at android.os.Looper.loop(Looper.java:137)
D/GcmRegistrationService( 998): at android.os.HandlerThread.run(HandlerThread.java:60)
I/ActivityManager( 293): No longer want com.android.contacts (pid 662): hidden #16
It seems that GCM doesn't work in Genymotion simulator
from react-native-gcm-android.
Thanks for the example project! I'm using an Android device that I believe is experiencing the same issue as the 64-bit one you posted. Let's keep this GitHub issue open for now, while I work on resolving it. For now I'll try getting your TestGcm to work, then I'll go back to my app.
from react-native-gcm-android.
not sure what , why or how
but adding google-services.json to react-native-gcm-android folder (i also it inside the android directory + android/build ((lots of trial and error)) + updating to 8.3.0 and classpath to
classpath 'com.google.gms:google-services:1.5.0-beta2'
got rid of the error for me
from react-native-gcm-android.
nevermind the upgrading bit.
noticed that i got this error instead
No matching client found for package name 'com.oney.gcm'
from react-native-gcm-android.
@jawadrehman Are you testing demo project(https://github.com/oney/TestGcm)? And what is your device?
from react-native-gcm-android.
even with the demo project i got that message, but it does get the token
from react-native-gcm-android.
@oney Hi there, I was getting the same issue but managed to resolve it in a very simple way. I had to remove the apply plugin line for google services from your modules build.gradle. Worked perfectly after doing that. I created a PR with the fix.
from react-native-gcm-android.
I put this one:
compile "com.google.firebase:firebase-database:9.2.0"
sync with gradle and works for me.
from react-native-gcm-android.
after modifying your build.gradle file
i.e Project-level build.gradle (/build.gradle):
buildscript {
dependencies {
// Add this line
classpath 'com.google.gms:google-services:4.0.0'
}
}
App-level build.gradle (<project>/<app-module>/build.gradle):
dependencies {
// Add this line
compile 'com.google.firebase:firebase-core:16.0.0'
}
// Add to the bottom of the file
apply plugin: 'com.google.gms.google-services'
NOTE: then copy the json file you downloaded and paste it twice as in the image above. and you're good to go.
from react-native-gcm-android.
for me removing "apply plugin: 'com.google.gms.google-services'" from app level gradle file worked
from react-native-gcm-android.
Related Issues (20)
- npm version is newer than github version HOT 1
- App crashes when closed while receiving notification HOT 5
- npm WARN [email protected] requires a peer of react-native-system-notification@^0.1.2 but none was installed. HOT 7
- Error: 'GcmAndroid.launchNotification internal', undefined HOT 1
- Handling AndroidManifest.xml with buildtypes and applicationIdSuffix HOT 1
- com.facebook.react.bridge.UnexpectedNativeTypeException: TypeError: expected dynamic type `int64', but had type `double'
- issue with implementaion HOT 2
- App does not receive messages after reboot on Android 5.0 HOT 1
- App crashes while in background
- Cant get token HOT 1
- RN 0.29 needs Activity instance? HOT 3
- Emitter
- SysNotificationClick as Listener doesn´t work for me (Android)
- Oney: Are you still interested in keeping this library up to date? I can help HOT 1
- Error :app:transformClassesWithJarMeringForDebug HOT 1
- google services
- No static method builder() Lcom/facebook/react/ReactInstanceManager$Builder; HOT 1
- I'm getting this error when I run my app. No error shows up while building though. Please help me
- react-native-fcm
- ar
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-gcm-android.