{"action":"created","issue":{"url":"https://api.github.com/repos/microsoftgraph/msgraph-sdk-android/issues/34","repository_url":"https://api.github.com/repos/microsoftgraph/msgraph-sdk-android","labels_url":"https://api.github.com/repos/microsoftgraph/msgraph-sdk-android/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/microsoftgraph/msgraph-sdk-android/issues/34/comments","events_url":"https://api.github.com/repos/microsoftgraph/msgraph-sdk-android/issues/34/events","html_url":"https://github.com/microsoftgraph/msgraph-sdk-android/issues/34","id":186087823,"number":34,"title":"Error trying to download a json file from OneDrive","user":{"login":"kumaraish","id":5192368,"avatar_url":"https://avatars.githubusercontent.com/u/5192368?v=3","gravatar_id":"","url":"https://api.github.com/users/kumaraish","html_url":"https://github.com/kumaraish","followers_url":"https://api.github.com/users/kumaraish/followers","following_url":"https://api.github.com/users/kumaraish/following{/other_user}","gists_url":"https://api.github.com/users/kumaraish/gists{/gist_id}","starred_url":"https://api.github.com/users/kumaraish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kumaraish/subscriptions","organizations_url":"https://api.github.com/users/kumaraish/orgs","repos_url":"https://api.github.com/users/kumaraish/repos","events_url":"https://api.github.com/users/kumaraish/events{/privacy}","received_events_url":"https://api.github.com/users/kumaraish/received_events","type":"User","site_admin":false},"labels":[{"id":336321882,"url":"https://api.github.com/repos/microsoftgraph/msgraph-sdk-android/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":{"login":"iambmelt","id":990063,"avatar_url":"https://avatars.githubusercontent.com/u/990063?v=3","gravatar_id":"","url":"https://api.github.com/users/iambmelt","html_url":"https://github.com/iambmelt","followers_url":"https://api.github.com/users/iambmelt/followers","following_url":"https://api.github.com/users/iambmelt/following{/other_user}","gists_url":"https://api.github.com/users/iambmelt/gists{/gist_id}","starred_url":"https://api.github.com/users/iambmelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iambmelt/subscriptions","organizations_url":"https://api.github.com/users/iambmelt/orgs","repos_url":"https://api.github.com/users/iambmelt/repos","events_url":"https://api.github.com/users/iambmelt/events{/privacy}","received_events_url":"https://api.github.com/users/iambmelt/received_events","type":"User","site_admin":false},"assignees":[{"login":"iambmelt","id":990063,"avatar_url":"https://avatars.githubusercontent.com/u/990063?v=3","gravatar_id":"","url":"https://api.github.com/users/iambmelt","html_url":"https://github.com/iambmelt","followers_url":"https://api.github.com/users/iambmelt/followers","following_url":"https://api.github.com/users/iambmelt/following{/other_user}","gists_url":"https://api.github.com/users/iambmelt/gists{/gist_id}","starred_url":"https://api.github.com/users/iambmelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iambmelt/subscriptions","organizations_url":"https://api.github.com/users/iambmelt/orgs","repos_url":"https://api.github.com/users/iambmelt/repos","events_url":"https://api.github.com/users/iambmelt/events{/privacy}","received_events_url":"https://api.github.com/users/iambmelt/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-10-29T16:38:34Z","updated_at":"2016-11-01T19:03:36Z","closed_at":null,"body":"Using the following code to download a .json file from OneDrive throws exception -\n\n```\nInputStream in = graphServiceClient\n                    .getMe()\n                    .getDrive()\n                    .getItems(path)\n                    .getContent()\n                    .buildRequest()\n                    .get();\n```\n\nException thrown -\n\n```\n D/DefaultHttpProvider[sendRequestInternal] - 196: Starting to send request, URL https://graph.microsoft.com/v1.0/me/drive/items/XXXXXXXXXXXXXXX!375/content\n D/DefaultHttpProvider[sendRequestInternal] - 200: Request Method GET\n     ...\n\nD/DefaultHttpProvider[sendRequestInternal] - 239: Response code 200, OK\nD/DefaultHttpProvider[sendRequestInternal] - 267: Response json\nD/NativeCrypto: ssl=0x7f51e9e200 sslRead buf=0x7f6a32f800 len=2048,timeo=0\nE/DefaultHttpProvider[sendRequestInternal] - 292: Error during http request\nE/DefaultHttpProvider[sendRequestInternal] - 292: Throwable detail: \n          com.microsoft.graph.core.ClientException: Error during http request\n              at com.microsoft.graph.http.DefaultHttpProvider.sendRequestInternal(DefaultHttpProvider.java:289)\n              at com.microsoft.graph.http.DefaultHttpProvider.send(DefaultHttpProvider.java:157)\n              at com.microsoft.graph.http.BaseStreamRequest.send(BaseStreamRequest.java:81)\n              at com.microsoft.graph.generated.BaseDriveItemStreamRequest.get(BaseDriveItemStreamRequest.java:59)\n              ...\n           Caused by: java.lang.RuntimeException: Failed to invoke public java.io.InputStream() with no args\n              at com.google.gson.internal.ConstructorConstructor$3.construct(ConstructorConstructor.java:107)\n              at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:186)\n              at com.google.gson.Gson.fromJson(Gson.java:810)\n              at com.google.gson.Gson.fromJson(Gson.java:775)\n              at com.google.gson.Gson.fromJson(Gson.java:724)\n              at com.google.gson.Gson.fromJson(Gson.java:696)\n              at com.microsoft.graph.serializer.DefaultSerializer.deserializeObject(DefaultSerializer.java:63)\n              at com.microsoft.graph.http.DefaultHttpProvider.handleJsonResponse(DefaultHttpProvider.java:338)\n              at com.microsoft.graph.http.DefaultHttpProvider.sendRequestInternal(DefaultHttpProvider.java:268)\n              at com.microsoft.graph.http.DefaultHttpProvider.send(DefaultHttpProvider.java:157) \n              at com.microsoft.graph.http.BaseStreamRequest.send(BaseStreamRequest.java:81) \n              at com.microsoft.graph.generated.BaseDriveItemStreamRequest.get(BaseDriveItemStreamRequest.java:59) \n              ...\n           Caused by: java.lang.InstantiationException: Can't instantiate abstract class java.io.InputStream\n              at java.lang.reflect.Constructor.newInstance(Native Method)\n              at com.google.gson.internal.ConstructorConstructor$3.construct(ConstructorConstructor.java:104)\n              at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:186) \n              at com.google.gson.Gson.fromJson(Gson.java:810) \n              at com.google.gson.Gson.fromJson(Gson.java:775) \n              at com.google.gson.Gson.fromJson(Gson.java:724) \n              at com.google.gson.Gson.fromJson(Gson.java:696) \n              at com.microsoft.graph.serializer.DefaultSerializer.deserializeObject(DefaultSerializer.java:63) \n              at com.microsoft.graph.http.DefaultHttpProvider.handleJsonResponse(DefaultHttpProvider.java:338) \n              at com.microsoft.graph.http.DefaultHttpProvider.sendRequestInternal(DefaultHttpProvider.java:268) \n              at com.microsoft.graph.http.DefaultHttpProvider.send(DefaultHttpProvider.java:157) \n              at com.microsoft.graph.http.BaseStreamRequest.send(BaseStreamRequest.java:81) \n              at com.microsoft.graph.generated.BaseDriveItemStreamRequest.get(BaseDriveItemStreamRequest.java:59) \n              ...\n```\n"},"comment":{"url":"https://api.github.com/repos/microsoftgraph/msgraph-sdk-android/issues/comments/257662051","html_url":"https://github.com/microsoftgraph/msgraph-sdk-android/issues/34#issuecomment-257662051","issue_url":"https://api.github.com/repos/microsoftgraph/msgraph-sdk-android/issues/34","id":257662051,"user":{"login":"kumaraish","id":5192368,"avatar_url":"https://avatars.githubusercontent.com/u/5192368?v=3","gravatar_id":"","url":"https://api.github.com/users/kumaraish","html_url":"https://github.com/kumaraish","followers_url":"https://api.github.com/users/kumaraish/followers","following_url":"https://api.github.com/users/kumaraish/following{/other_user}","gists_url":"https://api.github.com/users/kumaraish/gists{/gist_id}","starred_url":"https://api.github.com/users/kumaraish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kumaraish/subscriptions","organizations_url":"https://api.github.com/users/kumaraish/orgs","repos_url":"https://api.github.com/users/kumaraish/repos","events_url":"https://api.github.com/users/kumaraish/events{/privacy}","received_events_url":"https://api.github.com/users/kumaraish/received_events","type":"User","site_admin":false},"created_at":"2016-11-01T19:03:36Z","updated_at":"2016-11-01T19:03:36Z","body":"@iambmelt Thanks for the update. Could you please comment on if there is any advantage of doing `.getItems().byId(\"<your id here>\").getContent()`  over `.getItems(\"<your id here>\").getContent()` . Either of them seems to work fine.\r\n\r\nOn a side note, as a temporary workaround for downloading json files from OneDrive, I am using `@microsoft.graph.downloadUrl` returned as part of the DriveItem metadata.\r\n\r\n"}}
{"actor":{"display_login":"kumaraish"}}