MrBrax / LiveStreamDVR

An automatic livestream recorder
MIT License
349 stars 25 forks source link

add ntfy #493

Closed Serph91P closed 7 months ago

Serph91P commented 10 months ago

Is your feature request related to a problem? Please describe. To keep the spirit of self hosting would be great to get ntfy implement.

Describe the solution you'd like Add ntfy as notification service.

Describe alternatives you've considered Pushbullet but you always rely on their service being free.

Additional context https://github.com/binwiederhier/ntfy

Serph91P commented 10 months ago

Thank you for integrating ntfy. Tested the new ntfy option. It seems to be using telgram settings?

2024-01-26 12:44:37 clientBroker.notify info (streamOnline) Test notification: This is a test notification 2024-01-26 12:44:37 clientBroker.notify error Telegram token and chat ID not set

grafik grafik

MrBrax commented 10 months ago

yes i put the wrong handler in there

Serph91P commented 10 months ago

yes i put the wrong handler in there

thanks again. sadly now I receive this: 2024-01-26 14:42:00 clientBroker.notify info (offlineStatusChange) Test notification: This is a test notification 2024-01-26 14:42:00 clientBroker.notify error Ntfy axios error response: Request failed with status code 400 ([object Object])

tested it with curl from my pc it is working.

Serph91P commented 10 months ago

yes i put the wrong handler in there

thanks again. sadly now I receive this: 2024-01-26 14:42:00 clientBroker.notify info (offlineStatusChange) Test notification: This is a test notification 2024-01-26 14:42:00 clientBroker.notify error Ntfy axios error response: Request failed with status code 400 ([object Object])

tested it with curl from my pc it is working.

ok the test message does not work but normal notifications do work.

MrBrax commented 10 months ago

could you check what the response is? either click on the error message in the gui log viewer or the json line in the .jsonline file

Serph91P commented 10 months ago

could you check what the response is? either click on the error message in the gui log viewer or the json line in the .jsonline file


{
  "metadata": {
    "err": {
      "code": "ERR_BAD_REQUEST",
      "config": {
        "adapter": [
          "xhr",
          "http"
        ],
        "data": "This is a test notification",
        "env": {},
        "headers": {
          "Accept": "application/json, text/plain, */*",
          "Accept-Encoding": "gzip, compress, deflate, br",
          "Actions": "view, Open, ",
          "Content-Length": "27",
          "Content-Type": "application/x-www-form-urlencoded",
          "Icon": "",
          "Title": "Test notification",
          "User-Agent": "axios/1.4.0"
        },
        "maxBodyLength": -1,
        "maxContentLength": -1,
        "method": "post",
        "timeout": 0,
        "transformRequest": [
          null
        ],
        "transformResponse": [
          null
        ],
        "transitional": {
          "clarifyTimeoutError": false,
          "forcedJSONParsing": true,
          "silentJSONParsing": true
        },
        "url": "https://ntfy.redacted.tld/lsdvr",
        "xsrfCookieName": "XSRF-TOKEN",
        "xsrfHeaderName": "X-XSRF-TOKEN"
      },
      "message": "Request failed with status code 400",
      "name": "AxiosError",
      "stack": "AxiosError: Request failed with status code 400\n    at settle (/usr/local/share/twitchautomator/server/.yarn/cache/axios-npm-1.4.0-4d7ce8ca3e-b987e4259e.zip/node_modules/axios/lib/core/settle.js:19:12)\n    at IncomingMessage.handleStreamEnd (/usr/local/share/twitchautomator/server/.yarn/cache/axios-npm-1.4.0-4d7ce8ca3e-b987e4259e.zip/node_modules/axios/lib/adapters/http.js:570:11)\n    at IncomingMessage.emit (node:events:530:35)\n    at endReadableNT (node:internal/streams/readable:1696:12)\n    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)",
      "status": 400
    },
    "response": {
      "code": 40018,
      "error": "invalid request: actions invalid; parameter 'url' is required for action 'view'",
      "http": 400,
      "link": "https://ntfy.sh/docs/publish/#action-buttons"
    }
  },
  "module": "clientBroker.notify",
  "timestamp": "2024-01-26T14:01:57.806Z"
}
MrBrax commented 10 months ago

