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

app gallery deployment failed with exit code 3 #9

Open
rajiac2607 opened this issue Oct 13, 2020 · 6 comments
Open

app gallery deployment failed with exit code 3 #9

rajiac2607 opened this issue Oct 13, 2020 · 6 comments

Comments

@rajiac2607
Copy link

app-gallery-deploy@1 (exit code: 3)

Obtaining a Token
Obtaining a Token - Done
Obtaining the File Upload URL
Obtaining the File Upload URL - Done
Uploading a File

and it failed with exit code 3

@d3xt3r2909
Copy link

I'm facing basically the same issue, where I cannot use your step at all. A little bit more info about it:


| (7) app-gallery-deploy@1                                                     |
+------------------------------------------------------------------------------+
| id: app-gallery-deploy                                                       |
| version: 1.1.0                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: bash                                                                |
| time: 2020-11-02T13:41:07Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
INFO[13:41:07]  * [OK] Step dependency (jq) installed, available. 
+ LANG=en-EN
+ FILENAME_TO_UPLOAD=app-release.aab
+ FILE_EXT=aab
+ printf 'File path is: build/app/outputs/bundle/release/app-release.aab\n'
File path is: build/app/outputs/bundle/release/app-release.aab
+ printf 'Lang is: en-EN'
Lang is: en-EN+ printf 'File extension is aab'
File extension is aab+ printf '\n\nObtaining a Token\n'
Obtaining a Token
+ curl --silent -X POST https://connect-api.cloud.huawei.com/api/oauth2/v1/token -H 'Content-Type: application/json' -H 'cache-control: no-cache' -d '{
    "grant_type": "client_credentials",
    "client_id": "MY_CLIENT_ID",
    "client_secret": "[REDACTED]"
}'
++ jq -r .access_token token.json
+ ACCESS_TOKEN=MY_ACCESS_TOKE
+ printf 'Obtaining a Token - Done\n'
Obtaining a Token - Done
+ printf '\nObtaining the File Upload URL\n'
Obtaining the File Upload URL
+ curl --silent -X GET 'https://connect-api.cloud.huawei.com/api/publish/v2/[REDACTED]-url?appid=MY_APP_ID&suffix=aab' -H 'Authorization: Bearer MY_ACCESS_TOKE' -H 'cache-control: no-cache' -H 'client_id: MY_CLIENT_ID'
++ jq -r .[REDACTED]Url [REDACTED]url.json
+ UPLOAD_URL=
++ jq -r .authCode [REDACTED]url.json
+ UPLOAD_AUTH_CODE=
+ printf 'Obtaining the File Upload URL - Done\n'
Obtaining the File Upload URL - Done
+ printf '\nUploading a File\n'
Uploading a File
+ curl --silent -X POST '' -H 'Accept: application/json' -H 'cache-control: no-cache' -H 'content-type: multipart/form-data' -F authCode= -F fileCount=1 -F parseType=1 -F file=@build/app/outputs/bundle/release/app-release.aab
|                                                                              |
+---+---------------------------------------------------------------+----------+
| x | app-gallery-deploy@1 (exit code: 3)                           | 5.63 sec |
+---+---------------------------------------------------------------+----------+
| Issue tracker: ...nd/bitrise-step-huawei-app-gallery-apk-distribution/issues |
| Source: ...b.com/FutureMind/bitrise-step-huawei-app-gallery-apk-distribution |
+---+---------------------------------------------------------------+----------+```

@d3xt3r2909
Copy link

Actually, an issue is that you need to pick N/A for Project when you are creating a new API client. Based on this comment.

@ferPrieto
Copy link

ferPrieto commented Nov 26, 2020

@d3xt3r2909 one thing I see incorrect in yours is the lang value, that should be "en-GB"

@rajiac2607
Copy link
Author

@ferPrieto @d3xt3r2909 changing language to en-GB does not fix the problem
@d3xt3r2909 I am using the plugin in bitrise,where do we need to set project as N/A

@ferPrieto
Copy link

I just highlighted the first thing I saw that was wrong.
To set your project as N/A : in App Gallery Connect, go to User and Permissions -> API Client -> Create
Ad the role as Administrator and it should work @rajiac2607

@rajiac2607
Copy link
Author

@ferPrieto setting project to N/A fixed the problem for me,thank you very much 👍

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

3 participants