EventService - The resource that is being accessed is disabled (ErrorCode 1402)

0 votes

If I try to log an event (in android) and I get following error:

{"app42Fault":{"httpErrorCode":400,"appErrorCode":1402,"message":"Bad Request","details":"The resource that is being accessed is disabled"}}

I have enabled the service:

App42API.initialize(this, "...", "...");
App42API.enableEventService(true);
App42API.enableAppStateEventTracking(true);
mEventService = App42API.buildEventService();

And my key has all Log and Event authorisations

The error appears if I try to track an event...

mEventService.trackEvent(message, properties, callback);

And I use App42_ANDROID_SDK_3.2...

asked Mar 12, 2015 in App42 Cloud API-BaaS by mflisar85 (40 points)

2 Answers

0 votes
 
Best answer

Hello, You can track your app events through the Marketing Automation link which is right over the top of the header. For more details, please have a look at this tutorial. It will help you to understand all the steps in details. Please check and let us know if it helps. Thanks, Himanshu Sharma

answered Mar 12, 2015 by hs00105 (2,005 points)
selected Mar 12, 2015 by mflisar85
thanks. I knew the tutorial but I did not see that it's another link... Still the null answer is not what I expect as an success answer...
Could you please share the internal logs of this method? It will help us to provide better support to you.

Thanks,
Himanshu Sharma
How can I do that? Do I have to enable something?

Btw, can I delete all data somehow?
Hello,

To print the internal logs of this method, put the below line of code before making a request of trackEvent:

App42Log.setDebug(true);

About your second query, there is no option to delete the data from Analytic.

Thanks,
Himanshu Sharma
I try it like this:
         
mEventService.trackEvent(event, getEventProperties(), new App42CallBack() {
            @Override
            public void onSuccess(Object response) {
                App42Response r = (App42Response)response;
                L.d(MainApp.class, r.getStrResponse());
            }

            @Override
            public void onException(Exception e) {
                L.e(MainApp.class, e);
            }
        });

And it prints "null"... although the internal debug output shows me that it received an answer:

Json String : {"app42":{"event":{"superProperties":{"app42_os_version":"4.4.4","app42_installAt":"2015-02-16T08:43:34.668Z","app42_lastCommunicatedAt":"2015-03-12T10:40:31.906Z","app42_model":"SM-G850F","app42_carrier":"A1","app42_screen_width":720,"app42_counter":1,"app42_screen_height":1280,"app42_brand":"samsung","app42_lib_version":"1.0","app42_app_version":"0.30b","app42_screen_dpi":320,"app42_os":"Android"},"userProperties":{"isLoggedIn":true,"userName":"AndroFit","isDeveloper":true,"deviceId":"f27ddbf5446b6057"},"app42_userUpdatedOn":"","eventName":"TE gestartet","installProperties":{},"app42_lastCommunicatedAt":"2015-03-12T10:38:32.852Z"}}}

sortedparams: apiKey_<API_KEY>body{"app42":{"event":{"superProperties":{"app42_os_version":"4.4.4","app42_installAt":"2015-02-16T08:43:34.668Z","app42_lastCommunicatedAt":"2015-03-12T10:40:31.906Z","app42_model":"SM-G850F","app42_carrier":"A1","app42_screen_width":720,"app42_counter":1,"app42_screen_height":1280,"app42_brand":"samsung","app42_lib_version":"1.0","app42_app_version":"0.30b","app42_screen_dpi":320,"app42_os":"Android"},"userProperties":{"isLoggedIn":true,"userName":"AndroFit","isDeveloper":true,"deviceId":"f27ddbf5446b6057"},"app42_userUpdatedOn":"","eventName":"TE gestartet","installProperties":{},"app42_lastCommunicatedAt":"2015-03-12T10:38:32.852Z"}}}sessionIdc40215cb-1549-4581-9de9-ebed18a2a289timeStamp2015-03-12T10:40:33.446Zversion1.0

PostResponse is {"app42":{"response":{"success":true,"event":{"lastCommunicatedAt":"2015-03-12T10:40:34.765Z","name":"TE GESTARTET","type":"EVENT"}}}}

Response : {"app42":{"response":{"success":true,"event":{"lastCommunicatedAt":"2015-03-12T10:40:34.765Z","name":"TE GESTARTET","type":"EVENT"}}}}
To print the response of this method, you can simple call  L.d(MainApp.class, r.toString()); instead of printing it through getStrResponse. It will print the method response for you.

Thanks,
Himanshu Sharma
That does not work either... I even debugged it... And I added a screenshot with all the data in the response. It really is empty in the callback...

https://www.dropbox.com/s/kwtwj9yc9mwg1si/app42%20problem.png?dl=0
Thanks for sharing the screenshots with us. You can find the response success in isResponseSuccess method as you can see in the screen shot as well. However about the response string, we will look into it and let you know for the same. Please check and let us know if it helps.

Thanks,
Himanshu Sharma
thanks. And yes, the success is part of the response, that's correct... I just expected for example following as message:

 {"app42":{"response":{"success":true,"event":{"lastCommunicatedAt":"2015-03-12T10:40:34.765Z","name":"TE GESTARTET","type":"EVENT"}}}}

But for me the thing is working now...
Thanks for sharing this details with us, however event node is not going to return in the response object because it's for internal use. We will return the JSON in {"app42":{"response":{"success":true}}} in our next release. Thanks for having patience.

Himanshu Sharma
0 votes

In "View Apps/Settings" I had to enable "Analytics State"... this should probably be shown in "App Dashboard / Events" as well...

But now I've another problem... trackEvent returns a null response in onSuccess and no event is added... My dashboard always says "You don't have any App Event to Display!"...

answered Mar 12, 2015 by mflisar85 (40 points)
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...