Giter Site home page Giter Site logo

Error while trying to get "getEmobility" conn {'pcckErrorKey': 'GRAY_SLICE_ERROR_UNKNOWN_MSG', 'pcckErrorMessage': None, 'pcckErrorCode': None, 'pcckIsBusinessError': True} about pyporscheconnectapi HOT 8 CLOSED

cjne avatar cjne commented on June 16, 2024
Error while trying to get "getEmobility" conn {'pcckErrorKey': 'GRAY_SLICE_ERROR_UNKNOWN_MSG', 'pcckErrorMessage': None, 'pcckErrorCode': None, 'pcckIsBusinessError': True}

from pyporscheconnectapi.

Comments (8)

augmentedtraffic avatar augmentedtraffic commented on June 16, 2024

I started getting some errors a few hours ago but not the same as you when using CLI - I get the following

Note in the past sometimes wait for a few hours (24) and it may start working again. I think I have seen this before and something got reset after a period of time. I was debugging this morning so issued a few API calls in quite a short period of time (which may trigger something)

Traceback (most recent call last):
File "./c.py", line 4, in
cli()
File "/usr/local/lib/python3.7/dist-packages/pyporscheconnectapi/cli.py", line 270, in cli
loop.run_until_complete(main(args))
File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
return future.result()
File "/usr/local/lib/python3.7/dist-packages/pyporscheconnectapi/cli.py", line 47, in main
data = await client.getVehicles()
File "/usr/local/lib/python3.7/dist-packages/pyporscheconnectapi/client.py", line 449, in getVehicles
f"https://api.porsche.com/core/api/v3/{self.locale_str}/vehicles"
File "/usr/local/lib/python3.7/dist-packages/pyporscheconnectapi/connection.py", line 237, in get
headers = await self._createhead(application)
File "/usr/local/lib/python3.7/dist-packages/pyporscheconnectapi/connection.py", line 292, in _createhead
application, wasExpired=(token is not None)
File "/usr/local/lib/python3.7/dist-packages/pyporscheconnectapi/connection.py", line 206, in _requestToken
await self._login()
File "/usr/local/lib/python3.7/dist-packages/pyporscheconnectapi/connection.py", line 171, in _login
resume_url = resp.headers['Location']
KeyError: 'Location'
ERROR:asyncio:Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x734b05d0>
ERROR:asyncio:Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x73544378>, 8222.623261835)]']
connector: <aiohttp.connector.TCPConnector object at 0x734b0530>

from pyporscheconnectapi.

barto64 avatar barto64 commented on June 16, 2024

I am getting this one after 15:00 CET:

2023-11-16 15:11:51.672 ERROR (MainThread) [custom_components.porscheconnect] Unexpected error fetching porscheconnect data: 'vehicleServiceEnabledMap'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 290, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/porscheconnect/init.py", line 256, in _async_update_data
vdata = await self._update_data_for_vehicle(vehicle)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/porscheconnect/init.py", line 146, in _update_data_for_vehicle
services = await self.controller.getServices(vin)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pyporscheconnectapi/client.py", line 488, in getServices
is_privacy = data['vehicleServiceEnabledMap']['VSR'] == 'DISABLED'
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'vehicleServiceEnabledMap'

from pyporscheconnectapi.

fredriklj avatar fredriklj commented on June 16, 2024

I tend to think this may be due to intermittent problems in the back-end. I can see that sometime the same call fails and sometimes it gets through. Let's give it a few days before trying to chase it down further.

from pyporscheconnectapi.

augmentedtraffic avatar augmentedtraffic commented on June 16, 2024

OK it is working for me once again - didn't hit an API for > 12 hours. My typical cadence is about one ping an hour (other than when I am debugging)

from pyporscheconnectapi.

fredriklj avatar fredriklj commented on June 16, 2024

I was still getting seemingly random failures, probably things are in flux as they are rolling out new functions. I may have found out that we need to set a different scope when authenticating.

If you are still experiencing problems, please try out #40 .. grateful for your feedback.

from pyporscheconnectapi.

augmentedtraffic avatar augmentedtraffic commented on June 16, 2024

I had one failure a couple of hours ago but retried (within 20 minutes) and it worked. I will monitor and try your update if I get back into the state of it not working again. Note sometimes when it fails I try the mobile app to ensure their APIs are actually working as it sometimes goes down for a period of time.

from pyporscheconnectapi.

augmentedtraffic avatar augmentedtraffic commented on June 16, 2024

OK I finally got the failures for the last 3 hours. I just tried it failed with the following errors:

Traceback (most recent call last):
File "./porsche1.py", line 142, in
loop.run_until_complete(vehicles())
File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
return future.result()
File "./porsche1.py", line 73, in vehicles
data = await client.getCurrentOverview(vin)
File "/usr/local/lib/python3.7/dist-packages/pyporscheconnectapi/client.py", line 464, in getCurrentOverview
f"https://api.porsche.com/service-vehicle/{self.locale_str}/vehicle-data/{vin}/current/request/{progressResult['requestId']}/status"
KeyError: 'requestId'
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x732b3130>
Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x73321c00>, 337271.991742553)]', '[(<aiohttp.client_proto.ResponseHandler object at 0x732c8420>, 337275.366806426)]']
connector: <aiohttp.connector.TCPConnector object at 0x732b3150>

and then I immediately tried your new patch and it works!!! I will keep using that version and see how it goes.

Thanks!

from pyporscheconnectapi.

fredriklj avatar fredriklj commented on June 16, 2024

If you really want to bring out your daring side (and help me with some testing), you could check out the "cleanup" branch and try that. The name says it all, but also incorporates the fix with the oauth2 scope.

from pyporscheconnectapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.