shr3jn/fastlane-plugin-huawei_appgallery_connect

Sample gives me a "unexpected token at ''"

Closed this issue · 6 comments

Hi,

I just startet developing for Huawei App Gallery. I created my account and set up the application Draft.
Then I included your plugin and changed the keys like in the sample.

This gives me:

[14:39:52]: ---------------------------------------
[14:39:52]: --- Step: huawei_appgallery_connect ---
[14:39:52]: ---------------------------------------
[14:39:52]: Fetching app access token
[14:39:54]: Fetching upload URL
+------------------+---------+
|        Lane Context        |
+------------------+---------+
| DEFAULT_PLATFORM | android |
| PLATFORM_NAME    |         |
| LANE_NAME        | test    |
+------------------+---------+
[14:39:57]: 783: unexpected token at ''

Am I missing something here? Do I need to upload the first apk manually before I can use this fastlane plugin? How can I set a new version?

Thank you in advance!

can you show your fastfile?

Sure :)

lane :test do
  gradle({
    task: "clean"
  })
  gradle({
    task: "assembleRelease"
  })
  huawei_appgallery_connect(
    client_id: "xxx",
    client_secret: "xxx",
    app_id: "xxx",
    apk_path: "app/build/outputs/apk/release/app-release.apk",
  )
end

@philipp65 Have you setup privacy policy, content rating on App Gallery for your app?

Also, you will need to select countries where your app will be available.

@philipp65 Have you setup privacy policy, content rating on App Gallery for your app?
Also, you will need to select countries where your app will be available.

@shr3jn I did both of that. I also released an app manually in the meantime and I still get the same error.
Unbenannt

Maybe it has something to do because it's a corporate account. I will try to checkout your project to get more debugging output and maybe a PR. Thanks

Hi,

I forked this branch and reproduced every step inside Postman. The route oauth was fine. The route upload-url gave me a 401.
I created a dedicated API Token without success at first but after about 2 hours it worked. So basically there's nothing wrong with the code, my apologies. I created a PR for a more detailled output which may help others in the same situation.