I get a null reference error for RESTConnectorWWW when ever I do any API calls

0 votes

DLL version: App42-Unity3D-SDK-4.2

Unity SDK

I am trying to make a prototype using App42 and Appwarp service for the android platform. 

ERROR: I get this error for any api calls I do 

NullReferenceException: Object reference not set to an instance of an object
com.shephertz.app42.paas.sdk.csharp.connection.RESTConnectorWWW+<Execute>d__6.MoveNext () (at <85575a1ab73c4d6e95c6bfeaefc8478d>:0)
com.shephertz.app42.paas.sdk.csharp.connection.RESTConnectorWWW+<WaitForRequest>d__3.MoveNext () (at <85575a1ab73c4d6e95c6bfeaefc8478d>:0)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Scripting/Coroutines.cs:17)
 

When I tried intergrating App42 service to the protoype I all get an error, callstack as shown above. Currently the services I have been trying to implement are

  1. User Service 
  2. Storage Service 

Using the user service I have create Users, 

Snippet: m_refUserService.CreateUser(App42ServicesData.m_strUsername,App42ServicesData.m_strPwd, App42ServicesData.m_strEmailId, m_refapp42UserServiceListener); I get NullReferenceException: Object reference not set to an instance of an object error but when I check the User Dashboard in App42 I can see the user 

 

As the data was being uploaded correctly I carried on and started to integrate Storage Services, I get the same error but this time the data is not saved on the server. I have added code statement App42Log.SetDebug(true); so as to get App42Logs 

I tried calling User Service Api GetUser

SNIPPET: m_refUserService.GetUser(App42ServicesData.m_strUsername, m_refapp42UserServiceListener);

I have attached a txt file containing the debug logs and the code 

User creation seems to work, I can see the added users in the dashboard but nothing else seems to work. All Api calls throws null references. I can see RESTConnectorWWW gameobject in the hierrarchy. 

I have tried to give as much as information as possible I hope It helps the team help me quickly and better. Thank you

 

asked Oct 14, 2019 in Android by jeeth.b (11 points)
After enabling App42 logs I was able to identify the problem inserting the data but the null reference still persists. This null reference stops execution in unity because of which the callbacks are not called but the app42 logs show success and the retrieved data.

1 Answer

0 votes
Hi Jeeth,

We have forwarded your query to our team and they are looking into it, we wil get back you as soon as possible.

Regards,

Priyanka Singh
answered Oct 15, 2019 by priyanka.singh (186 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
...