Skip to content
  • Home
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. JavaScript
  5. Gotify "const axios" unable to verify the first certificate

NEWS

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    9
    1
    94

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    24
    1
    1.4k

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    9.3k

Gotify "const axios" unable to verify the first certificate

Geplant Angeheftet Gesperrt Verschoben JavaScript
3 Beiträge 2 Kommentatoren 755 Aufrufe 1 Watching
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • B Offline
    B Offline
    BenjaminCz
    schrieb am zuletzt editiert von BenjaminCz
    #1

    Hallo,
    ich habe den Selv Hostet Gotify benachrichtigungs Server der läuft erfolgreich auf HTTPS.

    Vorher hatte ich Gotify als HTTP am laufen und folgenden Code im Java Script dass hatte auch funktioniert.

    const axios = require("axios");
    
    const url = "http://192.168.178.xxx/message?token=ATvOgRNF8QqwGVN";
    const bodyFormData = {
      title: "Hello from Javascript",
      message: "Test Push Service from Node.js",
      priority: 5,
    };
    
    axios({
      method: "post",
      headers: {
        "Content-Type": "application/json",
      },
      url: url,
      data: bodyFormData,
    })
      .then((response) => console.log(response.data))
      .catch((err) => console.log(err.response ? error.response.data : err));
    

    Seit der Umstellung auf HTTPS habe ich den Code so angepasst: (nur HTTP zu HTTPS geändert)

    const axios = require("axios");
    
    const url = "https://192.168.178.xxx/message?token=ATvOgRNF8QqwGVN";
    const bodyFormData = {
      title: "Hello from Javascript",
      message: "Test Push Service from Node.js",
      priority: 5,
    };
    
    axios({
      method: "post",
      headers: {
        "Content-Type": "application/json",
      },
      url: url,
      data: bodyFormData,
    })
      .then((response) => console.log(response.data))
      .catch((err) => console.log(err.response ? error.response.data : err));
    
    

    Seitdem bekomme ich folgende fehlermeldung.
    Ich habe zwar schon im Internet geschaut aber ich bin bischer leider erfolglos.

     {'message':'unable to verify the first certificate','name':'Error','stack':'Error: unable to verify the first certificate\n at Function.AxiosError.from (/opt/iobroker/node_modules/iobroker.javascript/node_modules/axios/dist/node/axios.cjs:837:14)\n at RedirectableRequest.handleRequestError (/opt/iobroker/node_modules/iobroker.javascript/node_modules/axios/dist/node/axios.cjs:3016:25)\n at RedirectableRequest.emit (node:events:514:28)\n at ClientRequest.eventHandlers.<computed> (/opt/iobroker/node_modules/follow-redirects/index.js:14:24)\n at ClientRequest.emit (node:events:514:28)\n at TLSSocket.socketErrorListener (node:_http_client:501:9)\n at TLSSocket.emit (node:events:514:28)\n at emitErrorNT (node:internal/streams/destroy:151:8)\n at emitErrorCloseNT (node:internal/streams/destroy:116:3)\n at processTicksAndRejections (node:internal/process/task_queues:82:21)\n','config':{'transitional':{'silentJSONParsing':true,'forcedJSONParsing':true,'clarifyTimeoutError':false},'adapter':'http','transformRequest':[null],'transformResponse':[null],'timeout':0,'xsrfCookieName':'XSRF-TOKEN','xsrfHeaderName':'X-XSRF-TOKEN','maxContentLength':-1,'maxBodyLength':-1,'env':{},'headers':{'Accept':'application/json, text/plain, */*','Content-Type':'application/json','User-Agent':'axios/1.5.0','Content-Length':'89','Accept-Encoding':'gzip, compress, deflate, br'},'method':'post','url':'https://192.168.178.xxx/message?token=ATvOgRNF8QqwGVN','data':'{\'title\':\'Hello from Javascript\',\'message\':\'Test Push Service from Node.js\',\'priority\':5}'},'code':'UNABLE_TO_VERIFY_LEAF_SIGNATURE','status':null}
    

    Hat einer eine idee wie ich das SSL im Code ausschalten kann oder noch besser wie ich dass mit einem Zertifikat hinbekomme also Zertifikat habe ich ja ich weiß nur nicht wie ich dass coden soll.

    B 1 Antwort Letzte Antwort
    0
    • B BenjaminCz

      Hallo,
      ich habe den Selv Hostet Gotify benachrichtigungs Server der läuft erfolgreich auf HTTPS.

      Vorher hatte ich Gotify als HTTP am laufen und folgenden Code im Java Script dass hatte auch funktioniert.

      const axios = require("axios");
      
      const url = "http://192.168.178.xxx/message?token=ATvOgRNF8QqwGVN";
      const bodyFormData = {
        title: "Hello from Javascript",
        message: "Test Push Service from Node.js",
        priority: 5,
      };
      
      axios({
        method: "post",
        headers: {
          "Content-Type": "application/json",
        },
        url: url,
        data: bodyFormData,
      })
        .then((response) => console.log(response.data))
        .catch((err) => console.log(err.response ? error.response.data : err));
      

      Seit der Umstellung auf HTTPS habe ich den Code so angepasst: (nur HTTP zu HTTPS geändert)

      const axios = require("axios");
      
      const url = "https://192.168.178.xxx/message?token=ATvOgRNF8QqwGVN";
      const bodyFormData = {
        title: "Hello from Javascript",
        message: "Test Push Service from Node.js",
        priority: 5,
      };
      
      axios({
        method: "post",
        headers: {
          "Content-Type": "application/json",
        },
        url: url,
        data: bodyFormData,
      })
        .then((response) => console.log(response.data))
        .catch((err) => console.log(err.response ? error.response.data : err));
      
      

      Seitdem bekomme ich folgende fehlermeldung.
      Ich habe zwar schon im Internet geschaut aber ich bin bischer leider erfolglos.

       {'message':'unable to verify the first certificate','name':'Error','stack':'Error: unable to verify the first certificate\n at Function.AxiosError.from (/opt/iobroker/node_modules/iobroker.javascript/node_modules/axios/dist/node/axios.cjs:837:14)\n at RedirectableRequest.handleRequestError (/opt/iobroker/node_modules/iobroker.javascript/node_modules/axios/dist/node/axios.cjs:3016:25)\n at RedirectableRequest.emit (node:events:514:28)\n at ClientRequest.eventHandlers.<computed> (/opt/iobroker/node_modules/follow-redirects/index.js:14:24)\n at ClientRequest.emit (node:events:514:28)\n at TLSSocket.socketErrorListener (node:_http_client:501:9)\n at TLSSocket.emit (node:events:514:28)\n at emitErrorNT (node:internal/streams/destroy:151:8)\n at emitErrorCloseNT (node:internal/streams/destroy:116:3)\n at processTicksAndRejections (node:internal/process/task_queues:82:21)\n','config':{'transitional':{'silentJSONParsing':true,'forcedJSONParsing':true,'clarifyTimeoutError':false},'adapter':'http','transformRequest':[null],'transformResponse':[null],'timeout':0,'xsrfCookieName':'XSRF-TOKEN','xsrfHeaderName':'X-XSRF-TOKEN','maxContentLength':-1,'maxBodyLength':-1,'env':{},'headers':{'Accept':'application/json, text/plain, */*','Content-Type':'application/json','User-Agent':'axios/1.5.0','Content-Length':'89','Accept-Encoding':'gzip, compress, deflate, br'},'method':'post','url':'https://192.168.178.xxx/message?token=ATvOgRNF8QqwGVN','data':'{\'title\':\'Hello from Javascript\',\'message\':\'Test Push Service from Node.js\',\'priority\':5}'},'code':'UNABLE_TO_VERIFY_LEAF_SIGNATURE','status':null}
      

      Hat einer eine idee wie ich das SSL im Code ausschalten kann oder noch besser wie ich dass mit einem Zertifikat hinbekomme also Zertifikat habe ich ja ich weiß nur nicht wie ich dass coden soll.

      B Offline
      B Offline
      BenjaminCz
      schrieb am zuletzt editiert von BenjaminCz
      #2

      @benjamincz sagte in Gotify "const axios" unable to verify the first certificate:

      Hallo,
      ich habe den Selv Hostet Gotify benachrichtigungs Server der läuft erfolgreich auf HTTPS.

      Vorher hatte ich Gotify als HTTP am laufen und folgenden Code im Java Script dass hatte auch funktioniert.

      const axios = require("axios");
      
      const url = "http://192.168.178.xxx/message?token=ATvOgRNF8QqwGVN";
      const bodyFormData = {
        title: "Hello from Javascript",
        message: "Test Push Service from Node.js",
        priority: 5,
      };
      
      axios({
        method: "post",
        headers: {
          "Content-Type": "application/json",
        },
        url: url,
        data: bodyFormData,
      })
        .then((response) => console.log(response.data))
        .catch((err) => console.log(err.response ? error.response.data : err));
      

      Seit der Umstellung auf HTTPS habe ich den Code so angepasst: (nur HTTP zu HTTPS geändert)

      const axios = require("axios");
      
      const url = "https://192.168.178.xxx/message?token=ATvOgRNF8QqwGVN";
      const bodyFormData = {
        title: "Hello from Javascript",
        message: "Test Push Service from Node.js",
        priority: 5,
      };
      
      axios({
        method: "post",
        headers: {
          "Content-Type": "application/json",
        },
        url: url,
        data: bodyFormData,
      })
        .then((response) => console.log(response.data))
        .catch((err) => console.log(err.response ? error.response.data : err));
      
      

      Seitdem bekomme ich folgende fehlermeldung.
      Ich habe zwar schon im Internet geschaut aber ich bin bischer leider erfolglos.

       {'message':'unable to verify the first certificate','name':'Error','stack':'Error: unable to verify the first certificate\n at Function.AxiosError.from (/opt/iobroker/node_modules/iobroker.javascript/node_modules/axios/dist/node/axios.cjs:837:14)\n at RedirectableRequest.handleRequestError (/opt/iobroker/node_modules/iobroker.javascript/node_modules/axios/dist/node/axios.cjs:3016:25)\n at RedirectableRequest.emit (node:events:514:28)\n at ClientRequest.eventHandlers.<computed> (/opt/iobroker/node_modules/follow-redirects/index.js:14:24)\n at ClientRequest.emit (node:events:514:28)\n at TLSSocket.socketErrorListener (node:_http_client:501:9)\n at TLSSocket.emit (node:events:514:28)\n at emitErrorNT (node:internal/streams/destroy:151:8)\n at emitErrorCloseNT (node:internal/streams/destroy:116:3)\n at processTicksAndRejections (node:internal/process/task_queues:82:21)\n','config':{'transitional':{'silentJSONParsing':true,'forcedJSONParsing':true,'clarifyTimeoutError':false},'adapter':'http','transformRequest':[null],'transformResponse':[null],'timeout':0,'xsrfCookieName':'XSRF-TOKEN','xsrfHeaderName':'X-XSRF-TOKEN','maxContentLength':-1,'maxBodyLength':-1,'env':{},'headers':{'Accept':'application/json, text/plain, */*','Content-Type':'application/json','User-Agent':'axios/1.5.0','Content-Length':'89','Accept-Encoding':'gzip, compress, deflate, br'},'method':'post','url':'https://192.168.178.xxx/message?token=ATvOgRNF8QqwGVN','data':'{\'title\':\'Hello from Javascript\',\'message\':\'Test Push Service from Node.js\',\'priority\':5}'},'code':'UNABLE_TO_VERIFY_LEAF_SIGNATURE','status':null}
      

      Hat einer eine idee wie ich das SSL im Code ausschalten kann oder noch besser wie ich dass mit einem Zertifikat hinbekomme also Zertifikat habe ich ja ich weiß nur nicht wie ich dass coden soll.

      Bin Hier fündig geworden aber leider weiß ich nicht wie in das coden soll:
      Link Text

      T 1 Antwort Letzte Antwort
      0
      • B BenjaminCz

        @benjamincz sagte in Gotify "const axios" unable to verify the first certificate:

        Hallo,
        ich habe den Selv Hostet Gotify benachrichtigungs Server der läuft erfolgreich auf HTTPS.

        Vorher hatte ich Gotify als HTTP am laufen und folgenden Code im Java Script dass hatte auch funktioniert.

        const axios = require("axios");
        
        const url = "http://192.168.178.xxx/message?token=ATvOgRNF8QqwGVN";
        const bodyFormData = {
          title: "Hello from Javascript",
          message: "Test Push Service from Node.js",
          priority: 5,
        };
        
        axios({
          method: "post",
          headers: {
            "Content-Type": "application/json",
          },
          url: url,
          data: bodyFormData,
        })
          .then((response) => console.log(response.data))
          .catch((err) => console.log(err.response ? error.response.data : err));
        

        Seit der Umstellung auf HTTPS habe ich den Code so angepasst: (nur HTTP zu HTTPS geändert)

        const axios = require("axios");
        
        const url = "https://192.168.178.xxx/message?token=ATvOgRNF8QqwGVN";
        const bodyFormData = {
          title: "Hello from Javascript",
          message: "Test Push Service from Node.js",
          priority: 5,
        };
        
        axios({
          method: "post",
          headers: {
            "Content-Type": "application/json",
          },
          url: url,
          data: bodyFormData,
        })
          .then((response) => console.log(response.data))
          .catch((err) => console.log(err.response ? error.response.data : err));
        
        

        Seitdem bekomme ich folgende fehlermeldung.
        Ich habe zwar schon im Internet geschaut aber ich bin bischer leider erfolglos.

         {'message':'unable to verify the first certificate','name':'Error','stack':'Error: unable to verify the first certificate\n at Function.AxiosError.from (/opt/iobroker/node_modules/iobroker.javascript/node_modules/axios/dist/node/axios.cjs:837:14)\n at RedirectableRequest.handleRequestError (/opt/iobroker/node_modules/iobroker.javascript/node_modules/axios/dist/node/axios.cjs:3016:25)\n at RedirectableRequest.emit (node:events:514:28)\n at ClientRequest.eventHandlers.<computed> (/opt/iobroker/node_modules/follow-redirects/index.js:14:24)\n at ClientRequest.emit (node:events:514:28)\n at TLSSocket.socketErrorListener (node:_http_client:501:9)\n at TLSSocket.emit (node:events:514:28)\n at emitErrorNT (node:internal/streams/destroy:151:8)\n at emitErrorCloseNT (node:internal/streams/destroy:116:3)\n at processTicksAndRejections (node:internal/process/task_queues:82:21)\n','config':{'transitional':{'silentJSONParsing':true,'forcedJSONParsing':true,'clarifyTimeoutError':false},'adapter':'http','transformRequest':[null],'transformResponse':[null],'timeout':0,'xsrfCookieName':'XSRF-TOKEN','xsrfHeaderName':'X-XSRF-TOKEN','maxContentLength':-1,'maxBodyLength':-1,'env':{},'headers':{'Accept':'application/json, text/plain, */*','Content-Type':'application/json','User-Agent':'axios/1.5.0','Content-Length':'89','Accept-Encoding':'gzip, compress, deflate, br'},'method':'post','url':'https://192.168.178.xxx/message?token=ATvOgRNF8QqwGVN','data':'{\'title\':\'Hello from Javascript\',\'message\':\'Test Push Service from Node.js\',\'priority\':5}'},'code':'UNABLE_TO_VERIFY_LEAF_SIGNATURE','status':null}
        

        Hat einer eine idee wie ich das SSL im Code ausschalten kann oder noch besser wie ich dass mit einem Zertifikat hinbekomme also Zertifikat habe ich ja ich weiß nur nicht wie ich dass coden soll.

        Bin Hier fündig geworden aber leider weiß ich nicht wie in das coden soll:
        Link Text

        T Nicht stören
        T Nicht stören
        ticaki
        schrieb am zuletzt editiert von ticaki
        #3

        @benjamincz

        import https from 'https' // oder const https = require('https')
        import axios from 'axios'
        
         const httpsAgent = new https.Agent({
            rejectUnauthorized: false,
         })
          axios.defaults.httpsAgent = httpsAgent
        
        //hier rest vom Script
        

        So in der Art.
        https muß wohl im Javascript-Adapter in die npm module, kannst aber mal ohne versuchen, wenn dann ein Fehler kommt mit Modul nicht gefunden, muß er rein.

        Weather-Warnings Espresense NSPanel-Lovelace-ui Tagesschau

        Spenden

        1 Antwort Letzte Antwort
        0
        Antworten
        • In einem neuen Thema antworten
        Anmelden zum Antworten
        • Älteste zuerst
        • Neuste zuerst
        • Meiste Stimmen


        Support us

        ioBroker
        Community Adapters
        Donate

        804

        Online

        32.5k

        Benutzer

        81.7k

        Themen

        1.3m

        Beiträge
        Community
        Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
        ioBroker Community 2014-2025
        logo
        • Anmelden

        • Du hast noch kein Konto? Registrieren

        • Anmelden oder registrieren, um zu suchen
        • Erster Beitrag
          Letzter Beitrag
        0
        • Home
        • Aktuell
        • Tags
        • Ungelesen 0
        • Kategorien
        • Unreplied
        • Beliebt
        • GitHub
        • Docu
        • Hilfe