vx3r / wg-gen-web

Simple Web based configuration generator for WireGuard
https://wg-gen-web-demo.127-0-0-1.fr
Do What The F*ck You Want To Public License
1.58k stars 187 forks source link

Email Error: ApiService: Error: Request failed with status code 500 #55

Open downright-ux opened 4 years ago

downright-ux commented 4 years ago

Docker Log doesn't show anything helpful that I could see.

[GIN] 2020/08/26 - 21:31:30 | 401 |      58.876µs |    70.66.37.212 | GET      "/api/v1.0/client/7dd1c67a-daf6-4843-beda-fa19b5a1af28/email"
[GIN] 2020/08/26 - 21:31:30 | 200 |       104.6µs |    70.66.37.212 | GET      "/"
[GIN] 2020/08/26 - 21:31:30 | 200 |     596.848µs |    70.66.37.212 | GET      "/js/chunk-vendors.85a05be0.js"
[GIN] 2020/08/26 - 21:31:30 | 200 |     148.216µs |    70.66.37.212 | GET      "/js/app.68f6b65a.js"
[GIN] 2020/08/26 - 21:31:31 | 200 |     162.375µs |    70.66.37.212 | GET      "/css/Clients.b58a7d31.css"
[GIN] 2020/08/26 - 21:31:31 | 200 |      46.867µs |    70.66.37.212 | GET      "/api/v1.0/auth/oauth2_url"
[GIN] 2020/08/26 - 21:31:31 | 200 |     209.766µs |    70.66.37.212 | GET      "/js/Clients.34dc9b04.js"
[GIN] 2020/08/26 - 21:31:31 | 200 |      87.589µs |    70.66.37.212 | POST     "/api/v1.0/auth/oauth2_exchange"
[GIN] 2020/08/26 - 21:31:31 | 200 |     190.419µs |    70.66.37.212 | GET      "/js/Clients~Server.d72886b6.js"
[GIN] 2020/08/26 - 21:31:31 | 200 |     205.766µs |    70.66.37.212 | GET      "/js/Server.1d2011ab.js"
[GIN] 2020/08/26 - 21:31:31 | 200 |     228.314µs |    70.66.37.212 | GET      "/css/Clients~Server.4dad6da0.css"
[GIN] 2020/08/26 - 21:31:31 | 200 |      86.037µs |    70.66.37.212 | GET      "/api/v1.0/auth/user"
[GIN] 2020/08/26 - 21:31:31 | 200 |      57.274µs |    70.66.37.212 | GET      "/api/v1.0/server/version"
[GIN] 2020/08/26 - 21:31:31 | 200 |     198.925µs |    70.66.37.212 | GET      "/api/v1.0/server"
[GIN] 2020/08/26 - 21:31:31 | 200 |     235.897µs |    70.66.37.212 | GET      "/api/v1.0/client"
[GIN] 2020/08/26 - 21:31:31 | 200 |      98.538µs |    70.66.37.212 | GET      "/favicon.png"
[GIN] 2020/08/26 - 21:31:31 | 200 |      87.517µs |    70.66.37.212 | GET      "/api/v1.0/server/config"
[GIN] 2020/08/26 - 21:31:31 | 200 |      420.37µs |    70.66.37.212 | GET      "/api/v1.0/client/bb5c5b45-3ee4-4de5-9950-7ed2130bd967/config?qrcode=false"
[GIN] 2020/08/26 - 21:31:31 | 200 |     382.183µs |    70.66.37.212 | GET      "/api/v1.0/client/7dd1c67a-daf6-4843-beda-fa19b5a1af28/config?qrcode=false"
[GIN] 2020/08/26 - 21:31:31 | 200 |   12.729587ms |    70.66.37.212 | GET      "/api/v1.0/client/bb5c5b45-3ee4-4de5-9950-7ed2130bd967/config?qrcode=true"
[GIN] 2020/08/26 - 21:31:31 | 200 |   14.782369ms |    70.66.37.212 | GET      "/api/v1.0/client/7dd1c67a-daf6-4843-beda-fa19b5a1af28/config?qrcode=true"
vx3r commented 4 years ago

Can you please share your setup config (env variables) ? Which request result on 500 response ? see devtools on your navigator

downright-ux commented 4 years ago

Configuration file for docker-compose.yml

version: '3.3'
services:
    wg-gen-web:
        network_mode: host
        privileged: true
        volumes:
          - '/etc/wireguard:/data'
        ports:
          - '8080:8080'
        environment:
          - WG_CONF_DIR=/data
          - WG_INTERFACE_NAME=wg0.conf
          - SMTP_HOST=my.email.server
          - SMTP_PORT=587
          - SMTP_USERNAME=servers@mycompany.com
          - SMTP_PASSWORD=xxxxxxxxxxxxxxxxx
        image: 'vx3r/wg-gen-web:latest'

I have NGINX handling basic auth at the moment and 443

devtools -

Error: ApiService: Error: Request failed with status code 500
    get api.service.js:14
    promise callback*get api.service.js:13
    email client.js:80
    w vuex.esm.js:792
    dispatch vuex.esm.js:457
    dispatch vuex.esm.js:347
    dispatch vuex.esm.js:720
    r vuex.esm.js:1005
    email Clients.vue:558
    click Clients.vue:19
    VueJS 4
    click VBtn.js:126
    VueJS 33

Hope that helps