Skip to content
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

IllegalArgument exception #201

Closed
xor22h opened this issue Oct 20, 2015 · 7 comments
Closed

IllegalArgument exception #201

xor22h opened this issue Oct 20, 2015 · 7 comments

Comments

@xor22h
Copy link

xor22h commented Oct 20, 2015

It looks like OkHTTP client implemetation is making some problems. It looks like parse SDK is trying to set null as a value for a header;

If I remove OkHTTP library from project -> it works;

10-20 16:02:06.219 16415 16415 W System.err: java.lang.IllegalArgumentException: value == null
10-20 16:02:06.219 16415 16415 W System.err:    at com.squareup.okhttp.Headers$Builder.checkNameAndValue(Headers.java:291)
10-20 16:02:06.219 16415 16415 W System.err:    at com.squareup.okhttp.Headers$Builder.add(Headers.java:245)
10-20 16:02:06.219 16415 16415 W System.err:    at com.parse.ParseOkHttpClient.getRequest(ParseOkHttpClient.java:140)
10-20 16:02:06.219 16415 16415 W System.err:    at com.parse.ParseOkHttpClient.executeInternal(ParseOkHttpClient.java:66)
10-20 16:02:06.219 16415 16415 W System.err:    at com.parse.ParseHttpClient$ParseNetworkInterceptorChain.proceed(ParseHttpClient.java:158)
10-20 16:02:06.219 16415 16415 W System.err:    at com.parse.ParsePlugins$1.intercept(ParsePlugins.java:115)
10-20 16:02:06.219 16415 16415 W System.err:    at com.parse.ParseHttpClient$ParseNetworkInterceptorChain.proceed(ParseHttpClient.java:147)
10-20 16:02:06.219 16415 16415 W System.err:    at com.parse.ParseHttpClient.execute(ParseHttpClient.java:122)
10-20 16:02:06.219 16415 16415 W System.err:    at com.parse.ParseRequest$3.then(ParseRequest.java:150)
10-20 16:02:06.219 16415 16415 W System.err:    at com.parse.ParseRequest$3.then(ParseRequest.java:147)
10-20 16:02:06.219 16415 16415 W System.err:    at bolts.Task$15.run(Task.java:825)
10-20 16:02:06.219 16415 16415 W System.err:    at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105)
10-20 16:02:06.219 16415 16415 W System.err:    at bolts.Task.completeAfterTask(Task.java:816)
10-20 16:02:06.219 16415 16415 W System.err:    at bolts.Task.continueWithTask(Task.java:628)
10-20 16:02:06.219 16415 16415 W System.err:    at bolts.Task.continueWithTask(Task.java:639)
10-20 16:02:06.219 16415 16415 W System.err:    at bolts.Task$13.then(Task.java:731)
10-20 16:02:06.219 16415 16415 W System.err:    at bolts.Task$13.then(Task.java:719)
10-20 16:02:06.219 16415 16415 W System.err:    at bolts.Task$15.run(Task.java:825)
10-20 16:02:06.219 16415 16415 W System.err:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
10-20 16:02:06.219 16415 16415 W System.err:    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
10-20 16:02:06.219 16415 16415 W System.err:    at java.lang.Thread.run(Thread.java:818)
@xor22h
Copy link
Author

xor22h commented Oct 20, 2015

More interesting stuff:

If I install app without OkHTTP and launch it -> it works;
If I install never app version on top with OkHTTP -> it still works;
If I clear app data, and keep it with OkHTTP -> it generates the same exception;
If i remove app and install version with OkHTTP -> it generates the same exception;

@parse-github-bot
Copy link

Thank you for your feedback. We prioritize issues that have clear and concise repro steps. Please see our Bug Reporting Guidelines about what information should be added to this issue.

Please try the latest SDK. Our release notes have details about what issues were fixed in each release.

In addition, you might find the following resources helpful:

@grantland
Copy link
Contributor

To help us debug this, would you be able to provide a project and repro steps?

@xor22h
Copy link
Author

xor22h commented Oct 21, 2015

You can get a project here: http://lisauskas.lt/parseandroid_201.tar.gz
Also. It you compile and install it -> it's going to crash. I'm not cathing illegalArgumentException on purpose;

If you remove OKHttp dependancy from build.gradlew -> it works without problems; Now, if you add OKHTTP dependancy back -> it still works without problems, but if you clear app data, or remove it before installing it starts crashing again 👎

@grantland
Copy link
Contributor

The problem with the sample project you linked is that there is no versionName set for your application. You have it referencing a script that uses a git hash, but since the folder isn't in a git repository, you're missing the versionName.

@xor22h
Copy link
Author

xor22h commented Oct 22, 2015

Ok, my bad. Seems that was a issue. Adding git tag on project on which example was based on solved an issue.

Just wondering why it worked without OkHTTP?

@xor22h xor22h closed this as completed Oct 22, 2015
@grantland
Copy link
Contributor

Great to hear that your issue is resolved!

As to why it worked without OkHttp, I'm assuming it has different contracts than Apache or HttpURLConnection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants