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

Failed to fetch data from P2G Api #636

Open
raphattack opened this issue Feb 20, 2024 · 7 comments
Open

Failed to fetch data from P2G Api #636

raphattack opened this issue Feb 20, 2024 · 7 comments
Labels

Comments

@raphattack
Copy link

Describe the bug
Upon first starting p2g-api and p2g-webui, I am getting the following error from the webui:

Failed to fetch data from P2G Api - Response could not be deserialized to JSON: GET http://p2g-api:8080/api/peloton/workouts/all?SinceDate=2024-02-19T08%3A00%3A00.0000000Z&WorkoutStatusFilter=Completed - See logs for details.

To Reproduce
Steps to reproduce the behavior:

  1. docker-compose up -d
  2. Navigate to localhost:8002

Expected behavior
Expected the webui to load the home page.

Logs

$ cat p2g/output/p2g_api_log20240219.txt

*********************************************
P2G Version: p2g_api 4.1.0
Operating System: Unix
OS Version: Unix 4.15.0.213
DotNet Runtime: 7.0.14
Docker Deployment: True
Config path: /app/configuration.local.json
*********************************************
2024-02-19 22:36:34.412 -08:00 [INF] *********************************************
2024-02-19 22:36:34.449 -08:00 [INF] P2G Version: p2g_api 4.1.0
2024-02-19 22:36:34.452 -08:00 [INF] Operating System: Unix
2024-02-19 22:36:34.452 -08:00 [INF] OS Version: Unix 4.15.0.213
2024-02-19 22:36:34.452 -08:00 [INF] DotNet Runtime: 7.0.14
2024-02-19 22:36:34.452 -08:00 [INF] Docker Deployment: true
2024-02-19 22:36:34.454 -08:00 [INF] Config path: /app/configuration.local.json
2024-02-19 22:36:34.454 -08:00 [INF] *********************************************
2024-02-19 22:36:34.881 -08:00 [INF] [MIGRATION] Encrypting Peloton and Garmin credentials...
2024-02-19 22:36:34.894 -08:00 [INF] [MIGRATION] Successfully encrypted Peloton and Garmin credentials.
2024-02-19 22:36:34.952 -08:00 [INF] Sync Service stopped.

Installation (please complete the following information):

  • OS: linux
  • Method: docker]
  • Version: webui-stable, api-stable
@raphattack raphattack added the bug label Feb 20, 2024
@bombbr
Copy link

bombbr commented Mar 24, 2024

I am having the same issue, I am also not able to save my Peloton credentials. When I hit save I get "An error has occurred. This application may no longer respond until reloaded. Reload" at the bottom of the page.

Installation (please complete the following information):

OS: mac / M3
Method: Docker
Version: webui-stable, api-stable

@bombbr
Copy link

bombbr commented Mar 24, 2024

Okay, I found a workaround. I was able to save my Garmin credentials in the webui as well as my Peloton email. But I had to manually add my password to the SettingsDb.json file. I stopped the the Docker container, restarted it and refreshed the web ui and it was up and running. The only concern I have is this doesn't encrypt the Peloton credentials the way the Garmin credentials are encrypted.

@philosowaffle
Copy link
Owner

Failing to save the password makes me think you might have a \ character in your password, which is not a supported character.

@bombbr
Copy link

bombbr commented Mar 24, 2024

Failing to save the password makes me think you might have a \ character in your password, which is not a supported character.

No, that's not it... but I do see everything is encrypted now so that's good and it is syncing. That said, when attempting to save a custom deviceInfoPath as "deviceInfoPath": "./deviceInfo.xml" I got the same error where it required a refresh. I went in and adjusted the SettingsDb.json file and it saved, but it didn't use the deviceInfoPath... does it read from the root of the p2g-webui folder or the data folder?

@philosowaffle
Copy link
Owner

Does saving any of the settings work for you? Perhaps this is a permissions issue where the container does not have permissions to write to the directory where the Settings.db is stored.

@bombbr
Copy link

bombbr commented Mar 24, 2024

The Garmin credentials saved without any issue, and the email for Peloton... just not the password for Peloton and now having issues with the Advanced section in the settings tab.

@tomtom215
Copy link

I am facing the same issue as the original post by @raphattack , however this thread is now discussing @bombbr 's issue which I am not facing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants