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

POST not working on prod but OK on dev #722

Closed
Anoerak opened this issue Dec 21, 2024 · 12 comments
Closed

POST not working on prod but OK on dev #722

Anoerak opened this issue Dec 21, 2024 · 12 comments

Comments

@Anoerak
Copy link

Anoerak commented Dec 21, 2024

Describe the bug
When environment set up on prod, impossible to modify your email address, add your Wakatime API...
If set up on dev, everything is working.

System information
Please provide information on:

  • Wakapi version => latest
  • Operating system => ghcr.io/muety/wakapi:latest
  • Database => postgres 17

Docker Compose

@Anoerak Anoerak changed the title POST not working on prodbut OK on dev POST not working on prod but OK on dev Dec 21, 2024
@muety
Copy link
Owner

muety commented Dec 22, 2024

Can you please give some more details? What exact error message are you getting, etc.?

@Anoerak
Copy link
Author

Anoerak commented Dec 22, 2024

Can you please give some more details? What exact error message are you getting, etc.?

Hi,

sure:

  • for the API key => Failed to connect to wakatime, api key or endpoint url invalid but works fine in devmode.
  • fir the email address => Error: Invalid parameters - perhaps invalid e-mail address? but again works fine in devmode.

I tried to replace devwith prod or production but couldn't change the email address or use my API key.

@muety
Copy link
Owner

muety commented Dec 22, 2024

Can you check the Wakapi server logs as well, please? And additionally send a screenshot of the browser console?

@Anoerak
Copy link
Author

Anoerak commented Dec 23, 2024

Can you check the Wakapi server logs as well, please? And additionally send a screenshot of the browser console?

Screenshot 2024-12-23 at 10 11 34 AM Screenshot 2024-12-23 at 10 14 29 AM

@muety
Copy link
Owner

muety commented Dec 23, 2024

Thanks, can you please also share a screenshot of your browser console (F12 / DevTools)?

@Anoerak
Copy link
Author

Anoerak commented Dec 23, 2024

Thanks, can you please also share a screenshot of your browser console (F12 / DevTools)?

Screenshot 2024-12-23 at 2 06 57 PM Screenshot 2024-12-23 at 2 06 41 PM

@muety
Copy link
Owner

muety commented Dec 23, 2024

Can't reproduce this. Can you additionally share a screenshot of the dev console's "Console" tab (JavaScript / HTML errors)? Also, can you please try (a) to reproduce this in an incognito browser window and (b) re-pull the image (make sure it's 2.12.3) and restart the server?

Are there any other errors or warning being shown in Wakapi server's logs? A screenshot of the full log from starting Wakapi up to the faulty request would be helpful.

@Anoerak
Copy link
Author

Anoerak commented Dec 27, 2024

Can't reproduce this. Can you additionally share a screenshot of the dev console's "Console" tab (JavaScript / HTML errors)? Also, can you please try (a) to reproduce this in an incognito browser window and (b) re-pull the image (make sure it's 2.12.3) and restart the server?

Are there any other errors or warning being shown in Wakapi server's logs? A screenshot of the full log from starting Wakapi up to the faulty request would be helpful.

Merry Christmas,

OK,
Sorry for the late answer.

I've redeployed the stack using the latest image.
Here are the console for the wakapi and Db from start:
_Wakapi_logs.txt
_Wakapi-DB_logs.txt

The screenshot of the console:
[
Screenshot 2024-12-27 at 7 01 28 PM
]

I tried in private mode, on Firefox and Chrome, but get the same errors.

@muety
Copy link
Owner

muety commented Dec 27, 2024

The log file is really hard to read as you somehow managed to squash many log statements into a single line. But from what I can see, there's nothing wrong on the server side. I'd need (a) your specific configuration (compose file) and (b) a screenshot of that failing POST request's body params to debug this further.

@Anoerak
Copy link
Author

Anoerak commented Dec 27, 2024

The log file is really hard to read as you somehow managed to squash many log statements into a single line. But from what I can see, there's nothing wrong on the server side. I'd need (a) your specific configuration (compose file) and (b) a screenshot of that failing POST request's body params to debug this further.

Here is the link to the docker-compose, it will work only once:
docker-compose

and here are the screenshots:
Screenshot 2024-12-27 at 8 55 15 PM
Screenshot 2024-12-27 at 8 55 38 PM
Screenshot 2024-12-27 at 8 56 02 PM

@muety
Copy link
Owner

muety commented Dec 29, 2024

The link to the compose file that you sent is not working.

Had another look into the code again.

  • For updating the e-mail address: in prod mode, there is an additional check in place that requires a valid MX DNS record to be set for the e-mail address' domain, i.e. verifies that there's a publicly accessible mail server behind the domain.
  • For updating the WakaTime API Key: no idea, why it's working in dev mode, but not in prod. Can your server make outgoing requests (specifically to wakatime.com)? Also, what are you settings as the API URL?

@muety
Copy link
Owner

muety commented Jan 9, 2025

Any updates on this?

@muety muety closed this as not planned Won't fix, can't repro, duplicate, stale Jan 15, 2025
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

2 participants