Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Support Alpakka listBucket #66

Closed
jorkzijlstra opened this issue Sep 14, 2017 · 1 comment
Closed

Support Alpakka listBucket #66

jorkzijlstra opened this issue Sep 14, 2017 · 1 comment
Milestone

Comments

@jorkzijlstra
Copy link

Attempting a listBucket with alpakka results in Unsupported Content-Type, supported: application/xml; charset=UTF-8. This is likely caused by the returned content type from s3mock being plain/text for the InitiateMultiUpload request.

Using the latest master (containing the upload fix) lets me put the objects, but it does not let me do a listBucket after it.

It tries to Unmarshal:

HttpEntity.Strict(text/plain; charset=UTF-8,<ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
      <Name>testBucket</Name>
      None
      None
      
      <KeyCount>3</KeyCount>
      <MaxKeys>1000</MaxKeys>
      <IsTruncated>false</IsTruncated>
        <Contents>
          <Key>2b2ce68f-676a-4cab-9627-51d9e8408d46.xml</Key>
          <LastModified>2017-09-14T12:06:22Z</LastModified>
          <ETag>0</ETag>
          <Size>477332</Size>
          <StorageClass>STANDARD</StorageClass>
        </Contents>
    </ListBucketResult>)

So it seems to be a similar issue as in #61

The Output

Unsupported Content-Type, supported: application/xml; charset=UTF-8
akka.http.scaladsl.unmarshalling.Unmarshaller$UnsupportedContentTypeException: Unsupported Content-Type, supported: application/xml; charset=UTF-8
	at akka.http.scaladsl.unmarshalling.Unmarshaller$UnsupportedContentTypeException$.apply(Unmarshaller.scala:158)
	at akka.http.scaladsl.unmarshalling.Unmarshaller$EnhancedFromEntityUnmarshaller$.$anonfun$forContentTypes$3(Unmarshaller.scala:114)
	at akka.http.scaladsl.unmarshalling.Unmarshaller$$anon$1.apply(Unmarshaller.scala:58)
	at akka.http.scaladsl.unmarshalling.Unmarshaller$EnhancedUnmarshaller$.$anonfun$mapWithInput$3(Unmarshaller.scala:91)
	at akka.http.scaladsl.unmarshalling.Unmarshaller$$anon$1.apply(Unmarshaller.scala:58)
	at akka.http.scaladsl.unmarshalling.Unmarshaller.$anonfun$transform$3(Unmarshaller.scala:23)
	at akka.http.scaladsl.unmarshalling.Unmarshaller$$anon$1.apply(Unmarshaller.scala:58)
	at akka.http.scaladsl.unmarshalling.Unmarshal.to(Unmarshal.scala:25)
	at akka.stream.alpakka.s3.impl.S3Stream.$anonfun$signAndGetAs$2(S3Stream.scala:248)
	at scala.concurrent.Future.$anonfun$flatMap$1(Future.scala:302)
	at scala.concurrent.impl.Promise.$anonfun$transformWith$1(Promise.scala:37)
	at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:60)
	at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55)
	at akka.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:91)
	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
	at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:81)
	at akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:91)
	at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:39)
	at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:415)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
@ncanibano
Copy link

We are testing s3 using alpakka with s3mock and we are also facing this same issue.

@shuttie shuttie added this to the 0.2.4 milestone Nov 4, 2017
@shuttie shuttie closed this as completed in a2bf502 Nov 4, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants