-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NullPointerException while reading the response #208
Comments
Hi, Thanks for reporting this bug. Can you please also try to make the same call with graph API, is there any error be throw ? |
I have tried the Graph API from the browser, it is not throwing the exception. But, the above exception coming intermittently. |
@jingping2015 Could you please let me know what can we do here? |
@jingping2015 any update on this? |
Hi, did you tried with another ad account ID to make the api call ? Are they all throw the same error ? |
The issue is intermittent. Not occurring all the times. Is there anything we can do? |
If you get the error again, could you please paste the fbtrace_id in the response here ? |
Sure. But the fbtrace_id also will not get printed during this exception as we are getting the exception while reading the response itself. Please suggest any other way if one is available. |
We started seeing this same issue a few days ago - but now it is occurring consistently across all our apps that use the java sdk - we were using 3.1.0 and now upgraded to 3.1.2 - but same result. The relevant stack trace we see is (on v3.1.2): |
like @srinivasgiduthuri indicated - the facebook API call gets executed successfully. The bug is in the response parsing code in the SDK. Also the code at APIRequest.java:296 is executed within the exception handler in the readResponse method and encounters a null pointer exception - that masks the original exception. I cannot reproduce this bug locally - only happens in our cloud deployed code - which makes this harder to reproduce without modifying the library source and putting some diagnostic code in. We will do this as a last resort, but will appreciate it if you can provide any pointers @jingping2015. |
We have this exact same issue. We've deployed a Spring Boot application in Google Cloud and we keep getting these NPEs whenever the application starts up. It runs without any issues locally, and I've confirmed the exact same requests return results in the Graph Explorer. @nayakravi , @srinivasgiduthuri, @jingping2015 - Was this problem ever resolved? |
Facing the same issue with certain ad accounts, while others do work. Update: I could resolve this by avoiding parallelism. |
Hello team,
We are getting the following exception occasionally. Could you please let us know the reason and how to avoid these errors? We are using Facebook Ads API 3.2.0.
java.lang.NullPointerException
at java.io.Reader.(Reader.java:78)
at java.io.InputStreamReader.(InputStreamReader.java:72)
at com.facebook.ads.sdk.APIRequest.readResponse(APIRequest.java:296)
at com.facebook.ads.sdk.APIRequest.access$100(APIRequest.java:53)
at com.facebook.ads.sdk.APIRequest$DefaultRequestExecutor.sendGet(APIRequest.java:524)
at com.facebook.ads.sdk.APIRequest$DefaultRequestExecutor.execute(APIRequest.java:508)
at com.facebook.ads.sdk.APIRequest.executeInternal(APIRequest.java:197)
at com.facebook.ads.sdk.AdAccount$APIRequestGetCustomAudiences.execute(AdAccount.java:10129)
at com.facebook.ads.sdk.AdAccount$APIRequestGetCustomAudiences.execute(AdAccount.java:10124)
at com.facebook.ads.sdk.AdAccount$APIRequestGetCustomAudiences.execute(AdAccount.java:10100)
The text was updated successfully, but these errors were encountered: