sdkbox / issues

The issue tracker for SDKBOX
MIT License
4 stars 0 forks source link

SDKBOX apiclient is null #42

Closed bolso80 closed 6 years ago

bolso80 commented 6 years ago

We have sdkbox and firebase included in our project and I had to do the steps indicated on https://github.com/sdkbox/issues/issues/40 to compile because we are using gradle on android studio.

I have my app published on google play with an apk uploaded on alpha and have cloud save activated.

When the app tries to do the SdkboxGPGAuthentication give this error:

I/SDKBOX_CORE: Initialization request for plugin: 'com/sdkbox/plugin/SdkboxGPGAuthentication' E/SdkboxPlay: api client build Must not set scopes in GoogleApiClient.Builder when using Auth.GOOGLE_SIGN_IN_API. Set account in GoogleSignInOptions.Builder instead. I/SDKBOX_CORE: Initialization request for plugin: 'com/sdkbox/plugin/SdkboxGPGLeaderboards' I/SDKBOX_CORE: Initialization request for plugin: 'com/sdkbox/plugin/SdkboxGPGAchievements' I/SDKBOX_CORE: Initialization request for plugin: 'com/sdkbox/plugin/SdkboxGPGSavedGames'

and when try to use some cloud function it gives this error:

I/SdkboxPlay: apiclient is null.

ghost commented 6 years ago

whats the filed clound_save in your sdkbox_config.json file?

https://github.com/sdkbox/sdkbox-sample-sdkboxplay/blob/master/cpp/Resources/sdkbox_config.json#L37

E/SdkboxPlay: api client build Must not set scopes in GoogleApiClient.Builder when using Auth.GOOGLE_SIGN_IN_API. Set account in GoogleSignInOptions.Builder instead.

It's failed with _apiClient = builder.build();. so when call cloud function, it warns apiclient is null .

bolso80 commented 6 years ago

We filed clound_save on true. When clound_save was on false we didn't have the response on onSaveGameData or onLoadGameData but with clound_save on true yes we have the response but with the error of api client null.

bolso80 commented 6 years ago

I create a new cocos2dx empty project and import sdkboxplay from cli installer and tried saving and loading to the cloud and I have the same problem.

hugohuang1111 commented 6 years ago

@bolso80 did you test with release mode?

hugohuang1111 commented 6 years ago

i tested with sdkbox-sample-sdkboxplay cpp, can't reproduce, can you try sdkbox-sample-sdkboxplay or compare with it.

bolso80 commented 6 years ago

I test in release and debug mode. When I try to test with sdkbox-sample-sdkboxplay I have an error with abi architecture and I can't run.

I upload an empty project (SdskBoxTest.zip) with clound_save in true where I have this error when I run the application with Android Studio:

01-31 09:44:22.106 12967-14478/com.ironhidegames.android.kingdomrush4 I/SDKBOX_CORE: Initialization request for plugin: 'com/sdkbox/plugin/SdkboxGPGAuthentication' 01-31 09:44:22.180 12967-14478/com.ironhidegames.android.kingdomrush4 W/PopupManager: You have not specified a View to use as content view for popups. Falling back to the Activity content view. Note that this may not work as expected in multi-screen environments 01-31 09:44:22.190 12967-14478/com.ironhidegames.android.kingdomrush4 E/SdkboxPlay: api client build Must not set scopes in GoogleApiClient.Builder when using Auth.GOOGLE_SIGN_IN_API. Set account in GoogleSignInOptions.Builder instead. 01-31 09:44:22.194 12967-14478/com.ironhidegames.android.kingdomrush4 I/SDKBOX_CORE: Initialization request for plugin: 'com/sdkbox/plugin/SdkboxGPGLeaderboards' 01-31 09:44:22.205 12967-14478/com.ironhidegames.android.kingdomrush4 I/SDKBOX_CORE: Initialization request for plugin: 'com/sdkbox/plugin/SdkboxGPGAchievements' 01-31 09:44:22.215 12967-14478/com.ironhidegames.android.kingdomrush4 I/SDKBOX_CORE: Initialization request for plugin: 'com/sdkbox/plugin/SdkboxGPGSavedGames' 01-31 09:44:33.635 12967-14479/com.ironhidegames.android.kingdomrush4 E/TrackingInfo: reqAdvertisingIdentifier Error:java.util.concurrent.TimeoutException 01-31 09:44:33.635 12967-14478/com.ironhidegames.android.kingdomrush4 I/SdkboxPlay: apiclient is null.

hugohuang1111 commented 6 years ago

please use the this PluginSdkboxPlay.jar replace and test.

https://www.dropbox.com/s/au9tk59f2fjqfsj/PluginSdkboxPlay.jar?dl=0

and the SdskBoxTest project have one minor issue, google_app_id have not set.

bolso80 commented 6 years ago

I used the plugin and I don't have the previous error, but now when try to do some cloud save action I have this error on callback GoogleApiClient is not connected yet.

hugohuang1111 commented 6 years ago

GoogleApiClient is not connected yet

you need signin first.

i push your test project to github. and do my change, you can take a look.

https://github.com/hugohuang1111/SdskBoxTest

bolso80 commented 6 years ago

I'm trying to connect but on the method onConnectionStatusChanged I have the status 1001 "GPS_DISCONNECTED".

I test with your project and when I try to signin have the same status on onConnectionStatusChanged.

I'm a tester in my app and in your app (https://play.google.com/apps/testing/com.sdkbox.gpg) too.

hugohuang1111 commented 6 years ago

please use release mode. change Build Variants to release

ghost commented 6 years ago

no more feedback.