that makes sense, thanks

Serph91P commented 10 months ago

that makes sense, thanks

Working like a charm.

Serph91P commented 8 months ago

that makes sense, thanks

Should it be tested more or can it go to master?

Serph91P commented 7 months ago

Sadly now that it is on master I get this error. Other applications can use this just fine.

{
  "metadata": {
    "err": {
      "code": "ECONNREFUSED",
      "config": {
        "adapter": [
          "xhr",
          "http"
        ],
        "data": "[Aufnahmestream] TTT & Perfect Heist 2 |!lan !event !buch",
        "env": {},
        "headers": {
          "Accept": "application/json, text/plain, */*",
          "Accept-Encoding": "gzip, compress, deflate, br",
          "Actions": "action=http, label=Open, url=https://twitch.tv/pietsmiet, ",
          "Content-Length": "57",
          "Content-Type": "application/x-www-form-urlencoded",
          "Icon": "https://lsdvr.domain.tld/cache/thumbs/4f3213202e4141d31a27ae561c5ad31e.jpg",
          "Tags": "streamStatusChange",
          "Title": "PietSmiet is now playing Garry's Mod!",
          "User-Agent": "axios/1.4.0"
        },
        "maxBodyLength": -1,
        "maxContentLength": -1,
        "method": "post",
        "timeout": 0,
        "transformRequest": [
          null
        ],
        "transformResponse": [
          null
        ],
        "transitional": {
          "clarifyTimeoutError": false,
          "forcedJSONParsing": true,
          "silentJSONParsing": true
        },
        "url": "https://ntfy.domain.tld/lsdvr",
        "xsrfCookieName": "XSRF-TOKEN",
        "xsrfHeaderName": "X-XSRF-TOKEN"
      },
      "message": "connect ECONNREFUSED ip:443",
      "name": "Error",
      "stack": "Error: connect ECONNREFUSED ip:443\n    at Function.AxiosError.from (/usr/local/share/twitchautomator/server/.yarn/cache/axios-npm-1.4.0-4d7ce8ca3e-b987e4259e.zip/node_modules/axios/lib/core/AxiosError.js:89:14)\n    at RedirectableRequest.handleRequestError (/usr/local/share/twitchautomator/server/.yarn/cache/axios-npm-1.4.0-4d7ce8ca3e-b987e4259e.zip/node_modules/axios/lib/adapters/http.js:591:25)\n    at RedirectableRequest.emit (node:events:518:28)\n    at ClientRequest.eventHandlers.<computed> (/usr/local/share/twitchautomator/server/.yarn/__virtual__/follow-redirects-virtual-359bc4c55c/0/cache/follow-redirects-npm-1.15.2-1ec1dd82be-8be0d39919.zip/node_modules/follow-redirects/index.js:14:24)\n    at ClientRequest.emit (node:events:518:28)\n    at TLSSocket.socketErrorListener (node:_http_client:500:9)\n    at TLSSocket.emit (node:events:518:28)\n    at emitErrorNT (node:internal/streams/destroy:169:8)\n    at emitErrorCloseNT (node:internal/streams/destroy:128:3)\n    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)",
      "status": null
    },
    "request": {
      "_currentRequest": {
        "_closed": false,
        "_contentLength": "57",
        "_defaultKeepAlive": true,
        "_ended": false,
        "_events": {},
        "_eventsCount": 7,
        "_hasBody": true,
        "_header": "POST /lsdvr HTTP/1.1\r\nAccept: application/json, text/plain, */*\r\nContent-Type: application/x-www-form-urlencoded\r\nTitle: PietSmiet is now playing Garry&#39;s Mod!\r\nActions: action=http, label=Open, url=https://twitch.tv/pietsmiet, \r\nIcon: https://lsdvr.domain.tld/cache/thumbs/4f3213202e4141d31a27ae561c5ad31e.jpg\r\nTags: streamStatusChange\r\nUser-Agent: axios/1.4.0\r\nContent-Length: 57\r\nAccept-Encoding: gzip, compress, deflate, br\r\nHost: ntfy.domain.tld\r\nConnection: keep-alive\r\n\r\n",
        "_headerSent": true,
        "_keepAliveTimeout": 0,
        "_last": false,
        "_redirectable": "[Circular]",
        "_removedConnection": false,
        "_removedContLen": false,
        "_removedTE": false,
        "_trailer": "",
        "aborted": false,
        "agent": {
          "_events": {},
          "_eventsCount": 2,
          "_sessionCache": {
            "list": [
              "api.twitch.tv:443:::::::::::::::::::::"
            ],
            "map": {
              "api.twitch.tv:443:::::::::::::::::::::": {
                "data": [
                  48,
                  130,
                  7,
                  151,
                  2,
                  1,
                  1,
                  2,
                  2,
                  3,
                  4,
                  4,
                  2,
                  19,
                  1,
                  4,
                  32,
                  67,
                  7,
                  190,
                  151,
                  50,
                  212,
                  211,
                  130,
                  196,
                  110,
                  43,
                  55,
                  159,
                  253,
                  193,
                  104,
                  71,
                  169,
                  12,
                  110,
                  104,
                  5,
                  75,
                  189,
                  23,
                  255,
                  211,
                  109,
                  115,
                  212,
                  150,
                  200,
                  4,
                  32,
                  201,
                  67,
                  41,
                  76,
                  94,
                  29,
                  230,
                  120,
                  53,
                  125,
                  187,
                  42,
                  33,
                  164,
                  115,
                  223,
                  20,
                  222,
                  12,
                  233,
                  193,
                  200,
                  207,
                  40,
                  145,
                  188,
                  202,
                  118,
                  15,
                  105,
                  61,
                  190,
                  161,
                  6,
                  2,
                  4,
                  102,
                  29,
                  2,
                  219,
                  162,
                  4,
                  2,
                  2,
                  28,
                  32,
                  163,
                  130,
                  6,
                  103,
                  48,
                  130,
                  6,
                  99,
                  48,
                  130,
                  5,
                  75,
                  160,
                  3,
                  2,
                  1,
                  2,
                  2,
                  16,
                  1,
                  209,
                  80,
                  168,
                  86,
                  214,
                  88,
                  69,
                  150,
                  203,
                  29,
                  101,
                  155,
                  59,
                  202,
                  231,
                  48,
                  13,
                  6,
                  9,
                  42,
                  134,
                  72,
                  134,
                  247,
                  13,
                  1,
                  1,
                  11,
                  5,
                  0,
                  48,
                  88,
                  49,
                  11,
                  48,
                  9,
                  6,
                  3,
                  85,
                  4,
                  6,
                  19,
                  2,
                  66,
                  69,
                  49,
                  25,
                  48,
                  23,
                  6,
                  3,
                  85,
                  4,
                  10,
                  19,
                  16,
                  71,
                  108,
                  111,
                  98,
                  97,
                  108,
                  83,
                  105,
                  103,
                  110,
                  32,
                  110,
                  118,
                  45,
                  115,
                  97,
                  49,
                  46,
                  48,
                  44,
                  6,
                  3,
                  85,
                  4,
                  3,
                  19,
                  37,
                  71,
                  108,
                  111,
                  98,
                  97,
                  108,
                  83,
                  105,
                  103,
                  110,
                  32,
                  65,
                  116,
                  108,
                  97,
                  115,
                  32,
                  82,
                  51,
                  32,
                  68,
                  86,
                  32,
                  84,
                  76,
                  83,
                  32,
                  67,
                  65,
                  32,
                  50,
                  48,
                  50,
                  51,
                  32,
                  81,
                  51,
                  48,
                  30,
                  23,
                  13,
                  50,
                  51,
                  48,
                  57,
                  48,
                  49,
                  50,
                  49,
                  51,
                  51,
                  49,
                  50,
                  90,
                  23,
                  13,
                  50,
                  52,
                  49,
                  48,
                  48,
                  50,
                  50,
                  49,
                  51,
                  51,
                  49,
                  49,
                  90,
                  48,
                  20,
                  49,
                  18,
                  48,
                  16,
                  6,
MrBrax commented 7 months ago

is your domain set up correctly? lsdvr.domain.tld is a bit odd

Serph91P commented 7 months ago

is your domain set up correctly? lsdvr.domain.tld is a bit odd

whats odd about it "subdomain.domain.tld"

Serph91P commented 7 months ago

is your domain set up correctly? lsdvr.domain.tld is a bit odd

well this is new:

External URL is invalid: External app url 'https://lsdvr.domain.tld/api/v0/hook' responded with an unexpected response: (status: 0)

Everything is working fine recording and stuff. All other applications running on this host work fine aswell.

MrBrax commented 7 months ago

is that your actual domain or is that some local dns thing? because that domain name looks like an example one

Serph91P commented 7 months ago

is that your actual domain or is that some local dns thing? because that domain name looks like an example one

I changed it to not leak my actual domain it has everything like certificate TLS 1.3 and so on.

MrBrax commented 7 months ago

is the actual webserver on lsdvr running? or did it crash on startup? should be visible in the logs

Serph91P commented 7 months ago

is the actual webserver on lsdvr running? or did it crash on startup? should be visible in the logs

you mean this?


15.04.2024
12:08:38
2024-04-15T10:08:38.663Z | dvr.init <success> Loading config stuff done.
15.04.2024
12:08:38
Setting trust proxy to true.
15.04.2024
12:08:38
2024-04-15T10:08:38.665Z | clientBroker.attach <info> Attaching WebSocket server to broker...
15.04.2024
12:08:38
🥞 LiveStreamDVR listening on port 8080, mode undefined. Base path: / 🥞
15.04.2024
12:08:38
Local: http://localhost:8080
15.04.2024
12:08:38
Public: https://lsdvr.domain.tld
MrBrax commented 7 months ago

that is weird indeed, does the regular gui work normally? i should update myself later

Serph91P commented 7 months ago

that is weird indeed, does the regular gui work normally? i should update myself later

lke I said everything works its recording jsut fine and I can change config and so on. Just this wont do. I mean ntfy works for alle my other applciation that use it.

MrBrax commented 7 months ago

it might be because of that trailing comma, i rewrote it to use json now

MrBrax commented 7 months ago

i think it works for me now on develop at least

1713194630595
Serph91P commented 7 months ago

i think it works for me now on develop at least

1713194630595

Will test on a test develop as well if it works on the same server. On master it does not work. Or how did you enter the ntfy domain?

Serph91P commented 7 months ago

i think it works for me now on develop at least

1713194630595

still have the same error on develop. Dunno why my homeassistant for example works just fine with ntfy and the url I use. does not work with or without https. If I send a curl to that adress this works aswell su donno where here is the problem. and it worked before like I said before and nothing changed on my system.

MrBrax commented 7 months ago

with the new ntfy implementation on develop, are you using something like "https://example.com" for the url field and "lsdvr" for the topic field?

Serph91P commented 7 months ago

with the new ntfy implementation on develop, are you using something like "https://example.com" for the url field and "lsdvr" for the topic field?

just tried to change the settings but I cannot accesss the config tab anymore :D get this from the eveloper console but no errors in logs

TypeError: t is undefined pn https://twitch.domain.tld/assets/settings-10148463.js:3 A https://twitch.domain.tld/assets/settings-10148463.js:4 setup https://twitch.domain.tld/assets/settings-10148463.js:4 Th https://twitch.domain.tld/assets/vue-6a93142d.js:1 setup https://twitch.domain.tld/assets/settings-10148463.js:4 Th https://twitch.domain.tld/assets/vue-6a93142d.js:1 setup https://twitch.domain.tld/assets/settings-10148463.js:4 Wr https://twitch.domain.tld/assets/vue-6a93142d.js:1 w https://twitch.domain.tld/assets/vue-6a93142d.js:1 run https://twitch.domain.tld/assets/vue-6a93142d.js:1 update https://twitch.domain.tld/assets/vue-6a93142d.js:1 At https://twitch.domain.tld/assets/vue-6a93142d.js:1 vi https://twitch.domain.tld/assets/vue-6a93142d.js:1 promise callbackbi https://twitch.domain.tld/assets/vue-6a93142d.js:1 Nr https://twitch.domain.tld/assets/vue-6a93142d.js:1 effect https://twitch.domain.tld/assets/vue-6a93142d.js:1 fl https://twitch.domain.tld/assets/vue-6a93142d.js:1 es https://twitch.domain.tld/assets/vue-6a93142d.js:1 mi https://twitch.domain.tld/assets/vue-6a93142d.js:1 set value https://twitch.domain.tld/assets/vue-6a93142d.js:1 k https://twitch.domain.tld/assets/settings-10148463.js:4 k https://twitch.domain.tld/assets/settings-10148463.js:4 setup https://twitch.domain.tld/assets/settings-10148463.js:4 gt https://twitch.domain.tld/assets/vue-6a93142d.js:1 At https://twitch.domain.tld/assets/vue-6a93142d.js:1 Xe https://twitch.domain.tld/assets/vue-6a93142d.js:1 __weh https://twitch.domain.tld/assets/vue-6a93142d.js:1 yi https://twitch.domain.tld/assets/vue-6a93142d.js:1 vi https://twitch.domain.tld/assets/vue-6a93142d.js:1 promise callbackbi https://twitch.domain.tld/assets/vue-6a93142d.js:1 Nr https://twitch.domain.tld/assets/vue-6a93142d.js:1 effect https://twitch.domain.tld/assets/vue-6a93142d.js:1 fl https://twitch.domain.tld/assets/vue-6a93142d.js:1 es https://twitch.domain.tld/assets/vue-6a93142d.js:1 mi https://twitch.domain.tld/assets/vue-6a93142d.js:1 effect https://twitch.domain.tld/assets/vue-6a93142d.js:1 fl https://twitch.domain.tld/assets/vue-6a93142d.js:1 es https://twitch.domain.tld/assets/vue-6a93142d.js:1 mi https://twitch.domain.tld/assets/vue-6a93142d.js:1 effect https://twitch.domain.tld/assets/vue-6a93142d.js:1 fl https://twitch.domain.tld/assets/vue-6a93142d.js:1 es https://twitch.domain.tld/assets/vue-6a93142d.js:1 mi https://twitch.domain.tld/assets/vue-6a93142d.js:1 effect https://twitch.domain.tld/assets/vue-6a93142d.js:1 fl https://twitch.domain.tld/assets/vue-6a93142d.js:1 es https://twitch.domain.tld/assets/vue-6a93142d.js:1 mi https://twitch.domain.tld/assets/vue-6a93142d.js:1 effect https://twitch.domain.tld/assets/vue-6a93142d.js:1 fl https://twitch.domain.tld/assets/vue-6a93142d.js:1 es https://twitch.domain.tld/assets/vue-6a93142d.js:1 mi https://twitch.domain.tld/assets/vue-6a93142d.js:1 set value https://twitch.domain.tld/assets/vue-6a93142d.js:1 W https://twitch.domain.tld/assets/vue-6a93142d.js:9 M https://twitch.domain.tld/assets/vue-6a93142d.js:9 promise callback*M https://twitch.domain.tld/assets/vue-6a93142d.js:9 E https://twitch.domain.tld/assets/vue-6a93142d.js:9 a https://twitch.domain.tld/assets/vue-6a93142d.js:9 At https://twitch.domain.tld/assets/vue-6a93142d.js:1 Xe https://twitch.domain.tld/assets/vue-6a93142d.js:1 vue-6a93142d.js:1:13779

MrBrax commented 7 months ago

very strange, works just fine here

Serph91P commented 7 months ago

very strange, works just fine here

since dev I deleted everything but still gett this error cannot set any settings, everythign els I can click and "use"

grafik grafik grafik
MrBrax commented 7 months ago

good call on having a clean install, i'm seeing it now

Serph91P commented 7 months ago

with the new ntfy implementation on develop, are you using something like "https://example.com" for the url field and "lsdvr" for the topic field?

yep using exactly this still getting the error. BTW do you know why it is using port 80 and not 443?

 "message": "connect ECONNREFUSED ip:80",

{
  "metadata": {
    "err": {
      "code": "ECONNREFUSED",
      "config": {
        "adapter": [
          "xhr",
          "http"
        ],
        "data": "{\"topic\":\"lsdvr\",\"title\":\"Test notification\",\"message\":\"This is a test notification\",\"actions\":[],\"icon\":\"\",\"tags\":[\"streamOnline\"]}",
        "env": {},
        "headers": {
          "Accept": "application/json, text/plain, */*",
          "Accept-Encoding": "gzip, compress, deflate, br",
          "Content-Length": "132",
          "Content-Type": "application/json",
          "User-Agent": "axios/1.4.0"
        },
        "maxBodyLength": -1,
        "maxContentLength": -1,
        "method": "post",
        "timeout": 0,
        "transformRequest": [
          null
        ],
        "transformResponse": [
          null
        ],
        "transitional": {
          "clarifyTimeoutError": false,
          "forcedJSONParsing": true,
          "silentJSONParsing": true
        },
        "url": "http://ntfy.domain.tld",
        "xsrfCookieName": "XSRF-TOKEN",
        "xsrfHeaderName": "X-XSRF-TOKEN"
      },
      "message": "connect ECONNREFUSED ip:80",
      "name": "Error",
      "stack": "Error: connect ECONNREFUSED ip:80\n    at Function.AxiosError.from (/usr/local/share/twitchautomator/server/.yarn/cache/axios-npm-1.4.0-4d7ce8ca3e-b987e4259e.zip/node_modules/axios/lib/core/AxiosError.js:89:14)\n    at RedirectableRequest.handleRequestError (/usr/local/share/twitchautomator/server/.yarn/cache/axios-npm-1.4.0-4d7ce8ca3e-b987e4259e.zip/node_modules/axios/lib/adapters/http.js:591:25)\n    at RedirectableRequest.emit (node:events:518:28)\n    at ClientRequest.eventHandlers.<computed> (/usr/local/share/twitchautomator/server/.yarn/__virtual__/follow-redirects-virtual-359bc4c55c/0/cache/follow-redirects-npm-1.15.2-1ec1dd82be-8be0d39919.zip/node_modules/follow-redirects/index.js:14:24)\n    at ClientRequest.emit (node:events:518:28)\n    at Socket.socketErrorListener (node:_http_client:500:9)\n    at Socket.emit (node:events:518:28)\n    at emitErrorNT (node:internal/streams/destroy:169:8)\n    at emitErrorCloseNT (node:internal/streams/destroy:128:3)\n    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)",
      "status": null
    },
    "request": {
      "_currentRequest": {
        "_closed": false,
        "_contentLength": "132",
        "_defaultKeepAlive": true,
        "_ended": false,
        "_events": {},
        "_eventsCount": 7,
        "_hasBody": true,
        "_header": "POST / HTTP/1.1\r\nAccept: application/json, text/plain, */*\r\nContent-Type: application/json\r\nUser-Agent: axios/1.4.0\r\nContent-Length: 132\r\nAccept-Encoding: gzip, compress, deflate, br\r\nHost: ntfy.domain.tld\r\nConnection: keep-alive\r\n\r\n",
        "_headerSent": true,
        "_keepAliveTimeout": 0,
        "_last": false,
        "_redirectable": "[Circular]",
        "_removedConnection": false,
        "_removedContLen": false,
        "_removedTE": false,
        "_trailer": "",
        "aborted": false,
        "agent": {
          "_events": {},
          "_eventsCount": 2,
          "defaultPort": 80,
          "freeSockets": {},
          "keepAlive": true,
          "keepAliveMsecs": 1000,
          "maxFreeSockets": 256,
          "maxSockets": null,
          "maxTotalSockets": null,
          "options": {
            "keepAlive": true,
            "noDelay": true,
            "path": null,
            "scheduling": "lifo",
            "timeout": 5000
          },
          "protocol": "http:",
          "requests": {},
          "scheduling": "lifo",
          "sockets": {
            "ntfy.domain.tld:80:": [
              {
                "_closeAfterHandlingError": false,
                "_events": {
                  "close": [
                    null,
                    null,
                    null
                  ],
                  "connect": [
                    null,
                    null,
                    null
                  ],
                  "timeout": [
                    null,
                    null
                  ]
                },
                "_eventsCount": 8,
                "_hadError": true,
                "_host": "ntfy.domain.tld",
                "_httpMessage": "[Circular]",
                "_parent": null,
                "_pendingData": [
                  {
                    "chunk": "POST / HTTP/1.1\r\nAccept: application/json, text/plain, */*\r\nContent-Type: application/json\r\nUser-Agent: axios/1.4.0\r\nContent-Length: 132\r\nAccept-Encoding: gzip, compress, deflate, br\r\nHost: ntfy.domain.tld\r\nConnection: keep-alive\r\n\r\n",
                    "encoding": "latin1"
                  },
                  {
                    "chunk": {
                      "data": [
                        123,
                        34,
                        116,
                        111,
                        112,
                        105,
                        99,
                        34,
                        58,
                        34,
                        108,
                        115,
                        100,
                        118,
                        114,
                        34,
                        44,
                        34,
                        116,
                        105,
                        116,
                        108,
                        101,
                        34,
                        58,
                        34,
                        84,
                        101,
                        115,
                        116,
                        32,
                        110,
                        111,
                        116,
                        105,
                        102,
                        105,
                        99,
                        97,
                        116,
                        105,
                        111,
                        110,
                        34,
                        44,
                        34,
                        109,
                        101,
                        115,
                        115,
                        97,
                        103,
                        101,
                        34,
                        58,
                        34,
                        84,
                        104,
                        105,
                        115,
                        32,
                        105,
                        115,
                        32,
                        97,
                        32,
                        116,
                        101,
                        115,
                        116,
                        32,
                        110,
                        111,
                        116,
                        105,
                        102,
                        105,
                        99,
                        97,
                        116,
                        105,
                        111,
                        110,
                        34,
                        44,
                        34,
                        97,
                        99,
                        116,
                        105,
                        111,
                        110,
                        115,
                        34,
                        58,
                        91,
                        93,
                        44,
                        34,
                        105,
                        99,
                        111,
                        110,
                        34,
                        58,
                        34,
                        34,
                        44,
                        34,
                        116,
                        97,
                        103,
                        115,
                        34,
                        58,
                        91,
                        34,
                        115,
                        116,
                        114,
                        101,
                        97,
                        109,
                        79,
                        110,
                        108,
                        105,
                        110,
                        101,
                        34,
                        93,
                        125
                      ],
                      "type": "Buffer"
                    },
                    "encoding": "buffer"
                  }
                ],
                "_pendingEncoding": "",
                "_readableState": {
                  "awaitDrainWriters": null,
                  "buffer": [],
                  "bufferIndex": 0,
                  "highWaterMark": 16384,
                  "length": 0,
                  "pipes": []
                },
                "_server": null,
                "_sockname": null,
                "_writableState": {
                  "bufferedIndex": 0,
                  "corked": 0,
                  "highWaterMark": 16384,
                  "length": 371,
                  "pendingcb": 1,
                  "writelen": 371
                },
                "allowHalfOpen": false,
                "connecting": false,
                "parser": null,
                "server": null,
                "timeout": 5000
              }
            ]
          },
          "totalSocketCount": 1
        },
        "chunkedEncoding": false,
        "destroyed": false,
        "finished": false,
        "host": "ntfy.domain.tld",
        "maxHeadersCount": null,
        "maxRequestsOnConnectionReached": false,
        "method": "POST",
        "outputData": 
MrBrax commented 7 months ago

http:// is 80, https:// is 443, if you want to use 443 you must use https://

Serph91P commented 7 months ago

http:// is 80, https:// is 443, if you want to use 443 you must use https://

oh lol xD. Well still does not work same error but with 443. What I still dont get is why is it showing the ip and not the url? Just asking stupid questions to get behind this. Like I said homeassistant works and "curl -d "Hi" https://ntfy.domain.tld/lsdvr " works aswell.

MrBrax commented 7 months ago

could it be a dns issue for the container? that it doesn't recognise the ntfy domain?

Serph91P commented 7 months ago

could it be a dns issue for the container? that it doesn't recognise the ntfy domain?

hmmm, dunno how I would test this. The server where it is running on can ping the domain just fine. I mean it is on the same system. Another docker container which is also running on this system can ping the domain just fine. Ping is not enabled and I dunno what base continer you used so I could install tools to ping the domain.

MrBrax commented 7 months ago

curl is installed in the container, so you can open the terminal for it and run commands

Serph91P commented 7 months ago

curl is installed in the container, so you can open the terminal for it and run commands

well thats wired I cannot curl the page. Just forced dns to be 1.1.1.1 but still does not work. I have no Idea why this is happening. I can curl google but not my domain.

MrBrax commented 7 months ago

you forced the dns inside the container?

MrBrax commented 7 months ago

1713439188705

and is your url set with the correct protocol?

Serph91P commented 7 months ago

you forced the dns inside the container?

yeah via the docker compose but no difference. I dunno why only this container has this other work fine. I mean It can recieve data from twitch and so on.

and yes the url and topic look like this.

MrBrax commented 7 months ago

are you actually using http or https? and is it hosted on a weird port? is it an actual internet-reachable subdomain or just a local intranet dns one?

Serph91P commented 7 months ago

are you actually using http or https? and is it hosted on a weird port? is it an actual internet-reachable subdomain or just a local intranet dns one?

https:// and yes everything is reachable. This is the only container somehow which cannot reach it. Port is 8080 nothing changed by me.

MrBrax commented 7 months ago

Meant if ntfy is being hosted on a weird port, 8080 is lsdvr, right?

I updated axios, might be some very odd bug

Serph91P commented 7 months ago

Meant if ntfy is being hosted on a weird port, 8080 is lsdvr, right?

I updated axios, might be some very odd bug

yeah 8080 is lsdvr. ntfy is actually 8181 so no funny things here. Thanks for trying so hard. I still dont get why the container is not able to curl any site.

Serph91P commented 7 months ago

Meant if ntfy is being hosted on a weird port, 8080 is lsdvr, right?

I updated axios, might be some very odd bug

curl -I google.com HTTP/1.1 301 Moved Permanently Location: http://www.google.com/ Content-Type: text/html; charset=UTF-8 Content-Security-Policy-Report-Only: object-src 'none';base-uri 'self';script-src 'nonce-RsrHky5mVWPP8IkIGaykeA' 'strict-dynamic' 'report-sample' 'unsafe-eval' 'unsafe-inline' https: http:;report-uri https://csp.withgoogle.com/csp/gws/other-hp Date: Thu, 18 Apr 2024 12:41:20 GMT Expires: Sat, 18 May 2024 12:41:20 GMT Cache-Control: public, max-age=2592000 Server: gws Content-Length: 219 X-XSS-Protection: 0 X-Frame-Options: SAMEORIGIN

root@e4408e23280f:/usr/local/share/twitchautomator/server# curl -I domain.tld curl: (7) Failed to connect to meberthosting.de port 80: Connection refused root@e4408e23280f:/usr/local/share/twitchautomator/server#

MrBrax commented 7 months ago

so if you have ntfy on port 8181, is the url https://ntfy.example.com:8181 ?

Serph91P commented 7 months ago

so if you have ntfy on port 8181, is the url https://ntfy.example.com:8181 ?

nah the domain is just https://ntfy.domain.tld this is handlede from the reverse proxy. this hooks directly to the container and serves the domain to the container so i think it actually uses port 80 for ntfy.

grafik
MrBrax commented 7 months ago

then i don't know, nat loopback functionality missing in docker? debian/node bug?

Serph91P commented 7 months ago

then i don't know, nat loopback functionality missing in docker? debian/node bug?

will check later if nat loobback is not working but I dont think this is the problem. What do you mena by debian/node bug? Its docker so it should not be affected by it or?

MrBrax commented 7 months ago

debian is the host inside the docker container and node is the one running lsdvr inside it, so possibly yes

Serph91P commented 7 months ago

debian is the host inside the docker container and node is the one running lsdvr inside it, so possibly yes

oh ok well. Found something similar I think but not realy helpfull. https://stackoverflow.com/questions/71921491/curl-same-server-from-a-inside-docker-container

Will ask on the reverse proxy discord for help maybe they know something.

Serph91P commented 7 months ago

debian is the host inside the docker container and node is the one running lsdvr inside it, so possibly yes

ok I "cheesed" it. Connected both container to a new network and not I can just enter http://ntfy and toppic I want and it works.