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

Inacessible mechanic_api when using HTTPS #187

Closed
yesitsjnovak opened this issue Apr 12, 2023 · 2 comments
Closed

Inacessible mechanic_api when using HTTPS #187

yesitsjnovak opened this issue Apr 12, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@yesitsjnovak
Copy link

Describe the bug
"Could not connect to mechanic api" message when opening a service request due to HTTPS

To Reproduce
Configure access to crapi via HTTPS. Signup and configure your vehicle.
Try creating a service request.
WebUI shows the error: "Could not connect to mechanic api."
Service request is not created.

Checking the POST request done when creating the service request, we have the following request body:

{"mechanic_code":"TRAC_JHN","problem_details":"Hi John, I am opening this request to replace blinker fluid\n","vin":"3GWHK50SJRX079062","mechanic_api":"https://crapi.testlab.local/workshop/api/mechanic/receive_report","repeat_request_if_failed":false,"number_of_repeats":1}

The response body:

{"message":"Could not connect to mechanic api."}

Even though accessing the endpoint manually (https://crapi.testlab.local/workshop/api/mechanic/receive_report) does indeed work, seems like the application is not able to access it.

Manually changing the URL to HTTP only instead of HTTPS apparently solves it:

image

image

Expected behavior
The application should be able to access the mechanic api endpoint, even when using HTTPS.

Runtime Environment
crAPI running behind traefik.
Docker version 20.10.21, build 20.10.21-0ubuntu1~22.04.2
5.15.0-67-generic #74-Ubuntu SMP Wed Feb 22 14:14:39 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

@yesitsjnovak yesitsjnovak added the bug Something isn't working label Apr 12, 2023
@piyushroshan
Copy link
Collaborator

piyushroshan commented Apr 28, 2023

Seems like you have setup a domain crapi.testlab.local which may not be understood by internal services.

@piyushroshan piyushroshan mentioned this issue May 23, 2023
4 tasks
@piyushroshan
Copy link
Collaborator

piyushroshan commented May 30, 2023

This should be fixed now in the develop branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants