Closed JuggernautInteractive closed 11 years ago
The object is not missing, If you check the AWSSDK/Amazon.S3/Model you can see the file is there
quoting from another bug report:
"The problem for MonoTouch is that it is not possible to execute code dynamically like this, it has to be compiled (to native code) into the app before installing the app on a device (this is an iOS restriction), so this will unfortunately not be fixed."
long story short, I think this method (and many others) would have to be reimplemented for this to work.
forgot to mention... I am getting a response from AWS ListBuckets, here's the "responseBody" param going into the transform string method.
<?xml version="1.0" encoding="UTF-8"?>
thanks for the tips, I'll see if I can hack around the parts I need for my test app.
I just pushed a fix. I no longer get that error.
Wow the fix was so simple... I thought it was a very different matter.
bOoM! thanks for the fix, it's working :+1:
nice work gents, you guys are why this community is so great :)
I'm still experiencing this issue in my MonoDroid application. Was a similar fix pushed for the Android project awhile back?
Here's my code:
AmazonS3 client = AWSClientFactory.CreateAmazonS3Client (ACCESS_KEY, SECRET_KEY); ListObjectsRequest listObjectsRequest = new ListObjectsRequest ().WithBucketName (BUCKET_NAME); ListObjectsResponse listObjectsResponse = client.ListObjects (listObjectsRequest);
Here's the error I get when I step through to the next line:
Object reference not set to an instance of an object
at System.Xml.XmlInputStream.Initialize (System.IO.Stream stream) [0x00000] in
Hi guys, I just started using the S3 client and it's throwing a null stream exception when trying to parse the response, or transform it rather. seems to be looking for an embedded xslt file?
issue occurs here: File: /amazon-master/AWSSDK/Amazon.S3/AmazonS3Client.cs Line 6667: string transform(string responseBody, string actionName, Type t)
Here's the client calling code: var client = Amazon.AWSClientFactory.CreateAmazonS3Client("", "");
var bucketList = client.ListBuckets().Buckets; foreach (Amazon.S3.Model.S3Bucket b in bucketList) {
Console.WriteLine(b.BucketName);
}
Which gives this Exception Stack:
[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object at System.Xml.XmlInputStream.Initialize (System.IO.Stream stream) [0x0001e] in /Developer/MonoTouch/Source/mono/mcs/class/System.XML/System.Xml/XmlInputStream.cs:389 at System.Xml.XmlInputStream..ctor (System.IO.Stream stream) [0x00006] in /Developer/MonoTouch/Source/mono/mcs/class/System.XML/System.Xml/XmlInputStream.cs:362 at System.Xml.XmlStreamReader..ctor (System.IO.Stream input) [0x00000] in:0
at System.Xml.XmlTextReader..ctor (System.IO.Stream input) [0x00000] in :0
at Amazon.S3.AmazonS3Client.transform (System.String responseBody, System.String actionName, System.Type t) [0x0008d] in /Users/duggernaut/Code/MonoTouch/OpenSource/amazon-master/AWSSDK/Amazon.S3/AmazonS3Client.cs:6694
at Amazon.S3.AmazonS3Client.processRequestResponse[ListBucketsResponse](System.Net.HttpWebResponse httpResponse, Amazon.S3.Model.S3Request request, System.Type t, Amazon.S3.Model.ListBucketsResponse& response, System.Exception& cause) [0x0025a] in /Users/duggernaut/Code/MonoTouch/OpenSource/amazon-master/AWSSDK/Amazon.S3/AmazonS3Client.cs:6285
at Amazon.S3.AmazonS3Client.handleHttpResponse[ListBucketsResponse](Amazon.S3.Model.S3Request userRequest, System.Net.HttpWebRequest request, System.Net.HttpWebResponse httpResponse, Int32 retries, Int64 lengthOfRequest, Amazon.S3.Model.ListBucketsResponse& response, System.Exception& cause, System.Net.HttpStatusCode& statusCode) [0x000a5] in /Users/duggernaut/Code/MonoTouch/OpenSource/amazon-master/AWSSDK/Amazon.S3/AmazonS3Client.cs:6086
at Amazon.S3.AmazonS3Client.getResponseCallback[ListBucketsResponse](IAsyncResult result) [0x000aa] in /Users/duggernaut/Code/MonoTouch/OpenSource/amazon-master/AWSSDK/Amazon.S3/AmazonS3Client.cs:5822
any ideas?