mirror of
https://github.com/louislam/uptime-kuma.git
synced 2026-03-02 22:57:00 -05:00
res.data.includes is not a function #8
Labels
No labels
A:accessibility
A:api
A:cert-expiry
A:core
A:dashboard
A:deployment
A:documentation
A:domain expiry
A:incidents
A:maintenance
A:metrics
A:monitor
A:notifications
A:reports
A:settings
A:status-page
A:ui/ux
A:user-management
Stale
ai-slop
blocked
blocked-upstream
bug
cannot-reproduce
dependencies
discussion
duplicate
feature-request
feature-request
good first issue
hacktoberfest
help
help wanted
house keeping
invalid
invalid-format
invalid-format
question
releaseblocker 🚨
security
spam
type:enhance-existing
type:new
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/uptime-kuma#8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @0mni on GitHub (Jul 11, 2021).
Getting this message with a "HTTP(s) - Keyword" service.
Let me know what you may need to help diagnose the issue, the logs are pretty empty.
@louislam commented on GitHub (Jul 11, 2021):
My guess is the response data is a JSON object and Uptime Kuma currently support html only. I will try to improve it.
@0mni commented on GitHub (Jul 12, 2021):
Not a JSON object, at least I don't think it could be. It was the response I got when I configured a check for my SMTP port 587 on my mailcow server.Edit: ignore above, was thinking of smtp, on mobile.
I have two files located on my server served by nginx/php-fpm.
One is a static index.html that is blank except for the number "42".
The other is a php script with the following code:
I do a check for each file as a seperate service and both checks are used to let me know that my webserver is okay, of course the php check will fail if nginx is down, but that is to be expected.
Maybe the check you do is expecting a particular format? Instead of just a simple response?
@louislam commented on GitHub (Jul 12, 2021):
I am sorry that I am a bit lost. Do you mean the error you mentioned at the topic, is related to index.html/index.php hosted on nginx/php-fpm server?
@0mni commented on GitHub (Jul 12, 2021):
Correct.
@0mni commented on GitHub (Jul 12, 2021):
Just did a test, I replaced my index.html that used to have:
with the following:
It is now functioning, so I think you are on the right track that it is a issue with the way the response is being handled. Maybe don't check if it is valid HTML? Just parse the data for the keyword it gets on the response?
@0mni commented on GitHub (Jul 12, 2021):
I made the same change to my php script, it too now works as expected:
@louislam commented on GitHub (Jul 12, 2021):
Found the root problem, because axios automatically parse the response "42" to number format.
Lucky, JSON.stringify can also fix the problem even though it is not a json.
Thank you for your special case.
@louislam commented on GitHub (Jul 12, 2021):
Fixed with 1.0.1