Odevio-CLI icon indicating copy to clipboard operation
Odevio-CLI copied to clipboard

Unable to access apple developer API to retrieve devices

Open SimonPrins opened this issue 2 years ago • 8 comments

I have been using appollo fine up until recently, but now when I try to do a build, I get the error:

Error: App Store Connect error 403 Forbidden [/v1/devices?limit=200]

It sound like appollo no longer has access to my devices from my apple account, but I am not sure why. The appollo apple refresh-devices gives the same error.

I have tried to remove my apple account from appollo and add it again using a new key, however the appollo apple add command now also gives the same error.

Is it possible something changed in the apple API so that appollo is no longer able to connect to the developer api using the api key?

SimonPrins avatar Jun 22 '23 12:06 SimonPrins

I have a similar problem preventing me to make a new build. Here is my full log :

$ appollo apple refresh-devices
Traceback (most recent call last):
  File "/home/getyourway/.local/bin/appollo", line 8, in <module>
    sys.exit(appollo())
  File "/home/getyourway/.local/lib/python3.8/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/home/getyourway/.local/lib/python3.8/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/home/getyourway/.local/lib/python3.8/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/getyourway/.local/lib/python3.8/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/getyourway/.local/lib/python3.8/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/getyourway/.local/lib/python3.8/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/home/getyourway/.local/lib/python3.8/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/getyourway/.local/lib/python3.8/site-packages/appollo/helpers.py", line 57, in run
    return ctx.invoke(f, *args, **kwargs)
  File "/home/getyourway/.local/lib/python3.8/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/home/getyourway/.local/lib/python3.8/site-packages/appollo/commands/apple.py", line 386, in refresh_devices
    devices = api.get(f"/developer-accounts/{key}/refresh-devices/")
  File "/home/getyourway/.local/lib/python3.8/site-packages/appollo/api.py", line 85, in get
    return _request("get", route, params=params, authorization=authorization, auth_data=auth_data, json_decode=json_decode)
  File "/home/getyourway/.local/lib/python3.8/site-packages/appollo/api.py", line 59, in _request
    print_validation_error(console, error)
  File "/home/getyourway/.local/lib/python3.8/site-packages/appollo/helpers.py", line 24, in print_validation_error
    console.print(f"Error: {error}")
  File "/home/getyourway/.local/lib/python3.8/site-packages/rich/console.py", line 1590, in print
    renderables = self._collect_renderables(
  File "/home/getyourway/.local/lib/python3.8/site-packages/rich/console.py", line 1454, in _collect_renderables
    self.render_str(
  File "/home/getyourway/.local/lib/python3.8/site-packages/rich/console.py", line 1346, in render_str
    rich_text = render_markup(
  File "/home/getyourway/.local/lib/python3.8/site-packages/rich/markup.py", line 159, in render
    raise MarkupError(
rich.errors.MarkupError: closing tag '[/v1/devices?limit=200]' at position 45 doesn't match any open tag

TheToto42 avatar Aug 23 '23 14:08 TheToto42

Hi, do you have the latest version of Appollo? This was fixed by #37

tchavetdeuse avatar Aug 24 '23 08:08 tchavetdeuse

Hi @tchavetdeuse, It was indeed the last version. I already had another version 1.1.0 installed, and I had to make the fix by myself in the code. In the end, I got the same error as Simon with the Forbidden error. Was it fixed in the same PR ?

TheToto42 avatar Aug 25 '23 11:08 TheToto42

The PR doesn't fix this issue, it only fixes it so that the error displays properly, but the build will still fail.

SimonPrins avatar Aug 26 '23 09:08 SimonPrins

Hi, the 403 forbidden error can happen if you haven't accepted the latest Apple user agreement on app store connect. We will see if we can also display the error message returned by Apple for more information in those cases.

tchavetdeuse avatar Aug 28 '23 07:08 tchavetdeuse

I don't know what's happening but it won't let me link my Apple Developer account, can someone help me?

zLuoManhwas avatar Nov 01 '23 15:11 zLuoManhwas

Hi, you can create an issue with the error you're experiencing and we will gladly help you solve it.

JulienP95 avatar Nov 02 '23 07:11 JulienP95

Julien, Muchas gracias, ya logre arreglar un poco el codigo para que usara otro metodo de inicio de sesion mas rudimentario pero gracias!!

zLuoManhwas avatar Nov 09 '23 01:11 zLuoManhwas