-
Notifications
You must be signed in to change notification settings - Fork 450
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
'java.lang.String com.dropbox.core.DbxRequestConfig.getUserLocale()' on a null object reference #347
Comments
Thanks for the report. I just tried running this code with the same Dropbox SDK version and Android API level you mentioned, but the exception doesn't occur for me. Can you double check the version of the SDK you have installed, and that this is the exact code you're running when this occurs? Also, can you check the value returned by |
I am facing the same issue. Have you found a solution yet?? Dropbox-SDK 4.0.0 I have recieved following crash report in crashlytics Fatal Exception: java.lang.RuntimeException: An error occurred while executing doInBackground() Caused by java.lang.NullPointerException: Attempt to read from field 'java.lang.String j4.l.b' on a null object reference is this issue fixed in v5.0.0?? |
@CMTRehan We weren't able to reproduce the issue originally reported here, and we haven't heard back from the original commenter, so I don't have any information to add to this. Your error message looks slightly different than the original one, but as a best practice I do recommend upgrading to the latest version of the SDK anyway, currently v5.0.0. If you're still seeing the issue with that, please share the necessary steps and code to reproduce the issue so we can look into it. |
An Android app initiates the OAuth sequence by calling one of the methods
The problem is the Android now wants to go back to The sample Android app in Dropbox SDK has this in its
It tries to prevent re-creation of the activity with |
@tdtran Thanks for the detailed message! That's very helpful. We'll look into it. |
Still happening on 5.2.0, though probably fairly rare. Seen reported on a Samsung Android 12 device:
|
@bubbleguuum Thanks for the note! This is still open with the team. |
I can confirm it still happens on 5.3.0 =( . Please fix it.
|
@kruil Thanks for the information. This is still open with the team, and I'll follow up here once I have an update on it. |
Fixed in #443, will be releasing 5.4.0 by early next week. |
Update: v5.4.2 is out with the fix for this. Please use that and let us know if you're still seeing any issues. Thanks! |
Still crash on v5.4.2!!! Nothing changed. |
@alexplanetart could you provide us with a stacktrace of the crash? |
@devPalacio @alexplanetart - I see the stack traces from before. It walked through some of the flows and it looks like locale can be nullable. I can't address this immediately because I'm out of town, but can get this in a patch version soon. Sorry, I thought this nullability was handled in the Kotlin conversion, but it wasn't because it's a nested property. Will get to this and get a fix early next week. Cheers. |
@handstandsam @devPalacio |
Login with dropbox account I got crash.
implementation 'com.dropbox.core:dropbox-core-sdk:4.0.1'
Api level 30
My Code :
public class DbxRequestConfigFactory {
private static DbxRequestConfig sDbxRequestConfig;
public static DbxRequestConfig getRequestConfig() {
if (sDbxRequestConfig == null) {
sDbxRequestConfig = DbxRequestConfig.newBuilder("myapp-dropbox-v2")
.withHttpRequestor(new OkHttp3Requestor(OkHttp3Requestor.defaultOkHttpClient()))
.build();
}
return sDbxRequestConfig;
}
}
Auth.startOAuth2PKCE(this, getString(R.string.app_key),DbxRequestConfigFactory.getRequestConfig());
Logs below
Fatal Exception: java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$4.done(AsyncTask.java:399)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
at java.util.concurrent.FutureTask.run(FutureTask.java:271)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.dropbox.core.DbxRequestConfig.getUserLocale()' on a null object reference
at com.dropbox.core.DbxPKCEManager.makeTokenRequest(DbxPKCEManager.java:107)
at com.dropbox.core.android.AuthActivity$TokenRequestAsyncTask.doInBackground(AuthActivity.java:793)
at com.dropbox.core.android.AuthActivity$TokenRequestAsyncTask.doInBackground(AuthActivity.java:782)
at android.os.AsyncTask$3.call(AsyncTask.java:378)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
The text was updated successfully, but these errors were encountered: