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

Framework upload to Amazon's S3 failure #73

Closed
bay2 opened this issue May 27, 2017 · 10 comments
Closed

Framework upload to Amazon's S3 failure #73

bay2 opened this issue May 27, 2017 · 10 comments

Comments

@bay2
Copy link

bay2 commented May 27, 2017

Enhancement Suggestion

[Short description of suggestion]

**Steps which explain the enhancement**

1. run `carthage update --platform ios && rome upload --platform ios`

**Current and suggested behavior**

output:

Copied Alamofire.framework to: /Users/xuemincai/Library/Caches/Rome/Alamofire/iOS/Alamofire.framework-4.4.0.zip
Error uploading Alamofire: Unexpected Error
**Why would the enhancement be useful to most users**


**Rome version: 0.11.0.27
**OS and version: macOS Sierra 10.12.5
@tmspzz
Copy link
Owner

tmspzz commented May 27, 2017

Hi, thanks for opening an issue. Does this problem only happen with Alamofire? It seems to be an issue with your S3 bucket. Do you have correct permissions & right credentials? Can you post your Romefile?

@bay2
Copy link
Author

bay2 commented May 28, 2017

All of the framework has a problem.I try to use the aws s3 cp Alamofire.framework.dSYM-4.4.0.zip s3://com.sim.carthage/ is a success.

Romefile

[Cache]
  local = ~/Library/Caches/Rome/
  S3-Bucket = com.sim.carthage

[RepositoryMap]
  Alamofire = Alamofire

@tmspzz
Copy link
Owner

tmspzz commented May 28, 2017

Thanks I will look into it as soon as I am home.

Other debug into that might be useful: Do you have .aws/config and .aws/credentials or are you using environment variables? Are you using the [default] profile? On what region is the bucket?

Can you try a different bucket name? It might be just something stupid like the . in the name.

Just a tip: you don't need the entry in the repository map if the framework name follows the organization/framework_name pattern on Github. Alamofire.framwork does follow this pattern since the repo is called Alamofire/Alamofie

@tmspzz
Copy link
Owner

tmspzz commented May 29, 2017

@bay2 It's definitely not the . in your bucket name. Can you tell me if you are using credential and config files or environment variables?

Also can you put your Alamofire at Alamofire/iOS/Alamofire.framework-4.4.0.zip on S3 in your bucket and try to rome download ?

I believe this can still be a problem with your S3 permissions. You basically want IAM policies like this:

{
    "Version": "2012-10-17",
    "Id": "Policy1496088162628",
    "Statement": [
        {
            "Sid": "Stmt1496088158429",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:*",
            "Resource": "arn:aws:s3:::com.sim.carthage"
        }
    ]
}

@tmspzz
Copy link
Owner

tmspzz commented May 29, 2017

@bay2 I have tried with both environment variables and file credentials with a bucket named com.sim2.carthage2 I created on ap-southeast-1 (Singapore)

The bucket policy is the one I pasted above. The ACL for my bucket is Read/Write for Any AWS Authenticated User and I see no problem. If I restrict permissions then the error from Rome is Access denied.

If you have any more that you can share I'll be happy to try to replicate again on my side.

@tmspzz
Copy link
Owner

tmspzz commented May 30, 2017

@bay2 do you mind it I try with those?

@bay2
Copy link
Author

bay2 commented May 30, 2017

Oh, my S3 configuration problem.Thank you for your help.

@bay2 bay2 closed this as completed May 30, 2017
@bay2
Copy link
Author

bay2 commented May 30, 2017

@blender Now I uploaded successfully,Thanks

@tmspzz
Copy link
Owner

tmspzz commented May 30, 2017

@bay2 Great! Can you share your config? Is it any different from what I suggested?

@bay2
Copy link
Author

bay2 commented May 30, 2017

I created a bucket in the ap-southeast-1 (Singapore) is uploaded successfully.
I created a bucket in the ap-northeast-1 (Tokyo) is uploaded failure.
I not idea...

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

2 participants