As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
I have developed an Android app that takes data from a Kinvey database, and displays it on screen. My app works perfectly when I run it from Android Studio, however, when I generate a signed APK, and test the app, it doesn't seem to fetch any data from the Kinvey Database.
My app has a feature to submit data also. And the submitting feature seems to work perfectly. However, the app isn't fetching anything. I generated a log from my phone, and this is what shows up when I open the signed APK:
01-07 00:47:19.672 12622 12622 I ContentValues: Failed to fetch jokes
01-07 00:47:20.021 356 356 W auditd : type=1400 "ipacm""/dev/socket/ipacm_log_file"
01-07 00:47:20.021 356 356 W auditd : type=1400 "ipacm""/dev/socket/ipacm_log_file"
01-07 00:47:20.021 356 356 W auditd : type=1400 "ipacm""/dev/socket/ipacm_log_file"
01-07 00:47:20.021 356 356 W auditd : type=1400 "ipacm""/dev/socket/ipacm_log_file"
01-07 00:47:20.267 9550 9639 D ClClient: Not sending keepalive. Current connection state=STOPPED
The exception above is being caused by the following function:
// The exception from the log is coming from this function /** Function to retrieve all verified jokes from database **/ void getJokes(final boolean communityJokes){ Query latestQuery = mKinveyClient.query(); latestQuery.greaterThanEqualTo("verified", 1); latestQuery.addSort("_kmd", AbstractQuery.SortOrder.DESC);
AsyncAppData<JokeEntity> all_jokes = mKinveyClient.appData("jokes", JokeEntity.class); all_jokes.get(latestQuery, new KinveyListCallback<JokeEntity>() { @Override public void onSuccess(JokeEntity[] result) { processJokes(result, communityJokes); } @Override public void onFailure(Throwable error) { Log.i(TAG, "Failed to fetch jokes"); } }); }
Any help would be appreciated. Thanks!
Best Answer
T
Tash-had Saq
said
over 6 years ago
I've found a solution!
When I was writing my Entity class, I got a warning from the Android Studio linter on my empty public entity constructor, telling me that the "Access can be package local." So, I clicked a button and it automatically changed from
public myEntity() {} to myEntity() {}
I discovered the problem when I was reading through the Kinvey documentation and it mentioned that "GenericJson classes must have a public empty constructor" Everything now works as expected on signed, and unsigned APK's. Thanks for your help!
Thank you very much for letting us know that you have solved the problem.
As you continue to work on your application, please reach out to us when you need further assistance. We are happy to help.
Regards,
Billy Gee
Kinvey, Inc.
T
Tash-had Saq
said
over 6 years ago
Hi Billy,
I've found the solution and have submitted it. I think it's awaiting approval on the forum.
Thanks!
Tash-had
B
Billy Gee
said
over 6 years ago
Hello Tash-had Saq,
Thank you for sending the logs. I have reviewed them and will include them in an escalating to Engineering. I did notice that the Android logs and the Network logs occurred at different times on the 7th and this means that the network logs will not be relatable to the Android logs.
In the network logs, it appears that you have received all the data from the Jokes collection that you were asking for from the perspective of the logs. I did find a problem problem in the server logs that I'm looking into with Engineering. The fact that all the requested data from the Jokes collection arrived and was logged locally but you don't get the response and are receiving the JSON parse error instead would seem to indicate something is wrong once the request is received by the app.
I am continuing to work with Engineering. I will update this post as soon as I know more.
Regards,
Billy Gee
Kinvey, Inc.
MLIBZ-1608
T
Tash-had Saq
said
over 6 years ago
Answer
I've found a solution!
When I was writing my Entity class, I got a warning from the Android Studio linter on my empty public entity constructor, telling me that the "Access can be package local." So, I clicked a button and it automatically changed from
public myEntity() {} to myEntity() {}
I discovered the problem when I was reading through the Kinvey documentation and it mentioned that "GenericJson classes must have a public empty constructor" Everything now works as expected on signed, and unsigned APK's. Thanks for your help!
T
Tash-had Saq
said
over 6 years ago
Hi Billy,
I have tracked down the issue. Fetching data seems to raise a KinveyException with the reason "Unable to parse the JSON in the response" and the explanation being "java.lang.IlligalArgumentException." Any way I can get through this?
Thanks
T
Tash-had Saq
said
over 6 years ago
Hey Billy,
I'm curious to know if there are any updates?
Thanks!
T
Tash-had Saq
said
over 6 years ago
Hi Billy,
Thanks for the prompt response!
1. When you created the APK and installed it on the device, was it a brand new installation or were you installing over a previous version?
I tested the issue both ways; once by installing the APK as an update to the version on the Play store, and another as a clean install. The issue persists both ways.
2. Is your app connecting via WiFi or your carrier?
Wi-Fi.
3. Is this problem repeatable every time and if so, does it always fail in the same way? It sounds like it is but I just want to be sure.
Yes. I have tested it on two different devices, one running Android 5.1 and the other running android 6.1. I get the same issue every time.
Since this forum is public, I've sent you an e-mail containing device and network logs from when I open the app.
Let me know if you have any other questions or need anything else like an APK.
Thank you,
Tash-had
B
Billy Gee
said
over 6 years ago
Hello Tash-had Saq,
I just spoke with Engineering and it will be helpful if we could have you reproduce this problem and then provide us with a network dump (if possible) and the full local logs.
We look forward to hearing back from you.
Regards,
Billy Gee
Kinvey
B
Billy Gee
said
over 6 years ago
Hello Tas-had Saq,
Thanks for posting this issue. We are looking into it and will get back with you soon with more information.
I do have some questions.
When you created the APK and installed it on the device, was it a brand new installation or were you installing over a previous version?
Is your app connecting via WiFi or your carrier?
Is this problem repeatable every time and if so, does it always fail in the same way? It sounds like it is but I just want to be sure.
Tash-had Saq
Hi,
I have developed an Android app that takes data from a Kinvey database, and displays it on screen. My app works perfectly when I run it from Android Studio, however, when I generate a signed APK, and test the app, it doesn't seem to fetch any data from the Kinvey Database.
My app has a feature to submit data also. And the submitting feature seems to work perfectly. However, the app isn't fetching anything. I generated a log from my phone, and this is what shows up when I open the signed APK:
01-07 00:47:19.672 12622 12622 I ContentValues: Failed to fetch jokes
01-07 00:47:20.021 356 356 W auditd : type=1400 "ipacm""/dev/socket/ipacm_log_file"
01-07 00:47:20.021 356 356 W auditd : type=1400 "ipacm""/dev/socket/ipacm_log_file"
01-07 00:47:20.021 356 356 W auditd : type=1400 "ipacm""/dev/socket/ipacm_log_file"
01-07 00:47:20.021 356 356 W auditd : type=1400 "ipacm""/dev/socket/ipacm_log_file"
01-07 00:47:20.267 9550 9639 D ClClient: Not sending keepalive. Current connection state=STOPPED
The exception above is being caused by the following function:
Any help would be appreciated. Thanks!
I've found a solution!
When I was writing my Entity class, I got a warning from the Android Studio linter on my empty public entity constructor, telling me that the "Access can be package local." So, I clicked a button and it automatically changed from
I discovered the problem when I was reading through the Kinvey documentation and it mentioned that "GenericJson classes must have a public empty constructor" Everything now works as expected on signed, and unsigned APK's. Thanks for your help!
- Oldest First
- Popular
- Newest First
Sorted by Newest FirstBilly Gee
Hello Tash-had Saq,
Thank you very much for letting us know that you have solved the problem.
As you continue to work on your application, please reach out to us when you need further assistance. We are happy to help.
Regards,
Billy Gee
Kinvey, Inc.
Tash-had Saq
Hi Billy,
I've found the solution and have submitted it. I think it's awaiting approval on the forum.
Thanks!
Tash-had
Billy Gee
Hello Tash-had Saq,
Thank you for sending the logs. I have reviewed them and will include them in an escalating to Engineering. I did notice that the Android logs and the Network logs occurred at different times on the 7th and this means that the network logs will not be relatable to the Android logs.
In the network logs, it appears that you have received all the data from the Jokes collection that you were asking for from the perspective of the logs. I did find a problem problem in the server logs that I'm looking into with Engineering. The fact that all the requested data from the Jokes collection arrived and was logged locally but you don't get the response and are receiving the JSON parse error instead would seem to indicate something is wrong once the request is received by the app.
I am continuing to work with Engineering. I will update this post as soon as I know more.
Regards,
Billy Gee
Kinvey, Inc.
MLIBZ-1608
Tash-had Saq
I've found a solution!
When I was writing my Entity class, I got a warning from the Android Studio linter on my empty public entity constructor, telling me that the "Access can be package local." So, I clicked a button and it automatically changed from
I discovered the problem when I was reading through the Kinvey documentation and it mentioned that "GenericJson classes must have a public empty constructor" Everything now works as expected on signed, and unsigned APK's. Thanks for your help!
Tash-had Saq
Hi Billy,
I have tracked down the issue. Fetching data seems to raise a KinveyException with the reason "Unable to parse the JSON in the response" and the explanation being "java.lang.IlligalArgumentException." Any way I can get through this?
Thanks
Tash-had Saq
Hey Billy,
I'm curious to know if there are any updates?
Thanks!
Tash-had Saq
Hi Billy,
Thanks for the prompt response!
1. When you created the APK and installed it on the device, was it a brand new installation or were you installing over a previous version?
I tested the issue both ways; once by installing the APK as an update to the version on the Play store, and another as a clean install. The issue persists both ways.
2. Is your app connecting via WiFi or your carrier?
Wi-Fi.
3. Is this problem repeatable every time and if so, does it always fail in the same way? It sounds like it is but I just want to be sure.
Yes. I have tested it on two different devices, one running Android 5.1 and the other running android 6.1. I get the same issue every time.
Since this forum is public, I've sent you an e-mail containing device and network logs from when I open the app.
Let me know if you have any other questions or need anything else like an APK.
Thank you,
Tash-had
Billy Gee
Hello Tash-had Saq,
I just spoke with Engineering and it will be helpful if we could have you reproduce this problem and then provide us with a network dump (if possible) and the full local logs.
We look forward to hearing back from you.
Regards,
Billy Gee
Kinvey
Billy Gee
Hello Tas-had Saq,
Thanks for posting this issue. We are looking into it and will get back with you soon with more information.
I do have some questions.
When you created the APK and installed it on the device, was it a brand new installation or were you installing over a previous version?
Is your app connecting via WiFi or your carrier?
Is this problem repeatable every time and if so, does it always fail in the same way? It sounds like it is but I just want to be sure.
Regards,
Billy Gee
Kinvey
-
Can I add KinveyReferences and other custom Arrays to the User entity?
-
How can I use custom enums within my Entity?
-
Linking an image does not save with LinkedData
-
How can I get all records saved by the current user?
-
Why don't all users see the same data when querying?
-
Retrieving related file from datastore collection - continued
-
Problem implementing sign up / login
-
Can Android API be used for Java?
-
I'm not receiving push notifications
-
It is impossible to receive object according to the link
See all 259 topics