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

[Bug?]: ERROR Function "" was not found. #10501

Open
1 task
cjreimer opened this issue Apr 23, 2024 · 8 comments
Open
1 task

[Bug?]: ERROR Function "" was not found. #10501

cjreimer opened this issue Apr 23, 2024 · 8 comments
Labels
bug/needs-info More information is needed for reproduction p3 Low priority. The Core team will not prioritize this for now topic/deployment

Comments

@cjreimer
Copy link
Contributor

cjreimer commented Apr 23, 2024

What's not working?

We are seeing the following error twice, when starting the server on render.com.

ERROR Function "" was not found.
ERROR Function "" was not found.

We have not seen the error on local development yet, or when running yarn rw serve api locally.

Believe this is a redwood V7.x.x issue. We just finally updated the render server to redwood V7.4.x, and were previously running V6.x.

Note:

  1. the server still appears to run normally, and this is a non-fatal error.
  2. We have only two functions: graphql.ts and healthz.ts (for Render.com health monitoring).

I've taken a brief look into the Redwood codebase, and it is clear that the error comes from lambdaRequestHandler; however, why it is being passed an empty routeName is not clear to me.

How do we reproduce the bug?

No response

What's your environment? (If it applies)

No response

Are you interested in working on this?

  • I'm interested in working on this
@cjreimer cjreimer added the bug/needs-info More information is needed for reproduction label Apr 23, 2024
@simoncrypta
Copy link
Collaborator

It's usually bots that try to crawl the API url.

I also saw a lot of:
ERROR Function "wp-admin" was not found.
And
ERROR Function ".env" was not found.
That's definitely bots that try to execute commons WordPress vulnerability.

I don't think anything needs to be done except maybe return a more accurate HTTP code and perhaps not log this as an error?

@cjreimer
Copy link
Contributor Author

Thanks for the quick response @simoncrypta !

I am, however, only seeing this error upon a deploy and server start... consistently. Thus, I don't believe it would be a bot. Maybe there's a unique render.com thing that happens? Thanks!

@Tobbe
Copy link
Member

Tobbe commented Apr 23, 2024

Thanks for the issue report Curtis 🙏 I don't have any good guesses on what could be causing this right now. And seeing as this isn't a critical issue unfortunately we're going to have to give this one a pretty low priority for now.

@Tobbe Tobbe added the p3 Low priority. The Core team will not prioritize this for now label Apr 23, 2024
@cjreimer
Copy link
Contributor Author

Thanks, @Tobbe! There's no problem with assigning this low priority. At least it's logged, and if anyone else sees the issue, they have a place to add their info as well.

@simoncrypta
Copy link
Collaborator

simoncrypta commented Apr 23, 2024

Thanks for the quick response @simoncrypta !

I am, however, only seeing this error upon a deploy and server start... consistently. Thus, I don't believe it would be a bot. Maybe there's a unique render.com thing that happens? Thanks!

Maybe the health check path points to the root ?
You can check this on the setting tab of your api service.

image

I also recommended using the built-in health path from GraphQL, so that way you don't only check if your server can respond, but also check if GraphQL can respond correctly.

@simoncrypta
Copy link
Collaborator

simoncrypta commented Apr 23, 2024

@cjreimer Actually, maybe you're right, we get between 10 and 100 Function "" was not found by day, but I can't find any pattern that could be caused by render, RW, or even our users. It could be plenty of bots, but I'm not sure how common it's.

We are at V6.0.7 with RW

@cjreimer
Copy link
Contributor Author

Interesting!

I hadn't noticed it before V7 of RW... but we hadn't updated the server for a while before this. I believe we were sitting at RW v6.6.1 before this upgrade yesterday. Note that as of yet (~1 day), our experience is that we only get these errors on a server start.

Interesting idea to change the health to the graphQL health function... we may need to look into that. The health function we have is getting hit every 5 seconds or so by render.com, so as of right now we've kept it as lightweight as possible.

Out of curiosity, are you hosting on render.com as well, or another service?

@simoncrypta
Copy link
Collaborator

simoncrypta commented Apr 25, 2024

Out of curiosity, are you hosting on render.com as well, or another service?

Yes, we are on render.com.

I did some tests, and you're right about this getting on every server start. I inspected the RW code and nothing seems to trigger this. Not only that, but I also didn't experience this with build/serve locally. I'm pretty sure that it's triggered by render.com as part of the graceful start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/needs-info More information is needed for reproduction p3 Low priority. The Core team will not prioritize this for now topic/deployment
Projects
None yet
Development

No branches or pull requests

3 participants